ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r584963 - in /ode/trunk: extensions/README.extensions jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java
Date Mon, 15 Oct 2007 23:06:04 GMT
Author: vanto
Date: Mon Oct 15 16:05:57 2007
New Revision: 584963

URL: http://svn.apache.org/viewvc?rev=584963&view=rev
Log:
fix

Added:
    ode/trunk/extensions/README.extensions
Modified:
    ode/trunk/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java

Added: ode/trunk/extensions/README.extensions
URL: http://svn.apache.org/viewvc/ode/trunk/extensions/README.extensions?rev=584963&view=auto
==============================================================================
--- ode/trunk/extensions/README.extensions (added)
+++ ode/trunk/extensions/README.extensions Mon Oct 15 16:05:57 2007
@@ -0,0 +1 @@
+TODO
\ No newline at end of file

Modified: ode/trunk/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java
URL: http://svn.apache.org/viewvc/ode/trunk/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java?rev=584963&r1=584962&r2=584963&view=diff
==============================================================================
--- ode/trunk/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java (original)
+++ ode/trunk/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java Mon Oct 15 16:05:57 2007
@@ -21,6 +21,8 @@
 
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.concurrent.Executors;
 
@@ -31,16 +33,18 @@
 import javax.management.ObjectName;
 import javax.naming.InitialContext;
 import javax.transaction.TransactionManager;
+import javax.xml.namespace.QName;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ode.bpel.compiler.api.ExtensionValidator;
 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;
 import org.apache.ode.bpel.intercept.MessageExchangeInterceptor;
+import org.apache.ode.bpel.runtime.extension.AbstractExtensionBundle;
 import org.apache.ode.il.dbutil.Database;
 import org.apache.ode.il.dbutil.DatabaseConfigException;
 import org.apache.ode.jbi.msgmap.Mapper;
@@ -295,18 +299,28 @@
     }
 
  	private void registerExtensionActivityBundles() {
-        String listenersStr = _ode._config.getExtensionActivityBundles();
-        if (listenersStr != null) {
+        String extensionsStr = _ode._config.getExtensionActivityBundles();
+        if (extensionsStr != null) {
+        	Map<QName, ExtensionValidator> validators = new HashMap<QName, ExtensionValidator>();
         	// TODO replace StringTokenizer by regex
-        	for (StringTokenizer tokenizer = new StringTokenizer(listenersStr, ",;"); tokenizer.hasMoreTokens();)
{
+        	for (StringTokenizer tokenizer = new StringTokenizer(extensionsStr, ",;"); tokenizer.hasMoreTokens();)
{
                 String bundleCN = tokenizer.nextToken();
                 try {
-                    _ode._server.registerExtensionBundle((AbstractExtensionBundle) Class.forName(bundleCN).newInstance());
+                	// instantiate bundle
+                	AbstractExtensionBundle bundle = (AbstractExtensionBundle) Class.forName(bundleCN).newInstance();
+                	
+                	// register extension bundle (BPEL server)
+                	_ode._server.registerExtensionBundle(bundle);
+                	
+                	//add validators
+                	validators.putAll(bundle.getExtensionValidators());
                 } catch (Exception e) {
                     __log.warn("Couldn't register the extension bundle " + bundleCN + ",
the class couldn't be " +
                             "loaded properly.");
                 }
             }
+        	// register extension bundle (BPEL store)
+        	_ode._store.setExtensionValidators(validators);
         }
     }
 



Mime
View raw message