users@glassfish.java.net

Re: RE: Re: Surprising JPA (Toplink) Behaviour (glassfish v1 UR1)

From: <glassfish_at_javadesktop.org>
Date: Fri, 16 Mar 2007 12:10:51 PST

I just got a fine education on #glassfish, wherein I opened the conversation by confessing that
there are two distinct halves of my codebase, and each one obtains their EMFs differently.

One half is a bunch of JSF managed-beans that were generated by Netbeans. they get their
EMFs by way of an annotation:

    @PersistenceUnit(unitName = "RCCLPU")
    private EntityManagerFactory emf;

The other half of the code, which was written by a different developer, gets its EMF references via

private static EntityManagerFactory emf = Persistence.createEntityManagerFactory("RCCLPU");

It wasn't until the two halves of the code were used together that this situation arose.
[Message sent by forum member 'pohl' (pohl)]

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