Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
OPEN - issue ODE-160: ExtensionActivity and ExtensionAssignOperation:…
Browse files Browse the repository at this point in the history
… Runtime support

http://issues.apache.org/jira/browse/ODE-160

IL integration

git-svn-id: https://svn.apache.org/repos/asf/ode/trunk@582691 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
vanto committed Oct 7, 2007
1 parent 1e8798c commit 1d5fa18
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
19 changes: 19 additions & 0 deletions axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
Expand Up @@ -44,6 +44,7 @@
import org.apache.ode.axis2.service.ManagementService;
import org.apache.ode.bpel.connector.BpelServerConnector;
import org.apache.ode.bpel.dao.BpelDAOConnectionFactory;
import org.apache.ode.bpel.eapi.AbstractExtensionBundle;
import org.apache.ode.bpel.engine.BpelServerImpl;
import org.apache.ode.bpel.engine.CountLRUDehydrationPolicy;
import org.apache.ode.bpel.evtproc.DebugBpelEventListener;
Expand Down Expand Up @@ -155,6 +156,8 @@ public void init(ServletConfig config, AxisConfiguration axisConf) throws Servle
registerEventListeners();

registerMexInterceptors();

registerExtensionActivityBundles();

try {
_server.start();
Expand Down Expand Up @@ -508,6 +511,22 @@ private void registerMexInterceptors() {
}
}

private void registerExtensionActivityBundles() {
String listenersStr = _odeConfig.getExtensionActivityBundles();
if (listenersStr != null) {
// TODO replace StringTokenizer by regex
for (StringTokenizer tokenizer = new StringTokenizer(listenersStr, ",;"); tokenizer.hasMoreTokens();) {
String bundleCN = tokenizer.nextToken();
try {
_server.registerExtensionBundle((AbstractExtensionBundle) Class.forName(bundleCN).newInstance());
} catch (Exception e) {
__log.warn("Couldn't register the extension bundle " + bundleCN + ", the class couldn't be " +
"loaded properly.");
}
}
}
}

private class ProcessStoreListenerImpl implements ProcessStoreListener {

public void onProcessStoreEvent(ProcessStoreEvent event) {
Expand Down
Expand Up @@ -82,6 +82,8 @@ public class OdeConfigProperties {
public static final String PROP_PROCESS_DEHYDRATION = "process.dehydration";

public static final String PROP_DAOCF = "dao.factory";

public static final String PROP_EXTENSION_BUNDLES= "extension.bundles";

private File _cfgFile;

Expand Down Expand Up @@ -268,4 +270,8 @@ public String getDbInternalPassword() {
return getProperty(PROP_DB_INTERNAL_PASSWORD);
}

public String getExtensionActivityBundles() {
return getProperty(PROP_EXTENSION_BUNDLES);
}

}
19 changes: 19 additions & 0 deletions jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java
Expand Up @@ -36,6 +36,7 @@
import org.apache.commons.logging.LogFactory;
import org.apache.ode.bpel.connector.BpelServerConnector;
import org.apache.ode.bpel.dao.BpelDAOConnectionFactoryJDBC;
import org.apache.ode.bpel.eapi.AbstractExtensionBundle;
import org.apache.ode.bpel.engine.BpelServerImpl;
import org.apache.ode.bpel.evtproc.DebugBpelEventListener;
import org.apache.ode.bpel.iapi.BpelEventListener;
Expand Down Expand Up @@ -115,6 +116,8 @@ public void init(ComponentContext context) throws JBIException {
registerEventListeners();

registerMexInterceptors();

registerExtensionActivityBundles();

__log.debug("Starting JCA connector.");
initConnector();
Expand Down Expand Up @@ -291,6 +294,22 @@ private void registerMexInterceptors() {
}
}

private void registerExtensionActivityBundles() {
String listenersStr = _ode._config.getExtensionActivityBundles();
if (listenersStr != null) {
// TODO replace StringTokenizer by regex
for (StringTokenizer tokenizer = new StringTokenizer(listenersStr, ",;"); tokenizer.hasMoreTokens();) {
String bundleCN = tokenizer.nextToken();
try {
_ode._server.registerExtensionBundle((AbstractExtensionBundle) Class.forName(bundleCN).newInstance());
} catch (Exception e) {
__log.warn("Couldn't register the extension bundle " + bundleCN + ", the class couldn't be " +
"loaded properly.");
}
}
}
}

public synchronized void start() throws JBIException {
if (_started)
return;
Expand Down

0 comments on commit 1d5fa18

Please sign in to comment.