users@glassfish.java.net

Defining a datasource in an embedded EJBContainer

From: Antonio Goncalves <antonio.mailing_at_gmail.com>
Date: Sun, 7 Mar 2010 18:08:49 +0100

Hi,

I'm running a very simple example with an EJB and an entity. I use a Main
class to trigger the EJBContainer and persist the entity in the database. It
works fine if I use the jdbc/__default datasource in the persistence.xml
file. But what if I need to change to another custom datasource ? How do I
define a new datasource in an embedded environment ?

Thanks,
Antonio