I hacked in support for @EJB in servlets in web modules, and tested it with the calculator sample. It seems to work, but I only had one ref to test, so let me know if you have any problems.

Tomorrow, I'm going to try to remove the requirement to have a geronimo-openejb.xml file.


On Jan 24, 2007, at 6:00 AM, David Blevins wrote:

Dain may have a better idea of which CMP2 features are lacking. I'll let him go into detail about that.

Tested:
  cmp-fileds
  one-to-one bi-directional cmr
  one-to-many bi-directional cmr
  many-to-one bi-directional cmr
  finders

Should work:
  many-to-many cmr
  uni-directional cmr
  primary-key mapped to foreign-key

Won't work:
  ejb select
  compound pk
  unknown pk

Not Implemented
  generation of entity-mappings.xml

One big annoying thing is you need an ejb-context-ref in each cmp bean that points to the jpa context and the ref name must be openejb/ cmp. For example,

  <persistence-context-ref>
<persistence-context-ref-name>openejb/cmp</persistence-context- ref-name>
    <persistence-unit-name>cmp</persistence-unit-name>
  </persistence-context-ref>


You can use the full power of JPA for your mappings as long as it matches the cmp bean class.

That's it.

-dain

Reply via email to