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.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop