users@glassfish.java.net

Re: Glassfish v3 and EJB

From: <glassfish_at_javadesktop.org>
Date: Thu, 13 Nov 2008 20:33:11 PST

> Witt nb 6.5 (rc) and v3 prelude, you can
> 1/ make sure the optional ejb container preview is
> installed in v3 via
> update center of Prelude
> 2/ create a web app project
> 3/ if you are on windows (bug not on unix), add the
> ejb apis jar from
> gfinstall/modules/ejb in the libraries of you project
> 4/ create a servlet in your web project
> 5/ create a java class in your web project
> 6/ add the annotation(s) to make this pojo class an
> EJB (@stateless,...)
>
> In ejb3.x, Ejbs are simple Pojos with annotations, so
> the need for a
> complex IDE wizard is not mandatory. The key point
> for this preview ejb
> 3.1 in prelude is to test what will be the future EE
> 6 spec, and it is
> easy to try it.
> So far, no MBD or Stateful beans, only Stateless
> beans work in the
> optional preview.
> When EE 6 is ready, NetBeans will offer wizards to
> help you creating and
> using EJBs inside your web app, without the need for
> ejbmodules or EAR
> applications. Packaging will be really really simple.

Ok, that is good explanation, but missed one small detail :)
What about using regular jar file that contains just persistence entities, referenced in persistence.xml (<jar-file>my-entities.jar</jar-file>) and located under WEB-INF/lib .

Can I use this jar file in war ejb3.1 oriented application?
And I'm not asking about ejb module because stateless bean should be located under WEB-INF/classes and persistence.xml under WEB-INF/classes/META-INF

Thank you in advance for your help
[Message sent by forum member 'vladperl' (vladperl)]

http://forums.java.net/jive/thread.jspa?messageID=316699