summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/implementation-bpel-runtime
diff options
context:
space:
mode:
authoredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2009-07-15 08:39:06 +0000
committeredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2009-07-15 08:39:06 +0000
commit86765e75cfa1becfaa7485d497ca3459514f5882 (patch)
tree9c3ae5fab78440a0d476bb37376a7a5a52b5f79c /java/sca/modules/implementation-bpel-runtime
parent7a462a1eb14fcd883f09550310a160e0732800fb (diff)
Add support for SCA Properties - TUSCANY 3142
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@794185 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/implementation-bpel-runtime')
-rw-r--r--java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java37
-rw-r--r--java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java11
2 files changed, 36 insertions, 12 deletions
diff --git a/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java b/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java
index 1069015963..af0b1089e1 100644
--- a/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java
+++ b/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java
@@ -81,7 +81,7 @@ public class EmbeddedODEServer {
protected ExecutorService _executorService;
private Map<QName, RuntimeComponent> tuscanyRuntimeComponents = new ConcurrentHashMap<QName, RuntimeComponent>();
-
+
public EmbeddedODEServer(TransactionManager txMgr) {
_txMgr = txMgr;
}
@@ -230,11 +230,7 @@ public class EmbeddedODEServer {
dehy.setProcessMaxCount(_config.getDehydrationMaximumCount());
_bpelServer.setDehydrationPolicy(dehy);
}
-
- System.out.println("TuscanyODEServer: threads.pool.size = " +
- _config.getThreadPoolMaxSize() );
-
-
+
_bpelServer.setConfigProperties(_config.getProperties());
_bpelServer.init();
_bpelServer.setInstanceThrottledMaximumCount(_config.getInstanceThrottledMaximumCount());
@@ -327,22 +323,39 @@ public class EmbeddedODEServer {
return _executorService;
}
- // Updated by Mike Edwards, 23/05/2008
- public void deploy(ODEDeployment d, BPELImplementation implementation) {
+ /**
+ * Deploy the BPEL process implementation to the ODE Engine
+ * @param d - ODEDeployment structure
+ * @param implementation - the BPEL Implementation
+ * @param component - the SCA component which uses the implementation
+ */
+ public void deploy(ODEDeployment d, BPELImplementation implementation, RuntimeComponent component ) {
try {
- TuscanyProcessConfImpl processConf = new TuscanyProcessConfImpl( implementation );
+ TuscanyProcessConfImpl processConf = new TuscanyProcessConfImpl( implementation, component );
_bpelServer.register(processConf);
+ d.setProcessConf(processConf);
__log.debug("Completed calling new Process deployment code...");
} catch (Exception ex) {
- String errMsg = ">>> DEPLOY: Unexpected exception: " + ex.getMessage();
+ String errMsg = ">>> DEPLOY: Unexpected exception during deploy of BPEL. /n Component = "
+ + component.getName()
+ + " implementation = "
+ + implementation.getProcess()
+ + ex.getMessage();
__log.debug(errMsg, ex);
throw new ODEDeploymentException(errMsg,ex);
}
}
+ /**
+ * Undeploy the BPEL process implementation from the ODE Engine
+ * @param d - ODEDeployment structure
+ */
public void undeploy(ODEDeployment d) {
- //TODO
- }
+ TuscanyProcessConfImpl processConf = d.getProcessConf();
+ if( processConf != null ) {
+ processConf.stop();
+ } // end if
+ } // end method undeploy
public void registerTuscanyRuntimeComponent(QName processName,RuntimeComponent componentContext) {
tuscanyRuntimeComponents.put(processName, componentContext);
diff --git a/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java b/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java
index d57471e215..0eedd5d0e5 100644
--- a/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java
+++ b/java/sca/modules/implementation-bpel-runtime/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java
@@ -29,6 +29,9 @@ import java.io.File;
public class ODEDeployment {
/** The directory containing the deploy.xml and artifacts. */
public File deployDir;
+
+ // The Tuscany version of the ODE Process Conf implementation
+ private TuscanyProcessConfImpl conf;
/** If non-null the type of exception we expect to get when we deploy. */
public Class<?> expectedException = null;
@@ -41,4 +44,12 @@ public class ODEDeployment {
public String toString() {
return "Deployment#" + deployDir;
}
+
+ public void setProcessConf( TuscanyProcessConfImpl conf ) {
+ this.conf = conf;
+ }
+
+ public TuscanyProcessConfImpl getProcessConf() {
+ return conf;
+ }
} \ No newline at end of file