File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes deployment descriptor value overrides the annotation value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "deployment descriptor value overrides the annotation value" Watch "deployment descriptor value overrides the annotation value" New topic
Author

deployment descriptor value overrides the annotation value

Amit Suresh Pawar
Ranch Hand

Joined: Dec 09, 2008
Posts: 30
Hi,
In case of EJB3.0 -> Features ->
You are no longer required to create the EJB deployment descriptor files (such as
ejb-jar.xml). You can now use metadata annotations in the bean file itself to configure
metadata. You are still allowed, however, to use XML deployment descriptors if you want; in the case of conflicts, the deployment descriptor value overrides the annotation value.


I want to know the meanings of the sentence "the deployment descriptor value overrides the annotation value".
Because DD reads ejb-jar.xml at startup.........

Thank You.............
[/LIST]


Amit S. Pawar
SCJP,SCWCD,OCA
Ralph Jaus
Ranch Hand

Joined: Apr 27, 2008
Posts: 342
"Deployment descriptor value overrides annotation value" means that the deployment descriptor's values determines the applications configuration at runtime; the overriden annotation value is ignored.

Take the following example: If you specify in the deployment descriptor Then the assignments from the deployment descriptor apply. That means the name of the bean is "MyTestBean", not "TestBean" and the transaction attribute of doSomething is "Required" and not "SUPPORTS".
[ December 22, 2008: Message edited by: Ralph Jaus ]

SCJP 5 (98%) - SCBCD 5 (98%)
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Please do not duplicate threads. I've removed the other one.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: deployment descriptor value overrides the annotation value