On Aug 16, 2009, at 12:25 PM, JimOR wrote:


David,


David Blevins wrote:

Sorry it's taken be a bit to get back to this.


Not a show stopper, still LOVE OpenEJB, and I appreciate your looking into it at all. I'm as much wondering whether I'm breaking any rules deploying an 'SE app' to an 'EE server', and can easily EJB-ify my DAOs if/ when I need
to.


David Blevins wrote:

Where is the jar that contains
org.eclipse.persistence.jpa.PersistenceProvider and where is the jar
that contains
org.eclipse.persistence.transaction.JTATransactionController?


I tried two packaging 'flavors'. The First stab was the Galileo 'standard
wizard' which deploys 4 jars, one of which is the JPA API.  So after
deploying normally I deleted the deployed API jar and started the server. In
this scenario both of those classes are in a jar named
org.eclipse.persistence.core_1.1.2.v20090612-r4475.jar

Second stab was to download and unzip the 'single jar packaging' from
http://www.eclipse.org/eclipselink/downloads/ Same result, and again both
classes do exist in the eclipselink.jar that lives under the
eclipselink/jlib folder.



David Blevins wrote:

Seems the issue occurs possibly because the EclipseLink
PersistenceProvider class cannot see (or sees a version from the wrong
classloder) its  JTATransactionController class.


Can't say I completely understand how all the pieces fit together. My war
has a resource_local persistence-unit with the DAOs using
EntityTransactions.  And aside from the initial exception in the
openejb.log, run flawlessly. Is the JTATransactionController class load an
OpenEJB boostrap requirement?

Here's a sample war with the eclipselink.jar if you'd like to look into it
further...
http://www.nabble.com/file/p24996863/daosample.war daosample.war


The JTATransactionController is a class loaded by EclipseLink, so we don't have any control on when/how it is loaded. We have a subclass of JTATransactionController which allows EclipseLink to find the OpenEJB TransactionManager impl, but that's the full extent of our EclipseLink awareness.

I tried the latest EclipseLink version with our jpa-eclipselink example to see if maybe they updated their JTATransactionManager class in a way that is incompatible with prior versions. All ran fine there, so we can rule that out:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.superbiz.eclipselink.MoviesTest
Apache OpenEJB 3.1.1    build: 20090530-06:18
http://openejb.apache.org/
INFO - openejb.home = /Users/dblevins/work/openejb3/examples/jpa- eclipselink INFO - openejb.base = /Users/dblevins/work/openejb3/examples/jpa- eclipselink INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service) INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager) INFO - Configuring Service(id=movieDatabaseUnmanaged, type=Resource, provider-id=Default JDBC Database) INFO - Configuring Service(id=movieDatabase, type=Resource, provider- id=Default JDBC Database) INFO - Found EjbModule in classpath: /Users/dblevins/work/openejb3/ examples/jpa-eclipselink/target/classes INFO - Beginning load: /Users/dblevins/work/openejb3/examples/jpa- eclipselink/target/classes
INFO - Configuring enterprise application: classpath.ear
INFO - Configuring Service(id=Default Stateful Container, type=Container, provider-id=Default Stateful Container) INFO - Auto-creating a container for bean Movies: Container(type=STATEFUL, id=Default Stateful Container) INFO - Configuring PersistenceUnit(name=movie-unit, provider=org.eclipse.persistence.jpa.PersistenceProvider)
INFO - Enterprise application "classpath.ear" loaded.
INFO - Assembling app: classpath.ear
INFO - PersistenceUnit(name=movie-unit, provider=org.eclipse.persistence.jpa.PersistenceProvider) ERROR - JAVA AGENT NOT INSTALLED. The JPA Persistence Provider requested installation of a ClassFileTransformer which requires a JavaAgent. See http://openejb.apache.org/3.0/javaagent.html
INFO - Jndi(name=MoviesLocal) --> Ejb(deployment-id=Movies)
INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
INFO - Deployed Application(path=classpath.ear)
[EL Info]: 2009-08-17 10:29:36.045--ServerSession(1631558)-- EclipseLink, version: Eclipse Persistence Services - 1.1.2.v20090612- r4475 [EL Info]: 2009-08-17 10:29:36.38--ServerSession(1631558)--file:/Users/ dblevins/work/openejb3/examples/jpa-eclipselink/target/classes/-movie- unit login successful Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.833 sec


Will have a look at the war file.

-David

Reply via email to