• Post Reply Bookmark Topic Watch Topic
  • New Topic

is EJB QL only for CMP ?  RSS feed

 
Artemesia Lakener
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if BMP is used, do we still need to use EJB QL ?
 
Mahesh Ramichetty
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The EJB-query language that is introduced as the part of the EJB2.0.This is primarly used for specifing the ejb select methods in the Deployment descriptor which is nothing but the ejb-jar.xml

The EJB Ql is similar to the SQl language in which the where and from are mandatory.
 
Vishal Angrish
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB-QL is primarily and only used for in case of CMP`s, Because you declare accessors and mutators for Virtual Persistent fields in abstract Entity, and conatiner extends this class and provides the values to Bean in question, by referring to the Schema detials and relationship mentioned in discriptor, Now a bit more about EJB-QL, It gives you leverage to handle the complex select scenarios, Which in turn can return the collections or individual EB instance, Even you can move from one Bean to another using the CMR(Container managed relationship).

AOP Look on EJb QL Model.
Not exactly, but by doing so, Java has implemented a bit of AOP, like persistency will be handled as different aspect and advices it take from the descriptor file and joinPoints are the EJB Bean Life Cycle events(like activate and passivate, load etc).

Whereas in case of BMP, you take whole control of beans persistence mechanism.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!