Running with Amber outside of the resin container
Mike Pretti <[email protected]> Wed, 05 Jul 2006 17:12:13 -0700
| Newsgroups | gmane.text.xml.resin.user |
|---|---|
| Message-ID | <1152144734.5143.71.camel@localhost> |
I'm trying to run Amber outside of the resin container.
My problem is that I can't create an EntityManagerFactory.
Running inside the resin container works wonderfully.
I have a META-INF/persistence.xml in my classpath. As well as the
ejb3-0.jar and resin.jar. When my code comes across:
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("mikeexample");
The emf variable is always null. No exceptions are thrown.
My persistence.xml is very simple:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
version="1.0">
<persistence-unit name="mikeexample">
<class>example.Course</class>
<exclude-unlisted-classes/>
</persistence-unit>
</persistence>
One last note... if I try to the createEntityManagerFactory( String,
Map ), a UnsupportedOperationException is thrown.
All of the examples I found on caucho's site create an EntityManager
from with the resin container via a servlet...
Any ideas / thoughts would be appreciated.
-Mike
P.S> I do believe that the javax.persistence API allows one to run
outside of the container...