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/09/06 07:46:57 UTC
svn commit: r573153 [1/9] - in /ode/trunk: ./
axis2/src/main/java/org/apache/ode/axis2/ bpel-api/src/
bpel-api/src/main/java/org/apache/ode/bpel/explang/
bpel-api/src/main/java/org/apache/ode/bpel/iapi/
bpel-api/src/main/java/org/apache/ode/bpel/pmapi/...
Author: mszefler
Date: Wed Sep 5 22:46:42 2007
New Revision: 573153
URL: http://svn.apache.org/viewvc?rev=573153&view=rev
Log:
Merged BART branch into trunk.
Added:
ode/trunk/DISCLAIMER
- copied unchanged from r573151, ode/branches/bart/DISCLAIMER
ode/trunk/bpel-api/src/.cvsignore
- copied unchanged from r573151, ode/branches/bart/bpel-api/src/.cvsignore
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/InvocationStyle.java
- copied unchanged from r573151, ode/branches/bart/bpel-api/src/main/java/org/apache/ode/bpel/iapi/InvocationStyle.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEventListener.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEventListener.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelInstanceWorker.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelInstanceWorker.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelInstanceWorkerCache.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelInstanceWorkerCache.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DbBackedMessageImpl.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DbBackedMessageImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MemBackedMessageImpl.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MemBackedMessageImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MexDaoUtil.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MexDaoUtil.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MyRoleMessageExchangeCache.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MyRoleMessageExchangeCache.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MyRoleMessageExchangeImpl.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MyRoleMessageExchangeImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ReliableMyRoleMessageExchangeImpl.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ReliableMyRoleMessageExchangeImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ReliablePartnerRoleMessageExchangeImpl.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ReliablePartnerRoleMessageExchangeImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/TransactedMyRoleMessageExchangeImpl.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/TransactedMyRoleMessageExchangeImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/TransactedPartnerRoleMessageExchangeImpl.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/TransactedPartnerRoleMessageExchangeImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/UnreliableMyRoleMessageExchangeImpl.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/UnreliableMyRoleMessageExchangeImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/UnreliablePartnerRoleMessageExchangeImpl.java
- copied unchanged from r573151, ode/branches/bart/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/UnreliablePartnerRoleMessageExchangeImpl.java
ode/trunk/bpel-test/src/main/java/org/apache/ode/test/MockTransactionManager.java
- copied unchanged from r573151, ode/branches/bart/bpel-test/src/main/java/org/apache/ode/test/MockTransactionManager.java
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/
- copied from r573151, ode/branches/bart/bpel-test/src/test/resources/bpel/2.0/TestCounter/
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.bpel
- copied unchanged from r573151, ode/branches/bart/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.bpel
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.cbp
- copied unchanged from r573151, ode/branches/bart/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.cbp
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.wsdl
- copied unchanged from r573151, ode/branches/bart/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.wsdl
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/deploy.xml
- copied unchanged from r573151, ode/branches/bart/bpel-test/src/test/resources/bpel/2.0/TestCounter/deploy.xml
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/test.properties
- copied unchanged from r573151, ode/branches/bart/bpel-test/src/test/resources/bpel/2.0/TestCounter/test.properties
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestImplicitFaultHandler/test.properties
- copied unchanged from r573151, ode/branches/bart/bpel-test/src/test/resources/bpel/2.0/TestImplicitFaultHandler/test.properties
ode/trunk/dao-hibernate/src/.cvsignore
- copied unchanged from r573151, ode/branches/bart/dao-hibernate/src/.cvsignore
ode/trunk/distro/dynpartner.sh
- copied unchanged from r573151, ode/branches/bart/distro/dynpartner.sh
ode/trunk/distro/helloworld.sh
- copied unchanged from r573151, ode/branches/bart/distro/helloworld.sh
ode/trunk/distro/magicsession.sh
- copied unchanged from r573151, ode/branches/bart/distro/magicsession.sh
ode/trunk/distro/src/bin/
- copied from r573151, ode/branches/bart/distro/src/bin/
ode/trunk/distro/src/bin/bpelc
- copied unchanged from r573151, ode/branches/bart/distro/src/bin/bpelc
ode/trunk/distro/src/bin/bpelc.bat
- copied unchanged from r573151, ode/branches/bart/distro/src/bin/bpelc.bat
ode/trunk/distro/src/bin/sendsoap
- copied unchanged from r573151, ode/branches/bart/distro/src/bin/sendsoap
ode/trunk/distro/src/bin/sendsoap.bat
- copied unchanged from r573151, ode/branches/bart/distro/src/bin/sendsoap.bat
Removed:
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelEngine.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/InstanceLockManager.java
ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/engine/InstanceLockManagerTest.java
ode/trunk/bpel-store/src/test/resources/log4j.properties
ode/trunk/doap_ODE.rdf
ode/trunk/jbi/src/main/java/org/apache/ode/jbi/OdeConsumerAsync.java
ode/trunk/jbi/src/main/java/org/apache/ode/jbi/OdeConsumerSync.java
ode/trunk/jbi/src/test/resources/log4j.properties
Modified:
ode/trunk/Rakefile
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/MessageExchangeContextImpl.java
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/explang/EvaluationContext.java
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/EndpointReference.java
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchange.java
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchangeContext.java
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MyRoleMessageExchange.java
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleChannel.java
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleMessageExchange.java
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/Scheduler.java
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/pmapi/InstanceManagement.java
ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/pmapi/ProcessManagement.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGenerator.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/InvokeGenerator.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/InvokeGeneratorMessages.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/PickGeneratorMessages.java
ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/WSDLRegistry.java
ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/WSDLRegistryTest.java
ode/trunk/bpel-dao/src/main/java/org/apache/ode/bpel/dao/BpelDAOConnection.java
ode/trunk/bpel-dao/src/main/java/org/apache/ode/bpel/dao/MessageDAO.java
ode/trunk/bpel-dao/src/main/java/org/apache/ode/bpel/dao/MessageExchangeDAO.java
ode/trunk/bpel-dao/src/main/java/org/apache/ode/bpel/dao/ProcessInstanceDAO.java
ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/MockScheduler.java
ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OFaultHandler.java
ode/trunk/bpel-ql/src/main/java/org/apache/ode/ql/jcc/TreeBuilder.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelDatabase.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelManagementFacadeImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcessDatabase.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Contexts.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DebuggerSupport.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/InterceptorContextImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MessageExchangeImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MessageImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Messages.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/NStateLatch.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkMyRoleImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkPartnerRoleImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkRoleImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerRoleMessageExchangeImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/WorkEvent.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/FaultMessageExchangeException.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/InterceptorInvoker.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/MessageExchangeInterceptor.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/NoOpInterceptor.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/ThrottlingInterceptor.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/BpelDAOConnectionFactoryImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/BpelDAOConnectionImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageDAOImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageExchangeDAOImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessInstanceDaoImpl.java
ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/REPLY.java
ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java
ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/ProcessManagementTest.java
ode/trunk/bpel-test/src/main/java/org/apache/ode/test/BPELTestAbstract.java
ode/trunk/bpel-test/src/main/java/org/apache/ode/test/MessageExchangeContextImpl.java
ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BasicActivities20Test.java
ode/trunk/bpel-test/src/test/java/org/apache/ode/test/CompensationHandling20Test.java
ode/trunk/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFaultHandlers/testFaultHandlers.bpel
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity1/TestActivityFlow.bpel
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity2/TestActivityFlow.bpel
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.wsdl
ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/BpelDAOConnectionImpl.java
ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageDaoImpl.java
ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageExchangeDaoImpl.java
ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/ProcessInstanceDaoImpl.java
ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/hobj/HMessage.java
ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/hobj/HMessageExchange.java
ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/hobj/HProcessInstance.java
ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/ql/HibernateInstancesQueryCompiler.java
ode/trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/BPELDAOConnectionImpl.java
ode/trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageDAOImpl.java
ode/trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageExchangeDAOImpl.java
ode/trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ProcessInstanceDAOImpl.java
ode/trunk/jacob/src/main/java/org/apache/ode/jacob/vpu/JacobMessages.java
ode/trunk/jbi/src/main/java/org/apache/ode/jbi/MessageExchangeContextImpl.java
ode/trunk/jbi/src/main/java/org/apache/ode/jbi/OdeConsumer.java
ode/trunk/jbi/src/main/java/org/apache/ode/jbi/OdeContext.java
ode/trunk/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java
ode/trunk/jbi/src/main/java/org/apache/ode/jbi/OdeService.java
ode/trunk/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SimpleScheduler.java
ode/trunk/scheduler-simple/src/test/java/org/apache/ode/scheduler/simple/JdbcDelegateTest.java
ode/trunk/scheduler-simple/src/test/java/org/apache/ode/scheduler/simple/SchedulerThreadTest.java
ode/trunk/scheduler-simple/src/test/java/org/apache/ode/scheduler/simple/SimpleSchedulerTest.java
Modified: ode/trunk/Rakefile
URL: http://svn.apache.org/viewvc/ode/trunk/Rakefile?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/Rakefile (original)
+++ ode/trunk/Rakefile Wed Sep 5 22:46:42 2007
@@ -236,7 +236,7 @@
compile.from apt
compile.with projects("bpel-api", "bpel-compiler", "bpel-dao", "bpel-obj", "bpel-schemas",
"bpel-store", "jacob", "jacob-ap", "utils"),
- COMMONS.logging, COMMONS.collections, JAXEN, JAVAX.persistence, JAVAX.stream, SAXON, WSDL4J, XMLBEANS
+ COMMONS.logging, COMMONS.collections, JAXEN, JAVAX.persistence, JAVAX.stream, SAXON, WSDL4J, XMLBEANS, JAVAX.transaction
test.with projects("scheduler-simple", "dao-jpa", "dao-hibernate", "bpel-epr"),
BACKPORT, COMMONS.pool, COMMONS.lang, DERBY, JAVAX.connector, JAVAX.transaction,
@@ -283,7 +283,7 @@
define "bpel-test" do
compile.with projects("bpel-api", "bpel-compiler", "bpel-dao", "bpel-runtime",
"bpel-store", "utils", "bpel-epr", "dao-jpa"),
- DERBY, Java::JUnit::JUNIT_REQUIRES, JAVAX.persistence, OPENJPA, WSDL4J
+ DERBY, Java::JUnit::JUNIT_REQUIRES, JAVAX.persistence, OPENJPA, WSDL4J, JAVAX.transaction
test.with projects("bpel-obj", "jacob", "bpel-schemas",
"bpel-scripts", "scheduler-simple"),
Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java Wed Sep 5 22:46:42 2007
@@ -19,6 +19,12 @@
package org.apache.ode.axis2;
+import java.util.concurrent.Callable;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.xml.namespace.QName;
+
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
@@ -38,26 +44,19 @@
import org.apache.ode.bpel.iapi.BpelServer;
import org.apache.ode.bpel.iapi.Message;
import org.apache.ode.bpel.iapi.MessageExchange;
-import org.apache.ode.bpel.iapi.MessageExchange.FailureType;
import org.apache.ode.bpel.iapi.PartnerRoleChannel;
import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange;
import org.apache.ode.bpel.iapi.Scheduler;
+import org.apache.ode.bpel.iapi.MessageExchange.FailureType;
import org.apache.ode.utils.DOMUtils;
import org.apache.ode.utils.Namespaces;
import org.apache.ode.utils.uuid.UUID;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import javax.wsdl.Definition;
-import javax.wsdl.Operation;
-import javax.xml.namespace.QName;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-
/**
- * Acts as a service not provided by ODE. Used mainly for invocation as a way to maintain the WSDL decription of used
- * services.
- *
+ * Acts as a service not provided by ODE. Used mainly for invocation as a way to maintain the WSDL decription of used services.
+ *
* @author Matthieu Riou <mriou at apache dot org>
*/
public class ExternalService implements PartnerRoleChannel {
@@ -68,22 +67,27 @@
private static ThreadLocal<CachedServiceClient> _cachedClients = new ThreadLocal<CachedServiceClient>();
- private ExecutorService _executorService;
private Definition _definition;
+
private QName _serviceName;
+
private String _portName;
+
private AxisConfiguration _axisConfig;
+
private boolean _isReplicateEmptyNS = false;
+
private SoapMessageConverter _converter;
+
private Scheduler _sched;
+
private BpelServer _server;
- public ExternalService(Definition definition, QName serviceName, String portName, ExecutorService executorService,
- AxisConfiguration axisConfig, Scheduler sched, BpelServer server) throws AxisFault {
+ public ExternalService(Definition definition, QName serviceName, String portName, AxisConfiguration axisConfig,
+ Scheduler sched, BpelServer server) throws AxisFault {
_definition = definition;
_serviceName = serviceName;
_portName = portName;
- _executorService = executorService;
_axisConfig = axisConfig;
_sched = sched;
_converter = new SoapMessageConverter(definition, serviceName, portName, _isReplicateEmptyNS);
@@ -101,8 +105,7 @@
_converter.createSoapRequest(mctx, odeMex.getRequest().getMessage(), odeMex.getOperation());
SOAPEnvelope soapEnv = mctx.getEnvelope();
- EndpointReference axisEPR = new EndpointReference(((MutableEndpoint) odeMex.getEndpointReference())
- .getUrl());
+ EndpointReference axisEPR = new EndpointReference(((MutableEndpoint) odeMex.getEndpointReference()).getUrl());
if (__log.isDebugEnabled()) {
__log.debug("Axis2 sending message to " + axisEPR.getAddress() + " using MEX " + odeMex);
__log.debug("Message: " + soapEnv);
@@ -119,7 +122,7 @@
cached = new CachedServiceClient();
ConfigurationContext ctx = new ConfigurationContext(_axisConfig);
cached._client = new ServiceClient(ctx, null);
- cached._expire = now+EXPIRE_SERVICE_CLIENT;
+ cached._expire = now + EXPIRE_SERVICE_CLIENT;
_cachedClients.set(cached);
}
final OperationClient operationClient = cached._client.createClient(isTwoWay ? ServiceClient.ANON_OUT_IN_OP
@@ -132,51 +135,22 @@
final String mexId = odeMex.getMessageExchangeId();
final Operation operation = odeMex.getOperation();
- // Defer the invoke until the transaction commits.
- _sched.registerSynchronizer(new Scheduler.Synchronizer() {
-
- public void afterCompletion(boolean success) {
- // If the TX is rolled back, then we don't send the request.
- if (!success)
- return;
-
- // The invocation must happen in a separate thread, holding on the afterCompletion
- // blocks other operations that could have been listed there as well.
- _executorService.submit(new Callable<Object>() {
- public Object call() throws Exception {
- try {
- operationClient.execute(true);
- MessageContext response = operationClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
- MessageContext flt = operationClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_FAULT_VALUE);
- if (flt != null) {
- reply(mexId, operation, flt, true);
- } else {
- reply(mexId, operation, response, false);
- }
- } catch (Throwable t) {
- String errmsg = "Error sending message (mex=" + odeMex + "): " + t.getMessage();
- __log.error(errmsg, t);
- replyWithFailure(mexId, MessageExchange.FailureType.COMMUNICATION_ERROR, errmsg, null);
- }
- return null;
- }
- });
+ try {
+ operationClient.execute(true);
+ MessageContext response = operationClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+ MessageContext flt = operationClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_FAULT_VALUE);
+ if (flt != null) {
+ reply(mexId, operation, flt, true);
+ } else {
+ reply(mexId, operation, response, false);
}
-
- public void beforeCompletion() {
- }
-
- });
- odeMex.replyAsync();
-
- } else /** one-way case * */
- {
- _executorService.submit(new Callable<Object>() {
- public Object call() throws Exception {
- operationClient.execute(false);
- return null;
- }
- });
+ } catch (Throwable t) {
+ String errmsg = "Error sending message to Axis2 for ODE mex " + odeMex;
+ __log.error(errmsg, t);
+ replyWithFailure(mexId, MessageExchange.FailureType.COMMUNICATION_ERROR, errmsg, null);
+ }
+ } else /* one-way case */{
+ operationClient.execute(false);
odeMex.replyOneWayOk();
}
} catch (AxisFault axisFault) {
@@ -225,8 +199,7 @@
if (myRoleEPR != null) {
if (myRoleSessionId != null) {
if (__log.isDebugEnabled()) {
- __log.debug("MyRole session identifier found for myrole (callback) WSA endpoint: "
- + myRoleSessionId);
+ __log.debug("MyRole session identifier found for myrole (callback) WSA endpoint: " + myRoleSessionId);
}
myRoleEPR.setSessionId(myRoleSessionId);
}
@@ -275,20 +248,12 @@
return _serviceName;
}
- private void replyWithFailure(final String odeMexId, final FailureType error, final String errmsg,
- final Element details) {
- // ODE MEX needs to be invoked in a TX.
+ private void replyWithFailure(final String odeMexId, final FailureType error, final String errmsg, final Element details) {
try {
- _sched.execIsolatedTransaction(new Callable<Void>() {
- public Void call() throws Exception {
- PartnerRoleMessageExchange odeMex = (PartnerRoleMessageExchange) _server.getEngine().getMessageExchange(odeMexId);
- odeMex.replyWithFailure(error, errmsg, details);
- return null;
- }
- });
-
+ PartnerRoleMessageExchange odeMex = (PartnerRoleMessageExchange) _server.getMessageExchange(odeMexId);
+ odeMex.replyWithFailure(error, errmsg, details);
} catch (Exception e) {
- String emsg = "Error executing replyWithFailure transaction; reply will be lost.";
+ String emsg = "Error executing replyWithFailure; reply will be lost.";
__log.error(emsg, e);
}
@@ -313,47 +278,39 @@
return;
}
- // ODE MEX needs to be invoked in a TX.
try {
- _sched.execIsolatedTransaction(new Callable<Void>() {
- public Void call() throws Exception {
- PartnerRoleMessageExchange odeMex = (PartnerRoleMessageExchange) _server.getEngine().getMessageExchange(odeMexId);
- Message response = fault ? odeMex.createMessage(odeMex.getOperation().getFault(
- faultType.getLocalPart()).getMessage().getQName()) : odeMex.createMessage(odeMex
- .getOperation().getOutput().getMessage().getQName());
- try {
+ PartnerRoleMessageExchange odeMex = (PartnerRoleMessageExchange) _server.getMessageExchange(odeMexId);
+ Message response = fault ? odeMex.createMessage(odeMex.getOperation().getFault(faultType.getLocalPart()).getMessage()
+ .getQName()) : odeMex.createMessage(odeMex.getOperation().getOutput().getMessage().getQName());
+ try {
+ if (__log.isDebugEnabled()) {
+ __log.debug("Received response for MEX " + odeMex);
+ }
+ response.setMessage(odeMsgEl);
+ if (fault) {
+ if (faultType != null) {
if (__log.isDebugEnabled()) {
- __log.debug("Received response for MEX " + odeMex);
+ __log.debug("FAULT RESPONSE(" + faultType + "): " + DOMUtils.domToString(odeMsgEl));
}
- response.setMessage(odeMsgEl);
- if (fault) {
- if (faultType != null) {
- if (__log.isDebugEnabled()) {
- __log.debug("FAULT RESPONSE(" + faultType + "): " + DOMUtils.domToString(odeMsgEl));
- }
- odeMex.replyWithFault(faultType, response);
- } else {
- if (__log.isDebugEnabled()) {
- __log.debug("FAULT RESPONSE(unknown fault type): " + DOMUtils.domToString(odeMsgEl));
- }
- odeMex.replyWithFailure(FailureType.OTHER, reply.getEnvelope().getBody()
- .getFault().getText(), null);
- }
- } else {
- if (__log.isDebugEnabled()) {
- __log.debug("RESPONSE (NORMAL): " + DOMUtils.domToString(odeMsgEl));
- }
- odeMex.reply(response);
-
+ odeMex.replyWithFault(faultType, response);
+ } else {
+ if (__log.isDebugEnabled()) {
+ __log.debug("FAULT RESPONSE(unknown fault type): " + DOMUtils.domToString(odeMsgEl));
}
- } catch (Exception ex) {
- String errmsg = "Unable to process response: " + ex.getMessage();
- __log.error(errmsg, ex);
- odeMex.replyWithFailure(FailureType.OTHER, errmsg, null);
+ odeMex.replyWithFailure(FailureType.OTHER, reply.getEnvelope().getBody().getFault().getText(), null);
}
- return null;
+ } else {
+ if (__log.isDebugEnabled()) {
+ __log.debug("RESPONSE (NORMAL): " + DOMUtils.domToString(odeMsgEl));
+ }
+ odeMex.reply(response);
+
}
- });
+ } catch (Exception ex) {
+ String errmsg = "Unable to process response: " + ex.getMessage();
+ __log.error(errmsg, ex);
+ odeMex.replyWithFailure(FailureType.OTHER, errmsg, null);
+ }
} catch (Exception e) {
String errmsg = "Error executing reply transaction; reply will be lost.";
@@ -364,6 +321,7 @@
// INNER CLASS
static class CachedServiceClient {
ServiceClient _client;
+
long _expire;
}
Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/MessageExchangeContextImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/MessageExchangeContextImpl.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/MessageExchangeContextImpl.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/MessageExchangeContextImpl.java Wed Sep 5 22:46:42 2007
@@ -19,12 +19,19 @@
package org.apache.ode.axis2;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
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.MessageExchangeContext;
import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
+import org.apache.ode.bpel.iapi.PartnerRoleChannel;
import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange;
/**
@@ -35,28 +42,57 @@
public class MessageExchangeContextImpl implements MessageExchangeContext {
private static final Log __log = LogFactory.getLog(MessageExchangeContextImpl.class);
-
- private ODEServer _server;
-
+
+ /** The currently supported invocation styles. */
+ private static final Set<InvocationStyle> __supportedInvocationStyles;
+
+ static {
+ HashSet<InvocationStyle> styles = new HashSet<InvocationStyle>();
+ styles.add(InvocationStyle.UNRELIABLE);
+ __supportedInvocationStyles = Collections.unmodifiableSet(styles);
+ }
+
public MessageExchangeContextImpl(ODEServer server) {
- _server = server;
}
- public void invokePartner(PartnerRoleMessageExchange partnerRoleMessageExchange) throws ContextException {
+
+
+ public void invokePartnerUnreliable(PartnerRoleMessageExchange partnerRoleMessageExchange) throws ContextException {
if (__log.isDebugEnabled())
__log.debug("Invoking a partner operation: " + partnerRoleMessageExchange.getOperationName());
- ExternalService service = (ExternalService)partnerRoleMessageExchange.getChannel();
+ ExternalService service = (ExternalService)partnerRoleMessageExchange.getPartnerRoleChannel();
if (__log.isDebugEnabled())
__log.debug("The service to invoke is the external service " + service);
service.invoke(partnerRoleMessageExchange);
+
}
- public void onAsyncReply(MyRoleMessageExchange myRoleMessageExchange) throws BpelEngineException {
- if (__log.isDebugEnabled())
- __log.debug("Processing an async reply from service " + myRoleMessageExchange.getServiceName());
+ public void invokePartnerReliable(PartnerRoleMessageExchange mex) throws ContextException {
+ // TODO: tie in to WS-RELIABLE* stack.
+ throw new UnsupportedOperationException();
+ }
- // Nothing to do, no callback is necessary, the client just synchornizes itself with the
- // mex reply when invoking the engine.
+ public void invokePartnerTransacted(PartnerRoleMessageExchange mex) throws ContextException {
+ // TODO: should we check if the partner actually supports transactions?
+ invokePartnerUnreliable(mex);
}
+
+
+
+ public void onMyRoleMessageExchangeStateChanged(MyRoleMessageExchange myRoleMessageExchange) throws BpelEngineException {
+ // Add code here to handle MEXs that we've "forgotten" about due to system failure etc.. mostly
+ // useful for RELIABLE, but nice to have with ASYNC/BLOCKING as well.
+ }
+
+
+ public void cancel(PartnerRoleMessageExchange mex) throws ContextException {
+
+ }
+
+
+ public Set<InvocationStyle> getSupportedInvocationStyle(PartnerRoleChannel prc, EndpointReference partnerEpr) {
+ return __supportedInvocationStyles;
+ }
+
}
Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java Wed Sep 5 22:46:42 2007
@@ -19,6 +19,17 @@
package org.apache.ode.axis2;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.StringTokenizer;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.sql.DataSource;
+import javax.transaction.TransactionManager;
+import javax.wsdl.Definition;
+import javax.xml.namespace.QName;
+
import org.apache.axis2.AxisFault;
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.AxisService;
@@ -42,7 +53,6 @@
import org.apache.ode.bpel.iapi.ProcessStoreListener;
import org.apache.ode.bpel.iapi.Scheduler;
import org.apache.ode.bpel.intercept.MessageExchangeInterceptor;
-import org.apache.ode.bpel.memdao.BpelDAOConnectionFactoryImpl;
import org.apache.ode.il.dbutil.Database;
import org.apache.ode.scheduler.simple.JdbcDelegate;
import org.apache.ode.scheduler.simple.SimpleScheduler;
@@ -50,18 +60,6 @@
import org.apache.ode.utils.GUID;
import org.apache.ode.utils.fs.TempFileManager;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.sql.DataSource;
-import javax.transaction.TransactionManager;
-import javax.wsdl.Definition;
-import javax.xml.namespace.QName;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.util.StringTokenizer;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
/**
* Server class called by our Axis hooks to handle all ODE lifecycle management.
*
@@ -90,8 +88,6 @@
protected BpelDAOConnectionFactory _daoCF;
- protected ExecutorService _executorService;
-
protected Scheduler _scheduler;
protected Database _db;
@@ -297,7 +293,7 @@
public ODEService createService(ProcessConf pconf, QName serviceName, String portName) throws AxisFault {
destroyService(serviceName, portName);
AxisService axisService = ODEAxisService.createService(_axisConfig, pconf, serviceName, portName);
- ODEService odeService = new ODEService(axisService, pconf.getDefinitionForService(serviceName), serviceName, portName, _server, _txMgr);
+ ODEService odeService = new ODEService(axisService, pconf.getDefinitionForService(serviceName), serviceName, portName, _server);
if (_odeConfig.isReplicateEmptyNS()) {
__log.debug("Setting service with empty namespace replication");
odeService.setReplicateEmptyNS(true);
@@ -323,7 +319,7 @@
return extService;
try {
- extService = new ExternalService(def, serviceName, portName, _executorService, _axisConfig, _scheduler, _server);
+ extService = new ExternalService(def, serviceName, portName, _axisConfig, _scheduler, _server);
} catch (Exception ex) {
__log.error("Could not create external service.", ex);
throw new ContextException("Error creating external service.", ex);
@@ -431,9 +427,9 @@
}
protected Scheduler createScheduler() {
- SimpleScheduler scheduler = new SimpleScheduler(new GUID().toString(), new JdbcDelegate(_db.getDataSource()));
- scheduler.setExecutorService(_executorService);
+ SimpleScheduler scheduler = new SimpleScheduler(new GUID().toString(),new JdbcDelegate(_db.getDataSource()));
scheduler.setTransactionManager(_txMgr);
+
return scheduler;
}
@@ -441,21 +437,17 @@
if (__log.isDebugEnabled()) {
__log.debug("ODE initializing");
}
- if (_odeConfig.getThreadPoolMaxSize() == 0)
- _executorService = Executors.newCachedThreadPool();
- else
- _executorService = Executors.newFixedThreadPool(_odeConfig.getThreadPoolMaxSize());
_server = new BpelServerImpl();
_scheduler = createScheduler();
_scheduler.setJobProcessor(_server);
_server.setDaoConnectionFactory(_daoCF);
- _server.setInMemDaoConnectionFactory(new BpelDAOConnectionFactoryImpl(_scheduler));
_server.setEndpointReferenceContext(new EndpointReferenceContextImpl(this));
_server.setMessageExchangeContext(new MessageExchangeContextImpl(this));
_server.setBindingContext(new BindingContextImpl(this, _store));
_server.setScheduler(_scheduler);
+ _server.setTransactionManager(_txMgr);
if (_odeConfig.isDehydrationEnabled()) {
CountLRUDehydrationPolicy dehy = new CountLRUDehydrationPolicy();
// dehy.setProcessMaxAge(10000);
Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java Wed Sep 5 22:46:42 2007
@@ -19,6 +19,13 @@
package org.apache.ode.axis2;
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.UnknownExtensibilityElement;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.xml.namespace.QName;
+
import org.apache.axiom.om.OMElement;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
@@ -33,6 +40,7 @@
import org.apache.ode.bpel.epr.WSAEndpoint;
import org.apache.ode.bpel.iapi.BpelServer;
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.MessageExchange;
import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
@@ -42,19 +50,9 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import javax.transaction.TransactionManager;
-import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.Service;
-import javax.wsdl.extensions.UnknownExtensibilityElement;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.xml.namespace.QName;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
/**
- * A running service, encapsulates the Axis service, its receivers and our
- * receivers as well.
+ * A running service, encapsulates the Axis service, its receivers and our receivers as well.
+ *
* @author Matthieu Riou <mriou at apache dot org>
*/
public class ODEService {
@@ -64,7 +62,6 @@
private AxisService _axisService;
private BpelServer _server;
- private TransactionManager _txManager;
private Definition _wsdlDef;
private QName _serviceName;
private String _portName;
@@ -72,11 +69,9 @@
private boolean _isReplicateEmptyNS = false;
private SoapMessageConverter _converter;
- public ODEService(AxisService axisService, Definition def, QName serviceName, String portName, BpelServer server,
- TransactionManager txManager) throws AxisFault {
+ public ODEService(AxisService axisService, Definition def, QName serviceName, String portName, BpelServer server) throws AxisFault {
_axisService = axisService;
_server = server;
- _txManager = txManager;
_wsdlDef = def;
_serviceName = serviceName;
_portName = portName;
@@ -87,119 +82,64 @@
public void onAxisMessageExchange(MessageContext msgContext, MessageContext outMsgContext, SOAPFactory soapFactory)
throws AxisFault {
- boolean success = true;
MyRoleMessageExchange odeMex = null;
- Future responseFuture = null;
try {
- _txManager.begin();
- if (__log.isDebugEnabled()) __log.debug("Starting transaction.");
-
// Creating mesage exchange
String messageId = new GUID().toString();
- odeMex = _server.getEngine().createMessageExchange("" + messageId, _serviceName,
- msgContext.getAxisOperation().getName().getLocalPart());
+ odeMex = _server.createMessageExchange(InvocationStyle.UNRELIABLE, _serviceName,
+ msgContext.getAxisOperation().getName().getLocalPart(), "" + messageId);
+
__log.debug("ODE routed to operation " + odeMex.getOperation() + " from service " + _serviceName);
- if (odeMex.getOperation() != null) {
- // Preparing message to send to ODE
- Element msgEl = DOMUtils.newDocument().createElementNS(null, "message");
- msgEl.getOwnerDocument().appendChild(msgEl);
- _converter.parseSoapRequest(msgEl, msgContext.getEnvelope(), odeMex.getOperation());
- Message odeRequest = odeMex.createMessage(odeMex.getOperation().getInput().getMessage().getQName());
- readHeader(msgContext, odeMex);
- odeRequest.setMessage(msgEl);
-
- if (__log.isDebugEnabled()) {
- __log.debug("Invoking ODE using MEX " + odeMex);
- __log.debug("Message content: " + DOMUtils.domToString(odeRequest.getMessage()));
- }
-
- // Invoke ODE
- responseFuture = odeMex.invoke(odeRequest);
-
- __log.debug("Commiting ODE MEX " + odeMex);
- try {
- if (__log.isDebugEnabled()) __log.debug("Commiting transaction.");
- _txManager.commit();
- } catch (Exception e) {
- __log.error("Commit failed", e);
- success = false;
- }
- } else {
- success = false;
+ if (odeMex.getOperation() == null) {
+ String errmsg = "Call to " + _serviceName + "." + odeMex.getOperationName() + " was not routable.";
+ __log.error(errmsg);
+ throw new OdeFault(errmsg);
+ }
+
+ // Preparing message to send to ODE
+ Element msgEl = DOMUtils.newDocument().createElementNS(null, "message");
+ msgEl.getOwnerDocument().appendChild(msgEl);
+ _converter.parseSoapRequest(msgEl, msgContext.getEnvelope(), odeMex.getOperation());
+ Message odeRequest = odeMex.createMessage(odeMex.getOperation().getInput().getMessage().getQName());
+ readHeader(msgContext, odeMex);
+ odeRequest.setMessage(msgEl);
+
+ if (__log.isDebugEnabled()) {
+ __log.debug("Invoking ODE using MEX " + odeMex);
+ __log.debug("Message content: " + DOMUtils.domToString(odeRequest.getMessage()));
}
- } catch (Exception e) {
- __log.error("Exception occured while invoking ODE", e);
- success = false;
- throw new OdeFault("An exception occured while invoking ODE.", e);
- } finally {
- if (!success) {
- if (odeMex != null) odeMex.release();
- try {
- _txManager.rollback();
- } catch (Exception e) {
- throw new OdeFault("Rollback failed", e);
- }
- }
- }
- if (odeMex.getOperation().getOutput() != null) {
- // Waits for the response to arrive
+ odeMex.setRequest(odeRequest);
+ // odeMex.setTimeout(TIMEOUT);
try {
- responseFuture.get(TIMEOUT, TimeUnit.MILLISECONDS);
- } catch (Exception e) {
- String errorMsg = "Timeout or execution error when waiting for response to MEX "
- + odeMex + " " + e.toString();
- __log.error(errorMsg);
- throw new OdeFault(errorMsg);
+ odeMex.invokeBlocking();
+ } catch (java.util.concurrent.TimeoutException te) {
+ String errmsg = "Call to " + _serviceName + "." + odeMex.getOperationName() + " timed out.";
+ __log.error(errmsg);
+ throw new OdeFault(errmsg);
}
-
- if (outMsgContext != null) {
+
+ if (odeMex.getOperation().getOutput() != null && outMsgContext != null) {
SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
outMsgContext.setEnvelope(envelope);
// Hopefully we have a response
__log.debug("Handling response for MEX " + odeMex);
- boolean commit = false;
- try {
- if (__log.isDebugEnabled()) __log.debug("Starting transaction.");
- _txManager.begin();
- } catch (Exception ex) {
- throw new OdeFault("Error starting transaction!", ex);
- }
+ onResponse(odeMex, outMsgContext);
+ }
+
+ } catch (Exception e) {
+ String errmsg = "Call to " + _serviceName + "." + odeMex.getOperationName() + " caused an exception.";
+ __log.error(errmsg, e);
+ throw new OdeFault(errmsg, e);
+ } finally {
+ if (odeMex != null)
try {
- // Refreshing the message exchange
- odeMex = (MyRoleMessageExchange) _server.getEngine().getMessageExchange(odeMex.getMessageExchangeId());
- onResponse(odeMex, outMsgContext);
- commit = true;
- } catch (AxisFault af) {
- __log.error("Error processing response for MEX " + odeMex, af);
- commit = true;
- throw af;
- } catch (Exception e) {
- __log.error("Error processing response for MEX " + odeMex, e);
- throw new OdeFault("An exception occured when invoking ODE.", e);
- } finally {
odeMex.release();
- if (commit) {
- try {
- if (__log.isDebugEnabled()) __log.debug("Comitting transaction.");
- _txManager.commit();
- } catch (Exception e) {
- throw new OdeFault("Commit failed!", e);
- }
- } else {
- try {
- _txManager.rollback();
- } catch (Exception ex) {
- throw new OdeFault("Rollback failed!", ex);
- }
- }
+ } catch (Exception ex) {
+ __log.error("Error releasing message exchange: " + odeMex.getMessageExchangeId());
}
- }
- if (!success) {
- throw new OdeFault("Message was either unroutable or timed out!");
- }
}
}
@@ -212,14 +152,14 @@
}
private void onResponse(MyRoleMessageExchange mex, MessageContext msgContext) throws AxisFault {
- switch (mex.getStatus()) {
+ switch (mex.getAckType()) {
case FAULT:
if (__log.isDebugEnabled())
__log.debug("Fault response message: " + mex.getFault());
OMElement detail = _converter.createSoapFault(mex.getFaultResponse().getMessage(), mex.getFault(), mex.getOperation());
String reason = mex.getFault()+" "+mex.getFaultExplanation();
throw new AxisFault(mex.getFault(), reason, null, null, detail);
- case ASYNC:
+ case ONEWAY:
case RESPONSE:
_converter.createSoapResponse(msgContext, mex.getResponse().getMessage(), mex.getOperation());
if (__log.isDebugEnabled())
@@ -234,8 +174,7 @@
}
/**
- * Extracts endpoint information from Axis MessageContext (taken from WSA
- * headers) to stuff them into ODE mesage exchange.
+ * Extracts endpoint information from Axis MessageContext (taken from WSA headers) to stuff them into ODE mesage exchange.
*/
private void readHeader(MessageContext msgContext, MyRoleMessageExchange odeMex) {
Object otse = msgContext.getProperty("targetSessionEndpoint");
@@ -261,9 +200,8 @@
}
/**
- * Handle callback endpoints for the case where partner contact process
- * my-role which results in an "updated" my-role EPR due to session id
- * injection.
+ * Handle callback endpoints for the case where partner contact process my-role which results in an "updated" my-role EPR due to
+ * session id injection.
*/
private void writeHeader(MessageContext msgContext, MyRoleMessageExchange odeMex) {
EndpointReference targetEPR = odeMex.getEndpointReference();
@@ -285,8 +223,8 @@
}
/**
- * Return the service-ref element that will be used to represent this
- * endpoint.
+ * Return the service-ref element that will be used to represent this endpoint.
+ *
* @return my service endpoint
*/
public EndpointReference getMyServiceRef() {
@@ -295,7 +233,7 @@
/**
* Get the EPR of this service from the WSDL.
- *
+ *
* @param name
* service name
* @param portName
@@ -334,7 +272,7 @@
/**
* Create-and-copy a service-ref element.
- *
+ *
* @param elmt
* @return wrapped element
*/
Modified: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/explang/EvaluationContext.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/explang/EvaluationContext.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/explang/EvaluationContext.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/explang/EvaluationContext.java Wed Sep 5 22:46:42 2007
@@ -31,6 +31,9 @@
* Context for evaluating expressions. Implementations of the
* {@link ExpressionLanguageRuntime} interface use this interface to access BPEL
* variables, property sets and link statuses.
+ *
+ * FIXME: this is the only thing that uses bpel.o objects in this module... smells fishy,
+ * FIXME: prob should change this interface to not use these. -mbs
*/
public interface EvaluationContext {
Modified: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java Wed Sep 5 22:46:42 2007
@@ -18,12 +18,13 @@
*/
package org.apache.ode.bpel.iapi;
+import java.util.Set;
+
import javax.xml.namespace.QName;
/**
- * Interface implemented by the BPEL server. Provides methods for
- * life-cycle management.
+ * Interface implemented by the BPEL server. Provides methods for life-cycle management and process invocation.
*
* @author Maciej Szefler - m s z e f l e r @ g m a i l . c o m
*/
@@ -98,12 +99,6 @@
/**
- * Get the {@link BpelEngine} interface for handling transaction operations.
- * @return transactional {@link BpelEngine} interfacce
- */
- BpelEngine getEngine();
-
- /**
* Register a process with the server.
* @param pid process to register
* @throws BpelEngineException
@@ -117,4 +112,40 @@
*/
void unregister(QName pid) throws BpelEngineException;
+
+ /**
+ * Inquire of the engine the invocation styles that are supported for a given service.
+ * @param serviceId service identifier
+ * @return set of supported {@link InvocationStyle}s
+ */
+ Set<InvocationStyle> getSupportedInvocationStyle(QName serviceId);
+
+ /**
+ * Create a "my role" message exchange for invoking a BPEL process.
+ *
+ * @param serviceId
+ * the service id of the process being called, if known
+ * @param operation
+ * name of the operation
+ *
+ * @return {@link MyRoleMessageExchange} the newly created message exchange
+ */
+ MyRoleMessageExchange createMessageExchange(InvocationStyle istyle,
+ QName serviceId,
+ String operation,
+ String foreignKey)
+ throws BpelEngineException;
+
+ /**
+ * Retrieve a message identified by the given identifer.
+ *
+ * @param mexId
+ * message exhcange identifier
+ * @return associated message exchange
+ */
+ MessageExchange getMessageExchange(String mexId)
+ throws BpelEngineException;
+
+ MessageExchange getMessageExchangeByForeignKey(String foreignKey)
+ throws BpelEngineException;
}
Modified: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/EndpointReference.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/EndpointReference.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/EndpointReference.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/EndpointReference.java Wed Sep 5 22:46:42 2007
@@ -40,7 +40,6 @@
* structure is up to the integration layer. This method is
* used by the BPEL engine to persist EPR references in the
* database.
- * TODO: avoid using DOM
* @return destination for the generated XML
*/
Document toXML();
Modified: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchange.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchange.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchange.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchange.java Wed Sep 5 22:46:42 2007
@@ -47,34 +47,27 @@
/** New message exchange, has not been "invoked" */
NEW,
- /** The request is being sent to the "server" */
- REQUEST,
+ /** The request was sent, blocking while waiting for the service to respond. */
+ REQ,
- /** Waiting for an asynchronous response from the "server" */
+ /** The request was sent, no longer blocking. */
ASYNC,
+
+ /** The acknowledgement (either response/fault/failure) was sent. */
+ ACK,
- /** The one way request has been sent to the server. */
- // ONE_WAY, - supported as ASYNC + getMessageExchangePatter() - See JIRA ODE-54
+ /** The acknowledgement was processed. */
+ COMPLETED
- /** Processing the response received from the "server". */
- RESPONSE,
+ }
- /** Processing the fault received from the "server". */
+ public enum AckType {
+ RESPONSE,
+ ONEWAY,
FAULT,
-
- /** Processing a failure. */
- FAILURE,
-
- /** Message exchange completed succesfully. */
- COMPLETED_OK,
-
- /** Message exchange completed with a fault. */
- COMPLETED_FAULT,
-
- /** Message exchange completed with a failure. */
- COMPLETED_FAILURE,
+ FAILURE
}
-
+
/**
* Enumeration of the types of failures.
*/
@@ -113,6 +106,19 @@
String getMessageExchangeId()
throws BpelEngineException;
+
+ /**
+ * Get the invocation style for this message exchange.
+ * @return
+ */
+ InvocationStyle getInvocationStyle();
+
+ /**
+ * Get the time-out in ms.
+ * @return
+ */
+ long getTimeout();
+
/**
* Get the name of the operation (WSDL 1.1) / message exchange (WSDL 1.2?).
*
@@ -130,6 +136,7 @@
throws BpelEngineException;
+ AckType getAckType();
/**
* Return the type of message-exchange that resulted form this invocation
@@ -147,8 +154,13 @@
*/
Message createMessage(QName msgType);
- boolean isTransactionPropagated()
- throws BpelEngineException;
+ /**
+ * Indicates whether a transactions in associated with the message exchange. If this is the case, then the object must be used
+ * from a context (i.e. thread) that is associated with the same transaction. The TRANSACTED and RELIABLE invocation styles will
+ * have this flag set to <code>true</code>. ASYNC and BLOCKING styles will always have this set to <code>false</code>.
+ * @return <code>true<code> if there is a transaction associated with the object, <code>false</code> otherwise.
+ */
+ boolean isTransactional();
/**
* Get the message exchange status.
@@ -186,7 +198,6 @@
* Get the operation description for this message exchange.
* It is possible that the description cannot be resolved, for example if
* the EPR is unknown or if the operation does not exist.
- * TODO: How to get rid of the WSDL4j dependency?
* @return WSDL operation description or <code>null</code> if not availble
*/
Operation getOperation();
@@ -195,7 +206,6 @@
* Get the port type description for this message exchange.
* It is possible that the description cannot be resolved, for example if
* the EPR is unknown or if the operation does not exist.
- * TODO: How to get rid of the WSDL4j dependency?
* @return WSDL port type description or <code>null</code> if not available.
*/
PortType getPortType();
@@ -223,6 +233,13 @@
*/
public Set<String> getPropertyNames();
+ /**
+ * Report whether the operation is "safe" in the sense of the WSDL1.2 meaning of the term. That is,
+ * is the operation side-effect free?
+ * @return <code>true</code> if the operation is safe, <code>false</code> otherwise.
+ */
+ public boolean isSafe();
+
/**
* Should be called by the external partner when it's done with the
* message exchange. Ncessary for a better resource management and
Modified: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchangeContext.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchangeContext.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchangeContext.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MessageExchangeContext.java Wed Sep 5 22:46:42 2007
@@ -18,15 +18,15 @@
*/
package org.apache.ode.bpel.iapi;
+import java.util.Set;
+
import org.apache.ode.bpel.iapi.MessageExchange.FailureType;
import org.w3c.dom.Element;
-
/**
* <p>
- * Context provided by the integration layer exposing partner communication
- * to the BPEL engine. The BPEL engine may only invoke methods on this
- * interface from a transactional context provided by the integration layer.
+ * Context provided by the integration layer exposing partner communication to the BPEL engine. The BPEL engine may only invoke
+ * methods on this interface from a transactional context provided by the integration layer.
* </p>
*
* <p>
@@ -36,66 +36,82 @@
* <li>partner is accessible via an unreliable transport (e.g. HTTP)</li>
* <li>partner participates in the transaction (e.g. WS-TX)</li>
* </ol>
- * It is important to note that each usage scenario is identical from the
- * point of view of the BPEL engine. However, the integration layer must
- * handle each of these scenarios in a different manner. See the method
- * documentation for details.
+ * It is important to note that each usage scenario is identical from the point of view of the BPEL engine. However, the integration
+ * layer must handle each of these scenarios in a different manner. See the method documentation for details.
* </p>
*/
public interface MessageExchangeContext {
- /**
- * <p>Invoke a partner. This method is invoked by the BPEL engine when an
- * <code><invoke></code> construct is encountered. The BPEL engine
- * will only invoke this method from a transactional context. This method
- * MUST NOT block for extended periods (as it is called from within a
- * transaction): to this end, actual invocation may be deferred or a
- * synchronous operation may be decomposed into two asynchronous "legs".
- * The integration layer must provide a response to the message exchange
- * via the {@link PartnerRoleMessageExchange#reply(Message)},
- * {@link PartnerRoleMessageExchange#replyOneWayOk()},
- * {@link PartnerRoleMessageExchange#replyWithFailure(FailureType, String, Element)}
- * {@link PartnerRoleMessageExchange#replyWithFault(javax.xml.namespace.QName, Message)},
- * or {@link PartnerRoleMessageExchange#replyAsync()} methods. </p>
- *
- * <p>Invocation of reliable, unreliable, and transactional transports should
- * be treated differently. A brief description of how each of these scenarios
- * could be handled follows.</p>
- *
- * <p>Reliable transports are transports such as JMS or WS-RM. For these
- * transports, the request should be enrolled in the current transaction. This
- * necessarily implies that the request is deferred until the transaction is
- * committed. It follows that for reliable request-response invocations
- * the response to the invocation will necessarily be processed in a separate
- * transaction. </p>
- *
- * <p>Unreliable transports are transports such as HTTP. For these transports,
- * where the operation is not idempotent it is typically required that "at
- * most once" semantics are achieved. To this end the invocation could be
- * noted and deferred until after the transaction is committed. </p>
- *
- * <p>Transactional transports are those transports that support transaction
- * propagation. For these transports, the invocation can be processed
- * immediately and the response provided to the engine via the
- * {@link PartnerRoleMessageExchange#reply(Message)} method. </p>
- *
- * @param mex engine-provided partner role message exchange representation,
- * this object is valid only for the duration of the transaction
- * from which the {@link #invokePartner(PartnerRoleMessageExchange)}
- * method is invoked
- * @throws ContextException if the port does not support the
- * operation
- */
- void invokePartner(PartnerRoleMessageExchange mex)
- throws ContextException;
-
- /**
- * Method used to asynchronously deliver to the integration layer the BPEL
- * engine's response to an invocation that could not complete synchronously.
- * @see MyRoleMessageExchange#invoke(Message)
- */
- void onAsyncReply(MyRoleMessageExchange myRoleMex)
- throws BpelEngineException;
+ /**
+ * <p>
+ * Invoke a partner. This method is invoked by the BPEL engine when an <code><invoke></code> construct is encountered.
+ * The BPEL engine will only invoke this method from a transactional context. This method MUST NOT block for extended periods
+ * (as it is called from within a transaction): to this end, actual invocation may be deferred or a synchronous operation may be
+ * decomposed into two asynchronous "legs". The integration layer must provide a response to the message exchange via the
+ * {@link PartnerRoleMessageExchange#reply(Message)}, {@link PartnerRoleMessageExchange#replyOneWayOk()},
+ * {@link PartnerRoleMessageExchange#replyWithFailure(FailureType, String, Element)}
+ * {@link PartnerRoleMessageExchange#replyWithFault(javax.xml.namespace.QName, Message)}, or
+ * {@link PartnerRoleMessageExchange#replyAsync()} methods.
+ * </p>
+ *
+ * <p>
+ * Invocation of reliable, unreliable, and transactional transports should be treated differently. A brief description of how
+ * each of these scenarios could be handled follows.
+ * </p>
+ *
+ * <p>
+ * Reliable transports are transports such as JMS or WS-RM. For these transports, the request should be enrolled in the current
+ * transaction. This necessarily implies that the request is deferred until the transaction is committed. It follows that for
+ * reliable request-response invocations the response to the invocation will necessarily be processed in a separate transaction.
+ * </p>
+ *
+ * <p>
+ * Unreliable transports are transports such as HTTP. For these transports, where the operation is not idempotent it is
+ * typically required that "at most once" semantics are achieved. To this end the invocation could be noted and deferred until
+ * after the transaction is committed.
+ * </p>
+ *
+ * <p>
+ * Transactional transports are those transports that support transaction propagation. For these transports, the invocation can
+ * be processed immediately and the response provided to the engine via the {@link PartnerRoleMessageExchange#reply(Message)}
+ * method.
+ * </p>
+ *
+ * @param mex
+ * engine-provided partner role message exchange representation, this object is valid only for the duration of the
+ * transaction from which the {@link #invokePartner(PartnerRoleMessageExchange)} method is invoked
+ * @throws ContextException
+ * if the port does not support the operation
+ */
+ void invokePartnerUnreliable(PartnerRoleMessageExchange mex) throws ContextException;
+
+ void invokePartnerReliable(PartnerRoleMessageExchange mex) throws ContextException;
+
+ void invokePartnerTransacted(PartnerRoleMessageExchange mex) throws ContextException;
+
+ /**
+ * Cancel an async/reliable partner-role message exchange.
+ * @param mex message exchange that should be cancelled.
+ * @throws ContextException
+ */
+ void cancel(PartnerRoleMessageExchange mex) throws ContextException;
+
+ /**
+ * Method used to inform the integration layer that the state of a my-role message exchange has changed. This method
+ * is handy for implementations that need to survive system shutdowns.
+ *
+ * @see MyRoleMessageExchange#invoke(Message)
+ */
+ void onMyRoleMessageExchangeStateChanged(MyRoleMessageExchange myRoleMex) throws BpelEngineException;
+
+ /**
+ * Get the supported invocation styles (see {@link InvocationStyle}) for invoking the EPR provided
+ * via a given channel.
+ *
+ * @param partnerEpr partner's EPR
+ * @return supported invocation styles
+ */
+ Set<InvocationStyle> getSupportedInvocationStyle(PartnerRoleChannel prc, EndpointReference partnerEpr);
}
Modified: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MyRoleMessageExchange.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MyRoleMessageExchange.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MyRoleMessageExchange.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/MyRoleMessageExchange.java Wed Sep 5 22:46:42 2007
@@ -21,6 +21,7 @@
import javax.xml.namespace.QName;
import java.util.concurrent.Future;
+import java.util.concurrent.TimeoutException;
/**
* Extension of the {@link org.apache.ode.bpel.iapi.MessageExchange} interface
@@ -56,32 +57,49 @@
*/
CorrelationStatus getCorrelationStatus();
+ /**
+ * Get the type of failure. Only usable if AckType is FAILURE.
+ * @return
+ */
+ FailureType getFailureType();
+
+ void setRequest(Message request);
+
/**
- * "Invoke" a process hosted by the BPEL engine. The state of the invocation
- * may be obtained by a call to the {@link MessageExchange#getStatus()}
- * method. It is possible that the response for the operation is not
- * immediately available (i.e the call to {@link #invoke(Message)} will
- * return before a response is available). In such cases,
- * {@link MessageExchange#getStatus()} == {@link Status#ASYNC} and the
- * integration layer will receive an asynchronous notification from the BPEL
- * engine via the
- * {@link MessageExchangeContext#onAsyncReply(MyRoleMessageExchange)} when
- * the response become available.
+ * Invoke a process hosted by the BPEL engine, blocking until the operation completes.
+ *
+ * @return the final status of the operation
+ *
*/
- Future invoke(Message request);
+ MessageExchange.Status invokeBlocking() throws BpelEngineException, TimeoutException;
/**
- * Complete the message, exchange: indicates that the client has receive the
- * response (if any).
+ * Invoke a transactional process: this method must be invoked in a transaction. The invoking thread
+ * will be blocked for the duration of the call.
+ *
+ * @return the final status of the operation (provided that commit succeedes)
*/
- void complete();
+ MessageExchange.Status invokeTransacted() throws BpelEngineException;
/**
- * Associate a client key with this message exchange.
+ * Invoke a reliable process: this method must be invoked in a transaction. The invoking thread will
+ * not be blocked. When the response is available, it will be provided via the {@link MessageExchangeContext#onReliableReply(MyRoleMessageExchange)}.
*
- * @param clientKey
*/
- void setClientId(String clientKey);
+ void invokeReliable();
+
+ /**
+ * Invoke a processs asynchronously. This method will start an operation, but will not block; instead a future object is returned.
+ *
+ * @return
+ */
+ Future<MessageExchange.Status> invokeAsync();
+
+ /**
+ * Complete the message, exchange: indicates that the client has receive the
+ * response (if any).
+ */
+ void complete();
/**
* Get the previously associated client key for this exchange.
@@ -96,5 +114,6 @@
* @return service name
*/
QName getServiceName();
+
}
Modified: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleChannel.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleChannel.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleChannel.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleChannel.java Wed Sep 5 22:46:42 2007
@@ -19,6 +19,8 @@
package org.apache.ode.bpel.iapi;
+import java.util.Set;
+
/**
* Representation of a communication link to a partner or partners. Objects of this
* type generally represent a physical resource in the integration layer that is used
Modified: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleMessageExchange.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleMessageExchange.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleMessageExchange.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/PartnerRoleMessageExchange.java Wed Sep 5 22:46:42 2007
@@ -19,83 +19,86 @@
package org.apache.ode.bpel.iapi;
-
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* A message exchange orginating from the BPEL server and targeting some external partner.
+ *
* @author Maciej Szefler - m s z e f l e r @ g m a i l . c o m
- *
+ *
*/
public interface PartnerRoleMessageExchange extends MessageExchange {
- /**
- * Get the identifier of the process that created this message exchange.
- * @return
- */
- QName getCaller();
-
- /**
- * Get the communication channel.
- * @return communication channel
- */
- PartnerRoleChannel getChannel();
-
-
- /**
- * Indicate that the partner faulted in processing the message exchange.
- *
- * @param faultType fault type
- * @param outputFaultMessage the input message
- *
- * @throws IllegalStateException if delivering this type of message is
- * inappropriate at the present point.
- */
- void replyWithFault(QName faultType, Message outputFaultMessage)
- throws BpelEngineException;
-
- /**
- * Indicate that the partner has responded to the message exchange.
- *
- * @param response the response from the partner
- *
- * @throws IllegalStateException if delivering this type of message is
- * inappropriate at the present point.
- */
- void reply(Message response)
- throws BpelEngineException;
-
- /**
- * Indicate that the partner has failed to process the message exchange.
- *
- * @param type type of failure
- * @param description description of failure
- */
- void replyWithFailure(FailureType type, String description, Element details)
- throws BpelEngineException;
-
- /**
- * Indicate that the partner processed the one-way invocation successfully.
- */
- void replyOneWayOk();
-
- /**
- * Indicate that the response to the request/response operation
- * is not yet available and that the response will be delivered
- * asynchronously.
- */
- void replyAsync();
-
- /**
- * Get the {@link EndpointReference} associated with the my-role of the partner link to which this message
- * exchange belongs. This method is typically used to provide protocol-specific "callback" mechanisms.
- * @return endpoint reference associate with the corresponding my-role, or null if no my-role is defined
- */
- EndpointReference getMyRoleEndpointReference();
-
-
+ /**
+ * Get the identifier of the process that created this message exchange.
+ *
+ * @return
+ */
+ QName getCaller();
+
+ /**
+ * Get the communication channel.
+ *
+ * @return communication channel, an object created by the IL
+ */
+ PartnerRoleChannel getPartnerRoleChannel();
+
+ /**
+ * Indicate that the partner faulted in processing the message exchange.
+ *
+ * @param faultType
+ * fault type
+ * @param outputFaultMessage
+ * the input message
+ *
+ * @throws IllegalStateException
+ * if delivering this type of message is inappropriate at the present point.
+ */
+ void replyWithFault(QName faultType, Message outputFaultMessage) throws BpelEngineException;
+
+ /**
+ * Indicate that the partner has responded to the message exchange.
+ *
+ * @param response
+ * the response from the partner
+ *
+ * @throws IllegalStateException
+ * if delivering this type of message is inappropriate at the present point.
+ */
+ void reply(Message response) throws BpelEngineException;
+
+ /**
+ * Indicate that the partner has failed to process the message exchange.
+ *
+ * @param type
+ * type of failure
+ * @param description
+ * description of failure
+ */
+ void replyWithFailure(FailureType type, String description, Element details) throws BpelEngineException;
+
+ /**
+ * Indicate that the partner processed the one-way invocation successfully.
+ */
+ void replyOneWayOk();
+
+ /**
+ * Indicate that the response to the request/response operation is not yet available and that the response will be delivered
+ * asynchronously.
+ *
+ * @param foreignKey "foreign" key that is used to identify this message exchange.
+ */
+ void replyAsync(String foreignKey);
+
+ /**
+ * Get the {@link EndpointReference} associated with the my-role of the partner link to which this message exchange belongs.
+ * This method is typically used to provide protocol-specific "callback" mechanisms.
+ *
+ * @return endpoint reference associate with the corresponding my-role, or null if no my-role is defined
+ */
+ EndpointReference getMyRoleEndpointReference();
}
Modified: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/Scheduler.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/Scheduler.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/Scheduler.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/Scheduler.java Wed Sep 5 22:46:42 2007
@@ -45,16 +45,7 @@
throws ContextException ;
- /**
- * Schedule a volatile (non-persisted) job. Volatile jobs should not be
- * saved in the database and should not survive system crash. Volatile
- * jobs scheduled from a transactional context should be scheduled
- * regardless of whether the transaction commits.
- *
- * @param jobDetail information about the job
- * @return unique (as far as the scheduler is concerned) job identifier
- */
- String scheduleVolatileJob(boolean transacted, Map<String,Object> jobDetail) throws ContextException;
+ void jobCompleted(String jobId);
/**
* Make a good effort to cancel the job. If its already running no big
@@ -63,62 +54,12 @@
*/
void cancelJob(String jobId) throws ContextException;
- /**
- * Execute a {@link Callable} in a transactional context. If the callable
- * throws an exception, then the transaction will be rolled back, otherwise
- * the transaction will commit.
- *
- * @param <T> return type
- * @param transaction transaction to execute
- * @return result
- * @throws Exception
- */
- <T> T execTransaction(Callable<T> transaction)
- throws Exception, ContextException;
-
- /**
- * Same as execTransaction but executes in a different thread to guarantee
- * isolation from the main execution thread.
- * @param transaction
- * @return
- * @throws Exception
- * @throws ContextException
- */
- <T> Future<T> execIsolatedTransaction(final Callable<T> transaction)
- throws Exception, ContextException;
-
- /**
- * @return true if the current thread is associated with a transaction.
- */
- boolean isTransacted();
-
- /**
- * Register a transaction synchronizer.
- * @param synch synchronizer
- * @throws ContextException
- */
- void registerSynchronizer(Synchronizer synch) throws ContextException;
-
void start();
void stop();
void shutdown();
- public interface Synchronizer {
- /**
- * Called after the transaction is completed.
- * @param success indicates whether the transaction was comitted
- */
- void afterCompletion(boolean success);
-
- /**
- * Called before the transaction is completed.
- */
- void beforeCompletion();
-
- }
-
/**
* Interface implemented by the object responsible for job execution.
* @author mszefler
@@ -166,7 +107,9 @@
super(cause);
this.retry = retry;
}
+
}
+
}
Modified: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/pmapi/InstanceManagement.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/pmapi/InstanceManagement.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/pmapi/InstanceManagement.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/pmapi/InstanceManagement.java Wed Sep 5 22:46:42 2007
@@ -145,7 +145,7 @@
* Get an instance by id.
* @param iid
* @return information about a specific instance
- * @throws InstanceNotFoundException TODO
+ * @throws InstanceNotFoundException
*/
InstanceInfoDocument getInstanceInfo(Long iid) throws InstanceNotFoundException;
Modified: ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/pmapi/ProcessManagement.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/pmapi/ProcessManagement.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/pmapi/ProcessManagement.java (original)
+++ ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/pmapi/ProcessManagement.java Wed Sep 5 22:46:42 2007
@@ -106,7 +106,7 @@
/**
* Retire a process.
* @param pid identifier of the process to retire
- * @param retired TODO
+ * @param retired new value of retired flag
* @return {@link ProcessInfoDocument} reflecting the modification
*/
ProcessInfoDocument setRetired(QName pid, boolean retired)
Modified: ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGenerator.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGenerator.java?rev=573153&r1=573152&r2=573153&view=diff
==============================================================================
--- ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGenerator.java (original)
+++ ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGenerator.java Wed Sep 5 22:46:42 2007
@@ -169,7 +169,6 @@
if (vv.getLocation() != null && vv.getLocation().getExpression() != null)
vref.location = _context.compileExpr(vv.getLocation());
}
- // TODO: check for irrelevant properties.
return vref;
} else if (from.isPartnerLinkVal()) {
PartnerLinkVal plv = from.getAsPartnerLinkVal();
@@ -230,7 +229,6 @@
if (vv.getLocation() != null && vv.getLocation().getExpression() != null)
vref.location = _context.compileExpr(vv.getLocation());
}
- // TODO: check for irrelevant properties.
return vref;
} else if (to.isPartnerLinkVal()) {
OAssign.PartnerLinkRef plref = new OAssign.PartnerLinkRef(_context.getOProcess());