File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is deployment descriptor always override annotation?

 
Fu Dong Jia
Ranch Hand
Posts: 131
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone1
The EJB deployment descriptor can partially override bean class annotation OR entirely override?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that everything any settings can be override in the deployment descriptor, to avoid deployment problems.
 
Peter Purmonen
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where annotations and Deployment descriptor entries are in conflict, the Deployment Descriptor has precedence. E.g, the DD overrides what is in the annotation(s). In other cases, the annotations and deployment descriptor meta data complement each other.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"PeterP", please check your private messages for an important administrative matter.
 
Ralph Jaus
Ranch Hand
Posts: 342
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know, whether it is technically possible to override any annotation in the deployment descriptor. But at least the ejb spec doesn't allow to do so. For example, you are not allowed to override the bean type (see core spec 19.2, page 491).
 
Peter Purmonen
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's absolutely true, my bad. There are exceptions to the "rule(s)", but they are few, so knowing the general behavior of annotation and DD meta data combined with remembering the exceptions is always good.
 
Peter Purmonen
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.. more specifically, most stuff are overridable by the deployment descriptor. :-)
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice catch Ralph
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic