Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Necessary Deployment Descriptor

 
Christian Heldstab
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • 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
 
Tomaszz Lewandowski
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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?
 
Ralph Jaus
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • 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 ]
 
Chaminda Amarasinghe
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic