I tried to defined the contract of the custom API as closely as possible
to the Query interface defined by JPA. There are some contracts, which
cannot be implemented such as definition of parameters by names,
execution of update or delete statements, yet this is pretty close.
Thanks,
Gianny
Dain Sundstrom wrote:
Very cool. I haven't been following JPA (EJB3 Persistence) that
closely, so I'm curious how closely this matches up what's coming in
EJB3.
-dain
On Mar 2, 2006, at 4:02 AM, Gianny Damour wrote:
Hi Phani,
Sorry for this late reply - I was focused on completing the
implementation of dynamic queries, which is now available in trunk.
ModuleCMPEngine is not DayTrader specific. Basically, the idea it to
bind a specific GBean to the ENC of the component from which you
need to perform the dynamic query. "ModuleCmpEngine" is the j2eeType
of the GBean to be bound; its type is
"org.openejb.entity.cmp.ModuleCmpEngine"; its J2EE module type is
"EJBModule"; its name is "moduleCmpEngine" and it is part of the EJB
module defining the CMP for which you need to execute dynamic EJBQL
queries. So, to bind it to the ENC you use something like this:
<gbean-ref>
<ref-name>cmp/QueryManager</ref-name> -- ENC name
<ref-type>ModuleCmpEngine</ref-type> -- j2eeType
<proxy-type>org.openejb.entity.cmp.ModuleCmpEngine</
proxy-type> -- GBean type
<gbean-locator>
<module>name_of_the_ejb_module</module> -- name of
the EJB module
<type>EJBModule</type> -- J2EE module type
<name>moduleCmpEngine</name> -- name of the GBean
</gbean-locator>
</gbean-ref>
Thanks,
Gianny