users@glassfish.java.net

Re: Not Connecting to Database

From: <glassfish_at_javadesktop.org>
Date: Thu, 23 Aug 2007 11:21:08 PDT

Marina:

   I think this will explain how I am getting the EM.

  [code]
@Stateless(mappedName="ejb/MyEntityManager")
@TransactionManagement(TransactionManagementType.CONTAINER)
@Resource(name="jdbc/<databasename>", type=javax.sql.XADataSource.class )
public class MyEntityManagerRemote implements DimEntityManagerIFRemote {
        @PersistenceUnit(unitName="MYEJBPU")
        @PersistenceContext private EntityManager entityManager;
.......
}

  [/code]

Please excuse my fat fingers :-(

Thanks for reading my post...

Russ
[Message sent by forum member 'russ_ray' (russ_ray)]

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