Persistence config for embedded OpenEJB
In a recent list thread, David Blevins of OpenEJB told me that:
Strictly speaking this all you *must* supply in your persistence.xml:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"> <persistence-unit name="my-unit"/> </persistence>... along with the following two properties at the server level:
javax.persistence.jtaDataSource javax.persistence.nonJtaDataSourceWe have a file called conf/system.properties you can use to make declaring system properties easier in a standalone server. For embedded environments you're welcome to just add them via System.setProperty() or even pass them in as parameters to "new InitialContext(props)".
So, the question becomes: "How does one actually do what he just indicated?"
Is the best way to add these properties to the initial servlet environment inside of the servlet container? Since I'm not getting an initial context, what is the best route?
