Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Necessary Deployment Descriptor

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all

In which circumstances is a deployment descriptor necessary? I know about the following points:

- General Interceptor
- Message Destination

Are there other aspects?

Thanks in advance.
Christian
 
author
Posts: 580
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Christian,

A DD is not needed for message destinations. I think global interceptors are the only realistic use case where DD is unavoidable.

Cheers,
Reza
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. How do you specify message-destination-link in annotations?
2. When you use DD to assign method-permissions and container-transactions, you can set different values for methods with the same signature from Local and Remote interfeces (method-intf subelement). How can you achive this with annotations?
 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The deployment descriptor also offers some other possibilities that don't have a direct equivalent in annotations:

- define the invocation order of interceptors

- mapping of role names used in isCallerInRole and defined in the system via "role-link" in "security-role-ref" element

- declaring predefined runtime exceptions (for instance java.lang.ArithmeticException) as application exceptions

- assigning a transaction attribute to all overloaded versions of a business method in a single step: in annotations every single method has to be annotated! (OK, this isn't really an argument to switch from annotations to deployment descriptors).

- simple environment entries can only be defined in the deployment descriptor
[ December 07, 2008: Message edited by: Ralph Jaus ]
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ralph Jaus:
The deployment descriptor also offers some other possibilities that don't have a direct equivalent in annotations:

- define the invocation order of interceptors

- mapping of role names used in isCallerInRole and defined in the system via "role-link" in "security-role-ref" element

- declaring predefined runtime exceptions (for instance java.lang.ArithmeticException) as application exceptions

- assigning a transaction attribute to all overloaded versions of a business method in a single step: in annotations every single method has to be annotated! (OK, this isn't really an argument to switch from annotations to deployment descriptors).

- simple environment entries can only be defined in the deployment descriptor

[ December 07, 2008: Message edited by: Ralph Jaus ]



hi Ralph Jaus,

I think your 1,2 and 4 are just overriding annotations default behaviors while 3 and 5 are truly not possible using annotations.
[ December 08, 2008: Message edited by: Chaminda Amarasinghe ]
 
Ralph Jaus
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chaminda wrote:

I think your 1,2 and 4 are just overriding annotations default behaviors

1. and 2. enable a system behavoir that couldn't be achieved by annotations.

Concerning 4: One may say, it's possible to reproduce what is done by a single <method> element by using several annotations. But in this sense a default interceptor can also be reproduced through annotating every single bean with @Interceptors.
 
If you want to look young and thin, hang around old, fat people. Or this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic