• 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
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Is deployment descriptor always override annotation?

 
Ranch Hand
Posts: 131
  • 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?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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.
 
Greenhorn
Posts: 9
  • 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.
 
Marshal
Posts: 67496
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"PeterP", please check your private messages for an important administrative matter.
 
Ranch Hand
Posts: 342
  • 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
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.. more specifically, most stuff are overridable by the deployment descriptor. :-)
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice catch Ralph
reply
    Bookmark Topic Watch Topic
  • New Topic