You won't find that requirement explicitly stated in the EJB spec,
because JPA entities are *not* EJBs; they are just POJOs. It is an
implicit requirement. When you designate a jar as ejb-jar, it must
contain at least one EJB. May I know why you want to designate a jar
file as ejb-jar when it does not contain any EJB? When I say EJB, I mean
one of Stateful, Stateless, MDB, or Entity Bean (EJB 1.x/2.x).
Thanks,
Sahoo
Hubert, Eric wrote:
> Hello all!
>
> During an EAR deployment Glassfish v2 b58g complaints if one declares an
> EJB module which only contains EJB 3.0 style entities (annotated POJOs)
> and forces one to package them as a Java library. Is there really a need
> to do that according to confirm with the EJB 3.0 spec? I ask as other
> implementations don't force the application assembler to package his
> application in this way.
> The output in server.log states "A valid ejb jar requires at least one
> session, entity (1.x/2.x style), or message driven bean."
>
> Could someone please point me to the source of this requirement in the
> EJB 3.0 spec! I couldn't find it. Although I agree it is perfectly fine
> to package those annotated POJOs in a plain java library and reference
> it in persistence.xml I don't understand why to force the application
> provider to do it in this way.
>
> Regards,
> Eric
>
> --
> Eric Hubert
> Software Architect
> Associate Director Research & Development
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>
>