summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/implementation-bpel-runtime
diff options
context:
space:
mode:
authoredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2010-01-29 15:03:35 +0000
committeredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2010-01-29 15:03:35 +0000
commit58049ed3431927e180cedcbc863773eb7960e91c (patch)
treee69061efd909280da5c64defc05b586a98fb5a17 /sca-java-2.x/trunk/modules/implementation-bpel-runtime
parentc057c51d8c40a264493c0cbc687fb805b169de2f (diff)
Changes to ensure that TCCL used in BPELImplementationProvider is able to access both the JPA persistence provider and also the ODE JPA DAO classes.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@904512 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-bpel-runtime')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-bpel-runtime/META-INF/MANIFEST.MF3
-rw-r--r--sca-java-2.x/trunk/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/provider/BPELImplementationProvider.java15
2 files changed, 10 insertions, 8 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-bpel-runtime/META-INF/MANIFEST.MF b/sca-java-2.x/trunk/modules/implementation-bpel-runtime/META-INF/MANIFEST.MF
index d23f4ee0bb..79977c6864 100644
--- a/sca-java-2.x/trunk/modules/implementation-bpel-runtime/META-INF/MANIFEST.MF
+++ b/sca-java-2.x/trunk/modules/implementation-bpel-runtime/META-INF/MANIFEST.MF
@@ -30,6 +30,7 @@ Import-Package: javax.persistence;version="1.0.0",
org.apache.ode.il.dbutil;version="1.3.2",
org.apache.ode.scheduler.simple;version="1.3.2",
org.apache.ode.utils;version="1.3.2",
+ org.apache.openjpa.persistence;version="1.2.1",
org.apache.tuscany.sca.assembly;version="2.0",
org.apache.tuscany.sca.core;version="2.0",
org.apache.tuscany.sca.databinding;version="2.0",
@@ -43,7 +44,7 @@ Import-Package: javax.persistence;version="1.0.0",
org.apache.tuscany.sca.policy;version="2.0.0",
org.apache.tuscany.sca.provider;version="2.0",
org.apache.tuscany.sca.runtime;version="2.0",
- org.eclipse.core.runtime;resolution:=optional;common=split,
+ org.eclipse.core.runtime;common=split;resolution:=optional,
org.oasisopen.sca.annotation;version="2.0",
org.w3c.dom;resolution:=optional
Bundle-SymbolicName: org.apache.tuscany.sca.implementation.bpel.runtime
diff --git a/sca-java-2.x/trunk/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/provider/BPELImplementationProvider.java b/sca-java-2.x/trunk/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/provider/BPELImplementationProvider.java
index 8880d20a37..91028e0523 100644
--- a/sca-java-2.x/trunk/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/provider/BPELImplementationProvider.java
+++ b/sca-java-2.x/trunk/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/provider/BPELImplementationProvider.java
@@ -21,12 +21,12 @@ package org.apache.tuscany.sca.implementation.bpel.ode.provider;
import java.io.File;
import java.net.URI;
-import javax.persistence.spi.PersistenceProvider;
import javax.transaction.TransactionManager;
+import org.apache.openjpa.persistence.PersistenceProviderImpl;
+import org.apache.ode.dao.jpa.ProcessDAOImpl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.ode.dao.jpa.ProcessDAOImpl;
import org.apache.tuscany.sca.assembly.Endpoint;
import org.apache.tuscany.sca.assembly.EndpointReference;
import org.apache.tuscany.sca.assembly.Reference;
@@ -121,10 +121,11 @@ public class BPELImplementationProvider implements ImplementationProvider {
__log.info("Starting " + component.getName());
} // end if
- // Switch TCCL - under OSGi this causes the TCCL to be set to the Bundle
- // classloader - this is then used by 3rd party code from ODE and its dependencies
+ // Switch TCCL - use a classloader that can find classes related to the non-OSGi services
+ // referenced from the implementation-bpel module which include the Persistence provider (OpenJPA) and
+ // the JPA DAO implementation contained in the ODE project
ClassLoader tccl = ClassLoaderContext.setContextClassLoader(EmbeddedODEServer.class.getClassLoader(),
- PersistenceProvider.class.getClassLoader(),
+ PersistenceProviderImpl.class.getClassLoader(),
ProcessDAOImpl.class.getClassLoader() );
try {
@@ -142,7 +143,7 @@ public class BPELImplementationProvider implements ImplementationProvider {
__log.info(">>> Deploying : " + deploymentDir.toString());
}
- // deploy the process
+ // Deploy the BPEL process
if (odeServer.isInitialized()) {
deployment = new ODEDeployment( deploymentDir );
try {
@@ -181,6 +182,6 @@ public class BPELImplementationProvider implements ImplementationProvider {
if(__log.isInfoEnabled()) {
__log.info("Stopped !!!");
}
- }
+ } // end method stop()
}