| Author |
Necessary Deployment Descriptor
|
Christian Heldstab
Greenhorn
Joined: Oct 04, 2008
Posts: 4
|
|
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
Joined: Feb 01, 2005
Posts: 559
|
|
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
|
Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
|
 |
Tomaszz Lewandowski
Ranch Hand
Joined: Sep 07, 2007
Posts: 30
|
|
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?
|
Regards<br />Tomasz Lewandowski<br />SCJP5 (97%) | SCWCD5 (98%)
|
 |
Ralph Jaus
Ranch Hand
Joined: Apr 27, 2008
Posts: 342
|
|
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 ]
|
SCJP 5 (98%) - SCBCD 5 (98%)
|
 |
Chaminda Amarasinghe
Ranch Hand
Joined: May 17, 2006
Posts: 402
|
|
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
Joined: Apr 27, 2008
Posts: 342
|
|
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.
|
 |
 |
|
|
subject: Necessary Deployment Descriptor
|
|
|