You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by ms...@apache.org on 2007/07/24 22:58:14 UTC

svn commit: r559204 [3/3] - in /incubator/ode/branches/bart: ./ axis2/src/main/java/org/apache/ode/axis2/ bpel-api/src/main/java/org/apache/ode/bpel/iapi/ bpel-epr/src/main/java/org/apache/ode/il/ bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ ...

Modified: incubator/ode/branches/bart/bpel-test/src/main/java/org/apache/ode/test/BPELTestAbstract.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/bpel-test/src/main/java/org/apache/ode/test/BPELTestAbstract.java?view=diff&rev=559204&r1=559203&r2=559204
==============================================================================
--- incubator/ode/branches/bart/bpel-test/src/main/java/org/apache/ode/test/BPELTestAbstract.java (original)
+++ incubator/ode/branches/bart/bpel-test/src/main/java/org/apache/ode/test/BPELTestAbstract.java Tue Jul 24 13:58:12 2007
@@ -26,6 +26,7 @@
 import org.apache.ode.bpel.iapi.MessageExchange.Status;
 import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
 import org.apache.ode.bpel.iapi.MyRoleMessageExchange.CorrelationStatus;
+import org.apache.ode.bpel.iapi.InvocationStyle;
 import org.apache.ode.bpel.iapi.ProcessStore;
 import org.apache.ode.bpel.iapi.ProcessStoreEvent;
 import org.apache.ode.bpel.iapi.ProcessStoreListener;
@@ -35,6 +36,7 @@
 import org.apache.ode.il.config.OdeConfigProperties;
 import org.apache.ode.store.ProcessConfImpl;
 import org.apache.ode.store.ProcessStoreImpl;
+import org.apache.ode.test.MockTransactionManager.TX;
 import org.apache.ode.utils.DOMUtils;
 import org.apache.ode.utils.GUID;
 import org.w3c.dom.Element;
@@ -85,6 +87,8 @@
     /** What's actually been deployed. */
     private List<Deployment> _deployed;
 
+    private MockTransactionManager _txm;
+
     @Override
     protected void setUp() throws Exception {
         _failures = new CopyOnWriteArrayList<Failure>();
@@ -99,32 +103,32 @@
             em = emf.createEntityManager();
             _cf = new BPELDAOConnectionFactoryImpl();
             _server.setDaoConnectionFactory(_cf);
-            scheduler = new MockScheduler() {
+            _txm = new MockTransactionManager() {
+
                 @Override
-                public void begin() {
-                    super.begin();
-                    em.getTransaction().begin();
+                protected void doBegin(TX tx) {
+                    // TODO Auto-generated method stub
+                    super.doBegin(tx);
                 }
 
                 @Override
-                public void commit() {
-                    super.commit();
+                protected void doCommit(TX tx) {
                     em.getTransaction().commit();
                 }
 
                 @Override
-                public void rollback() {
-                    super.rollback();
+                protected void doRollback(TX tx) {
                     em.getTransaction().rollback();
                 }
 
             };
+            scheduler = new MockScheduler(_txm);
         } else {
-            scheduler = new MockScheduler();
-            _cf = new BpelDAOConnectionFactoryImpl(scheduler);
+            _txm = new MockTransactionManager();
+            scheduler = new MockScheduler(_txm);
+            _cf = new BpelDAOConnectionFactoryImpl(_txm);
             _server.setDaoConnectionFactory(_cf);
         }
-        _server.setInMemDaoConnectionFactory(new BpelDAOConnectionFactoryImpl(scheduler));
         _server.setScheduler(scheduler);
         _server.setBindingContext(new BindingContextImpl());
         _server.setMessageExchangeContext(mexContext);
@@ -157,19 +161,18 @@
                 System.err.println("Error undeploying " + d);
             }
         }
-        
 
         if (em != null)
             em.close();
         if (emf != null)
             emf.close();
-        
+
         _server.stop();
         _failures = null;
         _deployed = null;
         _deployments = null;
         _invocations = null;
-        
+
     }
 
     protected void negative(String deployDir) throws Throwable {
@@ -238,7 +241,8 @@
         }
     }
 
-    protected Invocation addInvoke(String id, QName target, String operation, String request, String responsePattern) throws Exception {
+    protected Invocation addInvoke(String id, QName target, String operation, String request, String responsePattern)
+            throws Exception {
 
         Invocation inv = new Invocation(id);
         inv.target = target;
@@ -253,7 +257,7 @@
         _invocations.add(inv);
         return inv;
     }
-    
+
     protected void go() throws Exception {
         try {
             doDeployments();
@@ -270,13 +274,12 @@
         assertTrue(_failures.size() == 0);
     }
 
-    
     protected Deployment deploy(String location) {
         Deployment deployment = new Deployment(makeDeployDir(location));
         doDeployment(deployment);
         return deployment;
     }
-    
+
     protected void doDeployments() {
         for (Deployment d : _deployments)
             doDeployment(d);
@@ -292,7 +295,7 @@
 
         try {
             procs = store.deploy(d.deployDir);
-            
+
             _deployed.add(d);
         } catch (Exception ex) {
             if (d.expectedException == null) {
@@ -300,10 +303,9 @@
                 failure(d, "DEPLOY: Unexpected exception: " + ex, ex);
             } else if (!d.expectedException.isAssignableFrom(ex.getClass())) {
                 ex.printStackTrace();
-                failure(d, "DEPLOY: Wrong exception; expected " + d.expectedException + " but got " + ex.getClass(), ex);                
+                failure(d, "DEPLOY: Wrong exception; expected " + d.expectedException + " but got " + ex.getClass(), ex);
             }
 
-
             return;
         }
 
@@ -331,7 +333,7 @@
                 failure(d, "Undeployment failed.", ex);
             }
         }
-        
+
         _deployments.clear();
     }
 
@@ -341,6 +343,7 @@
             store.undeploy(d.deployDir);
         }
     }
+
     protected void doInvokes() throws Exception {
         ArrayList<Thread> testThreads = new ArrayList<Thread>();
         for (Invocation i : _invocations) {
@@ -386,17 +389,16 @@
     }
 
     /**
-     * Override this to provide configuration properties for Ode extensions 
-     * like BpelEventListeners.
+     * Override this to provide configuration properties for Ode extensions like BpelEventListeners.
      * 
      * @return
      */
     protected Properties getConfigProperties() {
-    	// could also return null, returning an empty properties 
-    	// object is more fail-safe.
-    	return new Properties();
+        // could also return null, returning an empty properties
+        // object is more fail-safe.
+        return new Properties();
     }
-    
+
     protected static class Failure {
         Object where;
 
@@ -528,17 +530,17 @@
             } catch (Exception ex) {
             }
 
-            scheduler.begin();
             try {
-                mex = _server.getEngine().createMessageExchange(new GUID().toString(), _invocation.target, _invocation.operation);
+                mex = _server.createMessageExchange(InvocationStyle.BLOCKING, _invocation.target, _invocation.operation, new GUID()
+                        .toString());
                 mexContext.clearCurrentResponse();
 
                 Message request = mex.createMessage(_invocation.requestType);
                 request.setMessage(_invocation.request);
                 _invocation.invokeTime = System.currentTimeMillis();
-                running = mex.invoke(request);
+                mex.setRequest(request);
+                Status status = mex.invokeBlocking();
 
-                Status status = mex.getStatus();
                 CorrelationStatus cstatus = mex.getCorrelationStatus();
                 if (_invocation.expectedStatus != null && !status.equals(_invocation.expectedStatus))
                     failure(_invocation, "Unexpected message exchange status", _invocation.expectedStatus, status);
@@ -553,19 +555,11 @@
                     failure(_invocation, "Unexpected invocation exception.", _invocation.expectedInvokeException, ex.getClass());
 
                 return;
-            } finally {
-                scheduler.commit();
             }
 
             if (isFailed())
                 return;
 
-            try {
-                running.get(_invocation.maximumWaitMs, TimeUnit.MILLISECONDS);
-            } catch (Exception ex) {
-                failure(_invocation, "Exception on future object.", ex);
-                return;
-            }
 
             long ctime = System.currentTimeMillis();
             long itime = ctime - _invocation.invokeTime;
@@ -578,28 +572,25 @@
             if (isFailed())
                 return;
 
-            scheduler.begin();
-            try {
-                Status finalstat = mex.getStatus();
-                if (_invocation.expectedFinalStatus != null && !_invocation.expectedFinalStatus.equals(finalstat))
-                    failure(_invocation, "Unexpected final message exchange status", _invocation.expectedFinalStatus, finalstat);
-
-                if (_invocation.expectedFinalCorrelationStatus != null
-                        && !_invocation.expectedFinalCorrelationStatus.equals(mex.getCorrelationStatus())) {
-                    failure(_invocation, "Unexpected final correlation status", _invocation.expectedFinalCorrelationStatus, mex
-                            .getCorrelationStatus());
-                }
-                if (_invocation.expectedResponsePattern != null) {
-                    if (mex.getResponse() == null)
-                        failure(_invocation, "Expected response, but got none.", null);
-                    String responseStr = DOMUtils.domToString(mex.getResponse().getMessage());
-                    Matcher matcher = _invocation.expectedResponsePattern.matcher(responseStr);
-                    if (!matcher.matches())
-                        failure(_invocation, "Response does not match expected pattern", _invocation.expectedResponsePattern, responseStr);
-                }
-            } finally {
-                scheduler.commit();
+            Status finalstat = mex.getStatus();
+            if (_invocation.expectedFinalStatus != null && !_invocation.expectedFinalStatus.equals(finalstat))
+                failure(_invocation, "Unexpected final message exchange status", _invocation.expectedFinalStatus, finalstat);
+
+            if (_invocation.expectedFinalCorrelationStatus != null
+                    && !_invocation.expectedFinalCorrelationStatus.equals(mex.getCorrelationStatus())) {
+                failure(_invocation, "Unexpected final correlation status", _invocation.expectedFinalCorrelationStatus, mex
+                        .getCorrelationStatus());
+            }
+            if (_invocation.expectedResponsePattern != null) {
+                if (mex.getResponse() == null)
+                    failure(_invocation, "Expected response, but got none.", null);
+                String responseStr = DOMUtils.domToString(mex.getResponse().getMessage());
+                Matcher matcher = _invocation.expectedResponsePattern.matcher(responseStr);
+                if (!matcher.matches())
+                    failure(_invocation, "Response does not match expected pattern", _invocation.expectedResponsePattern,
+                            responseStr);
             }
+
         }
     }
 }

Modified: incubator/ode/branches/bart/bpel-test/src/main/java/org/apache/ode/test/MessageExchangeContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/bpel-test/src/main/java/org/apache/ode/test/MessageExchangeContextImpl.java?view=diff&rev=559204&r1=559203&r2=559204
==============================================================================
--- incubator/ode/branches/bart/bpel-test/src/main/java/org/apache/ode/test/MessageExchangeContextImpl.java (original)
+++ incubator/ode/branches/bart/bpel-test/src/main/java/org/apache/ode/test/MessageExchangeContextImpl.java Tue Jul 24 13:58:12 2007
@@ -40,7 +40,12 @@
 
 import org.apache.ode.bpel.iapi.BpelEngineException;
 import org.apache.ode.bpel.iapi.ContextException;
+import org.apache.ode.bpel.iapi.EndpointReference;
+import org.apache.ode.bpel.iapi.InvocationStyle;
 import org.apache.ode.bpel.iapi.Message;
+import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
+import org.apache.ode.bpel.iapi.PartnerRoleChannel;
+import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange;
 import org.apache.ode.bpel.iapi.MessageExchange.Status;
 import org.apache.ode.bpel.iapi.MessageExchangeContext;
 import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
@@ -51,6 +56,7 @@
 
 import javax.xml.namespace.QName;
 import java.io.IOException;
+import java.util.Set;
 
 /**
  * This is a simple MessageExchangeContext implementation
@@ -177,5 +183,40 @@
 	public void clearCurrentResponse() {
 		currentResponse = null;
 	}
+
+    public void cancel(PartnerRoleMessageExchange mex) throws ContextException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public Set<InvocationStyle> getSupportedInvocationStyle(PartnerRoleChannel prc, EndpointReference partnerEpr) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void invokePartnerAsynch(PartnerRoleMessageExchange mex) throws ContextException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void invokePartnerBlocking(PartnerRoleMessageExchange mex) throws ContextException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void invokePartnerReliable(PartnerRoleMessageExchange mex) throws ContextException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void invokePartnerTransacted(PartnerRoleMessageExchange mex) throws ContextException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void onReliableReply(MyRoleMessageExchange myRoleMex) throws BpelEngineException {
+        // TODO Auto-generated method stub
+        
+    }
 
 }

Modified: incubator/ode/branches/bart/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java?view=diff&rev=559204&r1=559203&r2=559204
==============================================================================
--- incubator/ode/branches/bart/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java (original)
+++ incubator/ode/branches/bart/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java Tue Jul 24 13:58:12 2007
@@ -19,6 +19,12 @@
 
 package org.apache.ode.daohib.bpel;
 
+import java.util.Collections;
+import java.util.Date;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
 import org.apache.ode.bpel.dao.MessageDAO;
 import org.apache.ode.bpel.dao.MessageExchangeDAO;
 import org.apache.ode.bpel.dao.PartnerLinkDAO;
@@ -33,14 +39,10 @@
 import org.apache.ode.utils.DOMUtils;
 import org.w3c.dom.Element;
 
-import javax.xml.namespace.QName;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Set;
-
 public class MessageExchangeDaoImpl extends HibernateDao implements MessageExchangeDAO {
 
     private HMessageExchange _hself;
+    
 
     // Used when provided process and instance aren't hibernate implementations. The relation
     // therefore can't be persisted. Used for in-mem DAOs so that doesn't matter much. 
@@ -298,15 +300,35 @@
         return Collections.unmodifiableSet(_hself.getProperties().keySet());
     }
 
-    public String getPipedMessageExchangeId() {
-        return _hself.getPipedMessageExchangeId();
+    public void release() {
+        // no-op for now, could be used to do some cleanup
     }
 
-    public void setPipedMessageExchangeId(String mexId) {
-        _hself.setPipedMessageExchangeId(mexId);
+    public String getInvocationStyle() {
+        return _hself.getInvocationStyle();
     }
 
-    public void release() {
-        // no-op for now, could be used to do some cleanup
+    public MessageExchangeDAO getPipedMessageExchange() {
+        return new MessageExchangeDaoImpl(_sm,_hself.getPipedMessageExchange());
+    }
+
+    public long getTimeout() {
+        return _hself.getTimeout();
+    }
+
+    public void setFailureType(String failureType) {
+        _hself.setFailureType(failureType);
+    }
+
+    public void setInvocationStyle(String invocationStyle) {
+        _hself.setInvocationStyle(invocationStyle);
+    }
+
+    public void setPipedMessageExchange(MessageExchangeDAO mexId) {
+        _hself.setPipedMesageExchange(((MessageExchangeDaoImpl)mexId)._hself);
+    }
+
+    public void setTimeout(long timeout) {
+        _hself.setTimeout(timeout);
     }
 }

Modified: incubator/ode/branches/bart/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/hobj/HMessageExchange.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/hobj/HMessageExchange.java?view=diff&rev=559204&r1=559203&r2=559204
==============================================================================
--- incubator/ode/branches/bart/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/hobj/HMessageExchange.java (original)
+++ incubator/ode/branches/bart/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/hobj/HMessageExchange.java Tue Jul 24 13:58:12 2007
@@ -70,10 +70,16 @@
 
     private String _callee;
 
-    private String _pipedMessageExchangeId;
-
+    private HMessageExchange _p2pPeer;
+    
     private Map<String, String> _properties = new HashMap<String, String>();
 
+    private long _timeout;
+
+    private String _istyle;
+
+    private String _failureType;
+
     /**
      * 
      */
@@ -324,14 +330,52 @@
         return _partnerLink;
     }
 
+    
+    /**
+     * @hibernate.property column="TIMEOUT"
+     * 
+     */
+    public long getTimeout() {
+        return _timeout; 
+    }
+    
+    public void setTimeout(long timeout) {
+        _timeout = timeout;
+    }
+
+    /**
+     * @hibernate.property column="ISTYLE"
+     */
+    public String getInvocationStyle() {
+        return _istyle;
+    }
+
     /**
-     * @hibernate.property column="PIPED_ID"
+     * @hibernate.many-to-one column="P2P_PEER"
+     * @return
+     */
+    public HMessageExchange getPipedMessageExchange() {
+        return _p2pPeer;
+    }
+    
+    public void setPipedMesageExchange(HMessageExchange p2ppeer) {
+        _p2pPeer = p2ppeer;
+    }
+
+    public void setFailureType(String failureType) {
+        _failureType = failureType;
+    }
+    
+    /**
+     * @hibernate.property column="FAILURE_TYPE"
+     * @return
      */
-    public String getPipedMessageExchangeId() {
-        return _pipedMessageExchangeId;
+    public String getFailureType() {
+        return _failureType;
     }
 
-    public void setPipedMessageExchangeId(String pipedMessageExchangeId) {
-        _pipedMessageExchangeId = pipedMessageExchangeId;
+    public void setInvocationStyle(String invocationStyle) {
+        _istyle = invocationStyle;
     }
+    
 }

Modified: incubator/ode/branches/bart/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageExchangeDAOImpl.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageExchangeDAOImpl.java?view=diff&rev=559204&r1=559203&r2=559204
==============================================================================
--- incubator/ode/branches/bart/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageExchangeDAOImpl.java (original)
+++ incubator/ode/branches/bart/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageExchangeDAOImpl.java Tue Jul 24 13:58:12 2007
@@ -100,13 +100,26 @@
 	private PartnerLinkDAOImpl _partnerLink;
 	@ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="PROCESS_ID")
 	private ProcessDAOImpl _process;
-	@OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.ALL}) @Column(name="REQUEST_MESSAGE_ID")
+	@OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="REQUEST_MESSAGE_ID")
 	private MessageDAOImpl _request;
-	@OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.ALL}) @Column(name="RESPONSE_MESSAGE_ID")
+    @OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="RESPONSE_MESSAGE_ID")
 	private MessageDAOImpl _response;
 
     @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="CORR_ID")
     private CorrelatorDAOImpl _correlator;
+    
+    
+    @Basic @Column(name="ISTYLE")
+    private String _istyle;
+
+    @OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="P2P_PIPE_PEER")
+    private MessageExchangeDAO _pipedMex;
+    
+    @Basic @Column(name="TIMEOUT")
+    private long _timeout;
+    
+    @Basic @Column(name="FAILURE_TYPE")
+    private String _failureType;
 
     public MessageExchangeDAOImpl() {}
     
@@ -338,5 +351,34 @@
 
     public void setCorrelator(CorrelatorDAOImpl correlator) {
         _correlator = correlator;
+    }
+
+    public String getInvocationStyle() {
+        return _istyle;
+    }
+
+    public MessageExchangeDAO getPipedMessageExchange() {
+        return _pipedMex;
+    }
+
+    public long getTimeout() {
+        return _timeout;
+    }
+
+    public void setFailureType(String failureType) {
+        _failureType = failureType;
+    }
+
+    public void setInvocationStyle(String invocationStyle) {
+        _istyle = invocationStyle;
+    }
+
+    public void setPipedMessageExchange(MessageExchangeDAO mex) {
+        _pipedMex = mex;
+    }
+
+    public void setTimeout(long timeout) {
+        // TODO Auto-generated method stub
+        
     }
 }

Modified: incubator/ode/branches/bart/jbi/src/main/java/org/apache/ode/jbi/OdeContext.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/jbi/src/main/java/org/apache/ode/jbi/OdeContext.java?view=diff&rev=559204&r1=559203&r2=559204
==============================================================================
--- incubator/ode/branches/bart/jbi/src/main/java/org/apache/ode/jbi/OdeContext.java (original)
+++ incubator/ode/branches/bart/jbi/src/main/java/org/apache/ode/jbi/OdeContext.java Tue Jul 24 13:58:12 2007
@@ -18,6 +18,22 @@
  */
 package org.apache.ode.jbi;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutorService;
+
+import javax.jbi.component.ComponentContext;
+import javax.jbi.messaging.DeliveryChannel;
+import javax.jbi.messaging.NormalizedMessage;
+import javax.sql.DataSource;
+import javax.transaction.TransactionManager;
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.wsdl.factory.WSDLFactory;
+import javax.xml.namespace.QName;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ode.bpel.dao.BpelDAOConnectionFactory;
@@ -27,27 +43,12 @@
 import org.apache.ode.bpel.o.OPartnerLink;
 import org.apache.ode.bpel.o.OProcess;
 import org.apache.ode.bpel.o.Serializer;
-import org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl;
 import org.apache.ode.jbi.msgmap.Mapper;
 import org.apache.ode.jbi.util.WSDLFlattener;
+import org.apache.ode.scheduler.simple.SimpleScheduler;
 import org.apache.ode.store.ProcessStoreImpl;
 import org.w3c.dom.Document;
 
-import javax.jbi.component.ComponentContext;
-import javax.jbi.messaging.DeliveryChannel;
-import javax.jbi.messaging.NormalizedMessage;
-import javax.sql.DataSource;
-import javax.transaction.TransactionManager;
-import javax.wsdl.Definition;
-import javax.wsdl.Operation;
-import javax.wsdl.factory.WSDLFactory;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ExecutorService;
-
 /**
  * Encapsulation of all the junk needed to get the BPEL engine running.
  *
@@ -80,7 +81,6 @@
 
     MessageExchangeContextImpl _mexContext;
 
-    QuartzSchedulerImpl _scheduler;
 
     ExecutorService _executorService;
 
@@ -94,6 +94,8 @@
 
     /** Mapping of Endpoint to OdeService */
     private Map<Endpoint, OdeService> _activeOdeServices = new ConcurrentHashMap<Endpoint, OdeService>();
+
+    public SimpleScheduler _scheduler;
 
     /**
      * Gets the delivery channel.

Modified: incubator/ode/branches/bart/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/ode/branches/bart/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java?view=diff&rev=559204&r1=559203&r2=559204
==============================================================================
--- incubator/ode/branches/bart/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java (original)
+++ incubator/ode/branches/bart/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java Tue Jul 24 13:58:12 2007
@@ -19,31 +19,34 @@
 
 package org.apache.ode.jbi;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.StringTokenizer;
+import java.util.concurrent.Executors;
+
+import javax.jbi.JBIException;
+import javax.jbi.component.ComponentContext;
+import javax.jbi.component.ComponentLifeCycle;
+import javax.jbi.component.ServiceUnitManager;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.transaction.TransactionManager;
+
 import org.apache.commons.logging.Log;
 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.engine.BpelServerImpl;
 import org.apache.ode.bpel.iapi.BpelEventListener;
-import org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl;
 import org.apache.ode.il.dbutil.Database;
 import org.apache.ode.il.dbutil.DatabaseConfigException;
 import org.apache.ode.jbi.msgmap.Mapper;
+import org.apache.ode.scheduler.simple.JdbcDelegate;
+import org.apache.ode.scheduler.simple.SimpleScheduler;
 import org.apache.ode.store.ProcessStoreImpl;
+import org.apache.ode.utils.GUID;
 import org.apache.ode.utils.fs.TempFileManager;
 
-import javax.jbi.JBIException;
-import javax.jbi.component.ComponentContext;
-import javax.jbi.component.ComponentLifeCycle;
-import javax.jbi.component.ServiceUnitManager;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-import javax.transaction.TransactionManager;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.util.StringTokenizer;
-import java.util.concurrent.Executors;
-
 /**
  * This class implements ComponentLifeCycle. The JBI framework will start this engine class automatically when JBI framework starts
  * up.
@@ -194,12 +197,9 @@
             _ode._executorService = Executors.newCachedThreadPool();
         else
             _ode._executorService = Executors.newFixedThreadPool(_ode._config.getThreadPoolMaxSize());
-        _ode._scheduler = new QuartzSchedulerImpl();
+        _ode._scheduler = new SimpleScheduler(new GUID().toString(), new JdbcDelegate(_ode._dataSource));
         _ode._scheduler.setJobProcessor(_ode._server);
-        _ode._scheduler.setExecutorService(_ode._executorService, 20);
         _ode._scheduler.setTransactionManager((TransactionManager) _ode.getContext().getTransactionManager());
-        _ode._scheduler.setDataSource(_ode._dataSource);
-        _ode._scheduler.init();
 
         _ode._store = new ProcessStoreImpl(_ode._dataSource, _ode._config.getDAOConnectionFactory(), false);
         _ode._store.loadAll();