• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

is EJB QL only for CMP ?

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if BMP is used, do we still need to use EJB QL ?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic