users@glassfish.java.net

Re: persistence-context-ref in ejb-jar.xml

From: <glassfish_at_javadesktop.org>
Date: Tue, 22 May 2007 08:38:49 PDT

Does the ejb-jar contain an EJB component with ejb-name "midwood"? Since none of the
structural metadata is declared within ejb-jar.xml, that would mean you'd need a bean
class with @Stateful/_at_Stateless/_at_MessageDriven with name=midwood or where name() is
not specified but the simple class name is "midwood".

Yes, ejb-jar.xml and sun-ejb-jar.xml are different. ejb-jar.xml describes standard EJB jar
metadata and is defined by the EJB specification. sun-ejb-jar.xml is used to describe
Java EE SDK / Glassfish specific configuration information. Neither is required in
Java EE 5 but you can provide any combination of the two.

Have you considered just using a @PersistenceUnit or @PersistenceContext annotation
instead of declaring the dependency via .xml? It's much easier.

 --ken
[Message sent by forum member 'ksak' (ksak)]

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