Hi David B,
I have the patch ready for the Persistence-Unit-Ref. On
writing a test and adding the persistence.xml to the
openejb-itests-beans what happens is some other tests start failing.
eg: StatelessContainerTest. The reason for this is that the
persistence.xml from openejb-itests-beans gets picked up by the
PersistenceDeployer when it runs tests in other modules that have
dependency on this module. Then it tries to deploy it again and
results in errors. So I think for tests in other modules some
mechanism should be there to prevent persistence.xmls from parent
modules to be picked up.
Another thing that I notice is that the persistence deployer deploys
each persistence.xml twice as
cl.getResources("META-INF/persistence.xml") always returns two urls to
the same resource. This results in the loadPersistence method being
called twice. Shouldn't this be changed?
Thirdly what if in two different jars there are two different
EntityManagerFactories with the same name. We should be able to refer
to them by relative paths. I think this is not supported by the
PersistenceDeployer now.
Pls give your comments on the above
Thanks
Manu
On 12/4/06, Dain Sundstrom <[EMAIL PROTECTED]> wrote:
On Dec 3, 2006, at 11:11 PM, David Blevins wrote:
>
> On Dec 3, 2006, at 10:09 PM, Manu George wrote:
>
>> Hi David,
>> I have already done that. I will get the
>> EntityManagerFactory But for getting the entity manager I need to
>> write a class OpenEJBManagedRuntime implements ManagedRuntime which
>> looks up the transaction manager of openejb and gives it to
>> openjpa. I
>> got that done too.
>
> OpenJPA already has an implementation for OpenEJB, but now that you
> mention it I remember it's using
> org.openejb.OpenEJB.getTransactionManager() which is now
> org.apache.openejb.OpenEJB. I've just checked back in an
> org.openejb.OpenEJB class for compatibility. I'll drop them a note
> to update this class to the latest:
>
> http://incubator.apache.org/openjpa/docs/openjpa-0.9.0-incubating/
> javadoc/org/apache/openjpa/ee/AutomaticManagedRuntime.html
I was playing with the JPA stuff last night and had to bid the
transaction manager into java:TransactionManager. The tests in
openejb-presistence do this with a special java: naming handler:
https://svn.apache.org/repos/asf/incubator/openejb/trunk/openejb3/
container/openejb-persistence/src/test/java/org/apache/openejb/
persistence/java/javaURLContextFactory.java
It would be nice if we could give the JPA implementation the
transaction manager directly.
-dain