You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2010/05/27 20:10:26 UTC
svn commit: r948937 [16/33] - in /ode/trunk: ./
agents/src/main/java/org/apache/ode/agents/memory/ axis2-war/
axis2-war/src/main/assembly/ axis2-war/src/main/webapp/
axis2-war/src/main/webapp/WEB-INF/
axis2-war/src/main/webapp/WEB-INF/classes/ axis2-wa...
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xquery10/runtime/XQuery10ExpressionRuntime.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xquery10/runtime/XQuery10ExpressionRuntime.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xquery10/runtime/XQuery10ExpressionRuntime.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xquery10/runtime/XQuery10ExpressionRuntime.java Thu May 27 18:09:53 2010
@@ -105,9 +105,9 @@ public class XQuery10ExpressionRuntime i
/**
* Initialize XSL Transformer
*
- * @param properties properties
+ * @param properties properties
*
- * @throws ConfigurationException ConfigurationException
+ * @throws ConfigurationException ConfigurationException
*/
public void initialize(Map properties) throws ConfigurationException {
TransformerFactory trsf = new net.sf.saxon.TransformerFactoryImpl();
@@ -115,7 +115,7 @@ public class XQuery10ExpressionRuntime i
}
/**
- *
+ *
* @see org.apache.ode.bpel.explang.ExpressionLanguageRuntime#evaluateAsString(org.apache.ode.bpel.o.OExpression,
* org.apache.ode.bpel.explang.EvaluationContext)
*/
@@ -125,7 +125,7 @@ public class XQuery10ExpressionRuntime i
}
/**
- *
+ *
* @see org.apache.ode.bpel.explang.ExpressionLanguageRuntime#evaluateAsBoolean(org.apache.ode.bpel.o.OExpression,
* org.apache.ode.bpel.explang.EvaluationContext)
*/
@@ -137,13 +137,13 @@ public class XQuery10ExpressionRuntime i
/**
* Evaluate expression and return a number
*
- * @param cexp cexp
- * @param ctx ctx
+ * @param cexp cexp
+ * @param ctx ctx
*
* @return type
*
- * @throws FaultException FaultException
- * @throws EvaluationException EvaluationException
+ * @throws FaultException FaultException
+ * @throws EvaluationException EvaluationException
*/
public Number evaluateAsNumber(OExpression cexp, EvaluationContext ctx)
throws FaultException, EvaluationException {
@@ -151,7 +151,7 @@ public class XQuery10ExpressionRuntime i
}
/**
- *
+ *
* @see org.apache.ode.bpel.explang.ExpressionLanguageRuntime#evaluate(org.apache.ode.bpel.o.OExpression,
* org.apache.ode.bpel.explang.EvaluationContext)
*/
@@ -213,13 +213,13 @@ public class XQuery10ExpressionRuntime i
/**
* Evaluate expression and return a node
*
- * @param cexp cexp
- * @param ctx ctx
+ * @param cexp cexp
+ * @param ctx ctx
*
* @return type
*
- * @throws FaultException FaultException
- * @throws EvaluationException EvaluationException
+ * @throws FaultException FaultException
+ * @throws EvaluationException EvaluationException
*/
public Node evaluateNode(OExpression cexp, EvaluationContext ctx)
throws FaultException, EvaluationException {
@@ -241,13 +241,13 @@ public class XQuery10ExpressionRuntime i
/**
* Evaluate expression and return a date
*
- * @param cexp cexp
- * @param context context
+ * @param cexp cexp
+ * @param context context
*
* @return type
*
- * @throws FaultException FaultException
- * @throws EvaluationException EvaluationException
+ * @throws FaultException FaultException
+ * @throws EvaluationException EvaluationException
*/
public Calendar evaluateAsDate(OExpression cexp, EvaluationContext context)
throws FaultException, EvaluationException {
@@ -294,13 +294,13 @@ public class XQuery10ExpressionRuntime i
/**
* Evaluate expression and return duration
*
- * @param cexp cexp
- * @param context context
+ * @param cexp cexp
+ * @param context context
*
* @return type
*
- * @throws FaultException FaultException
- * @throws EvaluationException EvaluationException
+ * @throws FaultException FaultException
+ * @throws EvaluationException EvaluationException
*/
public Duration evaluateAsDuration(OExpression cexp,
EvaluationContext context) throws FaultException, EvaluationException {
@@ -319,14 +319,14 @@ public class XQuery10ExpressionRuntime i
/**
* Evaluate expression and return opaque type
*
- * @param cexp cexp
- * @param ctx ctx
- * @param type type
+ * @param cexp cexp
+ * @param ctx ctx
+ * @param type type
*
* @return type
*
- * @throws FaultException FaultException
- * @throws EvaluationException EvaluationException
+ * @throws FaultException FaultException
+ * @throws EvaluationException EvaluationException
*/
private Object evaluate(OExpression cexp, EvaluationContext ctx, QName type)
throws FaultException, EvaluationException {
@@ -366,7 +366,7 @@ public class XQuery10ExpressionRuntime i
for (QName variable : exp.getAllUnboundExternalVariables()) {
// Evaluate referenced variable
Object value = variableResolver.resolveVariable(variable);
-
+
if (value instanceof Value) {
SaxonXQConnection saxonConn = (SaxonXQConnection) xqconn;
try {
@@ -381,15 +381,15 @@ public class XQuery10ExpressionRuntime i
__log.warn("", e);
}
} else {
-
+
if (value instanceof Date) {
Date d = (Date) value;
value = org.apache.ode.utils.ISO8601DateParser.format(d);
}
-
+
// Figure out type of variable
XQSequenceType xqType = getItemType(xqconn, value);
-
+
// Saxon doesn't like binding sequences to variables
if (value instanceof Node) {
// a node is a node-list, but the inverse isn't true.
@@ -403,7 +403,7 @@ public class XQuery10ExpressionRuntime i
}
value = xqconn.createSequence(nodeArray.iterator());
}
-
+
// Bind value with external variable
if (value != null && xqType != null) {
if (value instanceof XQSequence) {
@@ -470,11 +470,11 @@ public class XQuery10ExpressionRuntime i
/**
* Return opaque object embedded in XQuery Item
*
- * @param item item
+ * @param item item
*
* @return type
*
- * @throws XQException XQException
+ * @throws XQException XQException
*/
private Object getItemValue(XQItem item) throws XQException {
XQItemType itemType = item.getItemType();
@@ -532,21 +532,21 @@ public class XQuery10ExpressionRuntime i
itemValue = item.getAtomicValue();
break;
-
+
}
return itemValue;
}
-
+
/**
* Return XQuery type corresponding to given value
*
- * @param xqconn XQuery connection
- * @param value value
+ * @param xqconn XQuery connection
+ * @param value value
*
* @return type
*
- * @throws XQException XQException
+ * @throws XQException XQException
*/
private XQSequenceType getItemType(XQConnection xqconn, Object value) throws XQException {
XQSequenceType xqType = null;
@@ -582,16 +582,16 @@ public class XQuery10ExpressionRuntime i
}
return xqType;
}
-
+
/**
- * Cast XQuery sequence into an opaque list
+ * Cast XQuery sequence into an opaque list
*
- * @param type type
- * @param result result
+ * @param type type
+ * @param result result
*
* @return value
*
- * @throws XQException XQException
+ * @throws XQException XQException
*/
private Object getResultValue(QName type, XQResultSequence result) throws XQException {
Document document = DOMUtils.newDocument();
@@ -624,7 +624,7 @@ public class XQuery10ExpressionRuntime i
if (item != null) {
resultValue = getItemValue(item);
if (resultValue instanceof Node) {
- resultValue = DOMUtils.cloneNode(document, (Node) resultValue);
+ resultValue = DOMUtils.cloneNode(document, (Node) resultValue);
}
}
} else if (XPathConstants.STRING.equals(type)) {
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelDatabase.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelDatabase.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelDatabase.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelDatabase.java Thu May 27 18:09:53 2010
@@ -43,10 +43,10 @@ public class BpelDatabase {
throw new NullPointerException("sscf is null!");
if (scheduler == null)
throw new NullPointerException("scheduler is null!");
-
+
_sscf = sscf;
_scheduler = scheduler;
-
+
}
/**
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java Thu May 27 18:09:53 2010
@@ -110,9 +110,9 @@ public class BpelEngineImpl implements B
/** Mapping from myrole service name to active process. */
private final HashMap<QName, List<BpelProcess>> _serviceMap = new HashMap<QName, List<BpelProcess>>();
- /** Mapping from a potentially shared endpoint to its EPR */
- private SharedEndpoints _sharedEps;
-
+ /** Mapping from a potentially shared endpoint to its EPR */
+ private SharedEndpoints _sharedEps;
+
/** Manage instance-level locks. */
private final InstanceLockManager _instanceLockManager = new InstanceLockManager();
@@ -120,7 +120,7 @@ public class BpelEngineImpl implements B
private final Map<QName, Long> _hydratedSizes = new HashMap<QName, Long>();
private final Map<QName, Long> _unhydratedSizes = new HashMap<QName, Long>();
-
+
public BpelEngineImpl(Contexts contexts) {
_contexts = contexts;
_sharedEps = new SharedEndpoints();
@@ -130,7 +130,7 @@ public class BpelEngineImpl implements B
public SharedEndpoints getSharedEndpoints() {
return _sharedEps;
}
-
+
public MyRoleMessageExchange createMessageExchange(String clientKey, QName targetService,
String operation, String pipedMexId)
throws BpelEngineException {
@@ -145,7 +145,7 @@ public class BpelEngineImpl implements B
if (targets == null || targets.size() == 0)
throw new BpelEngineException("NoSuchService: " + targetService);
-
+
if (targets.size() == 1 || activeTargets.size() == 1) {
// If the number of targets is one, create and return a simple MEX
BpelProcess target;
@@ -163,10 +163,10 @@ public class BpelEngineImpl implements B
for (BpelProcess target : activeTargets) {
meps.add(createNewMyRoleMex(target, clientKey, targetService, operation, pipedMexId));
}
- return createNewMyRoleMex(template, meps);
+ return createNewMyRoleMex(template, meps);
}
}
-
+
private MyRoleMessageExchange createNewMyRoleMex(BpelProcess target, String clientKey, QName targetService, String operation, String pipedMexId) {
MessageExchangeDAO dao;
if (target == null || target.isInMemory()) {
@@ -192,22 +192,22 @@ public class BpelEngineImpl implements B
/**
* Return a brokered MEX that delegates invocations to each of the embedded
* MEXs contained in the <code>meps</code> list, using the appropriate style.
- *
+ *
* @param target
* @param meps
* @return
* @throws BpelEngineException
*/
- private MyRoleMessageExchange createNewMyRoleMex(BpelProcess target, List<MyRoleMessageExchange> meps)
+ private MyRoleMessageExchange createNewMyRoleMex(BpelProcess target, List<MyRoleMessageExchange> meps)
throws BpelEngineException {
MyRoleMessageExchangeImpl templateMex = (MyRoleMessageExchangeImpl) meps.get(0);
MessageExchangeDAO templateMexDao = templateMex.getDAO();
return new BrokeredMyRoleMessageExchangeImpl(target, this, meps, templateMexDao, templateMex);
}
-
-
+
+
public MyRoleMessageExchange createMessageExchange(String clientKey, QName targetService, String operation) {
- return createMessageExchange(clientKey, targetService, operation, null);
+ return createMessageExchange(clientKey, targetService, operation, null);
}
private void setMessageExchangeProcess(String mexId, ProcessDAO processDao) {
@@ -216,7 +216,7 @@ public class BpelEngineImpl implements B
if (mexdao != null)
mexdao.setProcess(processDao);
}
-
+
public MessageExchange getMessageExchange(String mexId) {
MessageExchangeDAO mexdao = _contexts.inMemDao.getConnection().getMessageExchange(mexId);
if (mexdao == null) mexdao = _contexts.dao.getConnection().getMessageExchange(mexId);
@@ -264,7 +264,7 @@ public class BpelEngineImpl implements B
return mex;
}
-
+
// enable extensibility
protected PartnerRoleMessageExchangeImpl createPartnerRoleMessageExchangeImpl(
MessageExchangeDAO mexdao, PortType ptype, Operation op, OPartnerLink plink, BpelProcess process) {
@@ -291,7 +291,7 @@ public class BpelEngineImpl implements B
}
// unregister the services provided by the process
- p.deactivate();
+ p.deactivate();
// release the resources held by this process
p.dehydrate();
// update the process footprints list
@@ -303,7 +303,7 @@ public class BpelEngineImpl implements B
boolean isProcessRegistered(QName pid) {
return _activeProcesses.containsKey(pid);
}
-
+
public BpelProcess getProcess(QName pid) {
return _activeProcesses.get(pid);
}
@@ -345,7 +345,7 @@ public class BpelEngineImpl implements B
}
process.activate(this);
}
-
+
/**
* Route to a process using the service id. Note, that we do not need the endpoint name here, we are assuming that two processes
* would not be registered under the same service qname but different endpoint.
@@ -372,7 +372,7 @@ public class BpelEngineImpl implements B
if (process == null) return null;
return process.getOProcess();
}
-
+
private List<BpelProcess> getAllProcesses(QName processId) {
String qName = processId.toString();
if(qName.lastIndexOf("-") > 0) {
@@ -415,9 +415,9 @@ public class BpelEngineImpl implements B
final JobDetails we = jobInfo.jobDetail;
if( __log.isTraceEnabled() ) __log.trace("[JOB] onScheduledJob " + jobInfo + "" + we.getInstanceId());
-
+
acquireInstanceLock(we.getInstanceId());
-
+
// DONT PUT CODE HERE-need this method real tight in a try/catch block, we need to handle
// all types of failure here, the scheduler is not going to know how to handle our errors,
// ALSO we have to release the lock obtained above (IMPORTANT), lest the whole system come
@@ -433,7 +433,7 @@ public class BpelEngineImpl implements B
if (instance == null) {
__log.debug(__msgs.msgScheduledJobReferencesUnknownInstance(we.getInstanceId()));
- // nothing we can do, this instance is not in the database, it will always fail, not
+ // nothing we can do, this instance is not in the database, it will always fail, not
// exactly an error since can occur in normal course of events.
return;
}
@@ -449,10 +449,10 @@ public class BpelEngineImpl implements B
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
- Thread.currentThread().setContextClassLoader(process._classLoader);
+ Thread.currentThread().setContextClassLoader(process._classLoader);
if (we.getType().equals(JobType.INVOKE_CHECK)) {
if (__log.isDebugEnabled()) __log.debug("handleJobDetails: InvokeCheck event for mexid " + we.getMexId());
-
+
sendPartnerRoleFailure(we, MessageExchange.FailureType.COMMUNICATION_ERROR);
return;
} else if (we.getType().equals(JobType.INVOKE_INTERNAL)) {
@@ -465,7 +465,7 @@ public class BpelEngineImpl implements B
if (isTwoWay) {
String causeCodeValue = mex.getProperty("causeCode");
mex.getDAO().setProcess(process.getProcessDAO());
- sendMyRoleFault(process, we, causeCodeValue != null ?
+ sendMyRoleFault(process, we, causeCodeValue != null ?
Integer.valueOf(causeCodeValue) : InvalidProcessException.DEFAULT_CAUSE_CODE);
return;
} else {
@@ -478,11 +478,11 @@ public class BpelEngineImpl implements B
boolean routed = false;
jobInfo.jobDetail.detailsExt.put("enqueue", false);
for(BpelProcess proc : processes) {
- routed = routed || proc.handleJobDetails(jobInfo.jobDetail);
+ routed = routed || proc.handleJobDetails(jobInfo.jobDetail);
}
if(!routed) {
jobInfo.jobDetail.detailsExt.put("enqueue", true);
- process.handleJobDetails(jobInfo.jobDetail);
+ process.handleJobDetails(jobInfo.jobDetail);
}
}
else {
@@ -560,15 +560,15 @@ public class BpelEngineImpl implements B
return _contexts.globalInterceptors;
}
-
+
public void registerMessageExchangeInterceptor(MessageExchangeInterceptor interceptor) {
_contexts.globalInterceptors.add(interceptor);
}
-
+
public void unregisterMessageExchangeInterceptor(MessageExchangeInterceptor interceptor) {
_contexts.globalInterceptors.remove(interceptor);
}
-
+
public void unregisterMessageExchangeInterceptor(Class interceptorClass) {
MessageExchangeInterceptor candidate = null;
for (MessageExchangeInterceptor interceptor : _contexts.globalInterceptors) {
@@ -581,7 +581,7 @@ public class BpelEngineImpl implements B
_contexts.globalInterceptors.remove(candidate);
}
}
-
+
public long getTotalBpelFootprint() {
long bpelFootprint = 0;
for (BpelProcess process : _activeProcesses.values()) {
@@ -612,12 +612,12 @@ public class BpelEngineImpl implements B
}
return hydratedFootprint;
}
-
+
public long getHydratedProcessSize(QName processName) {
return getHydratedProcessSize(_activeProcesses.get(processName));
}
-
- private long getHydratedProcessSize(BpelProcess process) {
+
+ private long getHydratedProcessSize(BpelProcess process) {
long potentialGrowth = 0;
if (!process.hintIsHydrated()) {
Long mySize = _hydratedSizes.get(process.getPID());
@@ -630,13 +630,13 @@ public class BpelEngineImpl implements B
}
return getHydratedProcessSize(potentialGrowth);
}
-
+
private long getHydratedProcessSize(long potentialGrowth) {
- long processMemory = (long)
+ long processMemory = (long)
((getHydratedFootprint() + potentialGrowth) *
PROCESS_OVERHEAD_MEMORY_FACTOR);
- return processMemory;
- }
+ return processMemory;
+ }
public int getHydratedProcessCount(QName processName) {
int processCount = 0;
@@ -644,9 +644,9 @@ public class BpelEngineImpl implements B
if (process.hintIsHydrated() || process.getPID().equals(processName)) {
processCount++;
}
- }
+ }
return processCount;
- }
+ }
private long _processThrottledMaximumSize = Long.MAX_VALUE;
private int _processThrottledMaximumCount = Integer.MAX_VALUE;
@@ -657,11 +657,11 @@ public class BpelEngineImpl implements B
int instanceThrottledMaximumCount) {
this._instanceThrottledMaximumCount = instanceThrottledMaximumCount;
}
-
+
public int getInstanceThrottledMaximumCount() {
return _instanceThrottledMaximumCount;
}
-
+
public void setProcessThrottledMaximumCount(
int hydrationThrottledMaximumCount) {
this._processThrottledMaximumCount = hydrationThrottledMaximumCount;
@@ -671,7 +671,7 @@ public class BpelEngineImpl implements B
unregisterMessageExchangeInterceptor(ProcessCountThrottler.class);
}
}
-
+
public int getProcessThrottledMaximumCount() {
return _processThrottledMaximumCount;
}
@@ -689,7 +689,7 @@ public class BpelEngineImpl implements B
public long getProcessThrottledMaximumSize() {
return _processThrottledMaximumSize;
}
-
+
public void setProcessSize(QName processId, boolean hydratedOnce) {
BpelProcess process = _activeProcesses.get(processId);
long processSize = process.sizeOf();
@@ -698,7 +698,7 @@ public class BpelEngineImpl implements B
_unhydratedSizes.remove(process.getPID());
} else {
_hydratedSizes.remove(process.getPID());
- _unhydratedSizes.put(process.getPID(), new Long(processSize));
+ _unhydratedSizes.put(process.getPID(), new Long(processSize));
}
}
@@ -709,8 +709,8 @@ public class BpelEngineImpl implements B
BpelProcess lastUnusedProcess = null;
long lastUsedMinimum = Long.MAX_VALUE;
for (BpelProcess process : _activeProcesses.values()) {
- if (process.hintIsHydrated()
- && process.getLastUsed() < lastUsedMinimum
+ if (process.hintIsHydrated()
+ && process.getLastUsed() < lastUsedMinimum
&& process.getInstanceInUseCount() == 0) {
lastUsedMinimum = process.getLastUsed();
lastUnusedProcess = process;
@@ -771,7 +771,7 @@ public class BpelEngineImpl implements B
MexDaoUtil.setFaulted((MessageExchangeImpl) mex, faultQName, faultElement);
}
}
-
+
private void sendPartnerRoleFailure(JobDetails we, FailureType failureType) {
MessageExchange mex = (MessageExchange) getMessageExchange(we.getMexId());
if (mex instanceof PartnerRoleMessageExchange) {
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java Thu May 27 18:09:53 2010
@@ -133,20 +133,20 @@ public class BpelProcess {
private ExternalVariableManager _evm;
- public static final QName PROP_PATH = new QName("PATH");
- public static final QName PROP_SVG = new QName("SVG");
+ public static final QName PROP_PATH = new QName("PATH");
+ public static final QName PROP_SVG = new QName("SVG");
public static final QName PROP_LAZY_HYDRATE = new QName("process.hydration.lazy");
public static final QName PROP_MAX_INSTANCES = new QName("process.instance.throttled.maximum.count");
-
+
// The ratio of in-memory vs serialized size of compiled bpel object.
private static final int PROCESS_MEMORY_TO_SERIALIZED_SIZE_RATIO = 5;
-
+
public BpelProcess(ProcessConf conf) {
_pid = conf.getProcessId();
_pconf = conf;
_hydrationLatch = new HydrationLatch();
}
-
+
/**
* Retrives the base URI to use for local resource resolution.
@@ -158,7 +158,7 @@ public class BpelProcess {
}
/**
- * Intiialize the external variable configuration/engine manager. This is called from hydration logic, so it
+ * Intiialize the external variable configuration/engine manager. This is called from hydration logic, so it
* is possible to change the external variable configuration at runtime.
*
*/
@@ -184,11 +184,11 @@ public class BpelProcess {
BpelRuntimeContextImpl processInstance = createRuntimeContext(instanceDAO, null, null);
processInstance.recoverActivity(channel, activityId, action, fault);
}
-
+
protected DebuggerSupport createDebuggerSupport() {
return new DebuggerSupport(this);
}
-
+
protected DebuggerSupport getDebuggerSupport() {
return _debugger;
}
@@ -203,7 +203,7 @@ public class BpelProcess {
public interface InvokeHandler {
boolean invoke(PartnerLinkMyRoleImpl target, PartnerLinkMyRoleImpl.RoutingInfo routingInfo, boolean createInstance);
}
-
+
public boolean invokeProcess(MyRoleMessageExchangeImpl mex, InvokeHandler invokeHandler, boolean enqueue) {
boolean routed = false;
@@ -270,11 +270,11 @@ public class BpelProcess {
}
return routed;
}
-
+
private boolean isActive() {
return _pconf.getState() == org.apache.ode.bpel.iapi.ProcessState.ACTIVE;
}
-
+
/**
* Entry point for message exchanges aimed at the my role.
*
@@ -465,7 +465,7 @@ public class BpelProcess {
if (__log.isDebugEnabled()) {
__log.debug("Matcher event for iid " + we.getInstanceId());
}
- if( procInstance.getState() == ProcessState.STATE_COMPLETED_OK
+ if( procInstance.getState() == ProcessState.STATE_COMPLETED_OK
|| procInstance.getState() == ProcessState.STATE_COMPLETED_WITH_FAULT ) {
__log.debug("A matcher event was aborted. The process is already completed.");
return true;
@@ -573,7 +573,7 @@ public class BpelProcess {
if (getInstanceMaximumCount() < Integer.MAX_VALUE)
registerMessageExchangeInterceptor(new InstanceCountThrottler());
-
+
__log.debug("Activating " + _pid);
// Activate all the my-role endpoints.
for (Map.Entry<String, Endpoint> entry : _pconf.getProvideEndpoints().entrySet()) {
@@ -862,7 +862,7 @@ public class BpelProcess {
__log.error(errmsg, e);
throw new BpelEngineException(errmsg, e);
}
-
+
if (_partnerRoles == null) {
_partnerRoles = new HashMap<OPartnerLink, PartnerLinkPartnerRoleImpl>();
}
@@ -881,7 +881,7 @@ public class BpelProcess {
if (_partnerEprs == null) {
_partnerEprs = new HashMap<Endpoint, EndpointReference>();
}
-
+
_replacementMap = new ReplacementMapImpl(_oprocess);
// Create an expression language registry for this process
@@ -950,7 +950,7 @@ public class BpelProcess {
}
}
}
-
+
private void bounceProcessDAOInMemory(BpelDAOConnection conn, final QName pid, final long version, final OProcess oprocess) {
if(__log.isInfoEnabled()) __log.info("Creating new process DAO[mem] for " + pid + " (guid=" + oprocess.guid + ").");
createProcessDAO(conn, pid, version, oprocess);
@@ -1035,10 +1035,10 @@ public class BpelProcess {
public boolean hasActiveInstances() {
try {
_hydrationLatch.latch(1);
- if (isInMemory() || _engine._contexts.scheduler.isTransacted()) {
+ if (isInMemory() || _engine._contexts.scheduler.isTransacted()) {
return hasActiveInstances(getProcessDAO());
} else {
- // If we do not have a transaction we need to create one.
+ // If we do not have a transaction we need to create one.
try {
return (Boolean) _engine._contexts.scheduler.execTransaction(new Callable<Object>() {
public Object call() throws Exception {
@@ -1055,9 +1055,9 @@ public class BpelProcess {
_hydrationLatch.release(1);
}
}
-
+
private boolean hasActiveInstances(ProcessDAO processDAO) {
- // Select count of instances instead of all active instances
+ // Select count of instances instead of all active instances
// Collection<ProcessInstanceDAO> activeInstances = processDAO.getActiveInstances();
// return (activeInstances != null && activeInstances.size() > 0);
return processDAO.getNumInstances() > 0;
@@ -1066,11 +1066,11 @@ public class BpelProcess {
public void registerMessageExchangeInterceptor(MessageExchangeInterceptor interceptor) {
_mexInterceptors.add(interceptor);
}
-
+
public void unregisterMessageExchangeInterceptor(MessageExchangeInterceptor interceptor) {
_mexInterceptors.remove(interceptor);
}
-
+
public long sizeOf() {
// try to get actual size from sizing agent, if enabled
long footprint = SizingAgent.deepSizeOf(this);
@@ -1085,7 +1085,7 @@ public class BpelProcess {
// return the total footprint
return footprint;
}
-
+
public String getProcessProperty(QName property, String defaultValue) {
Text text = (Text) getProcessProperty(property);
if (text == null) {
@@ -1098,7 +1098,7 @@ public class BpelProcess {
public boolean isHydrationLazy() {
return Boolean.valueOf(getProcessProperty(PROP_LAZY_HYDRATE, "true"));
}
-
+
public boolean isHydrationLazySet() {
return getProcessProperty(PROP_LAZY_HYDRATE) != null;
}
@@ -1108,7 +1108,7 @@ public class BpelProcess {
}
public long getEstimatedHydratedSize() {
- return _pconf.getCBPFileSize() *
+ return _pconf.getCBPFileSize() *
PROCESS_MEMORY_TO_SERIALIZED_SIZE_RATIO;
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcessDatabase.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcessDatabase.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcessDatabase.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcessDatabase.java Thu May 27 18:09:53 2010
@@ -47,7 +47,7 @@ class BpelProcessDatabase extends BpelDa
super(sscf,scheduler);
_processId = processId;
}
-
+
QName getProcessId() {
return _processId;
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java Thu May 27 18:09:53 2010
@@ -246,7 +246,7 @@ public class BpelRuntimeContextImpl impl
_bpelProcess._engine._contexts.scheduler.registerSynchronizer(new Scheduler.Synchronizer() {
public void afterCompletion(boolean success) {
}
- public void beforeCompletion() {
+ public void beforeCompletion() {
_dao.delete(_bpelProcess.getCleanupCategories(false), false);
}
});
@@ -275,7 +275,7 @@ public class BpelRuntimeContextImpl impl
_bpelProcess._engine._contexts.scheduler.registerSynchronizer(new Scheduler.Synchronizer() {
public void afterCompletion(boolean success) {
}
- public void beforeCompletion() {
+ public void beforeCompletion() {
_dao.delete(_bpelProcess.getCleanupCategories(true), false);
}
});
@@ -418,7 +418,7 @@ public class BpelRuntimeContextImpl impl
CorrelationSetDAO cs = scopeDAO.getCorrelationSet(cset.declaration.name);
return cs.getValue();
}
-
+
public Element fetchPartnerRoleEndpointReferenceData(PartnerLinkInstance pLink) throws FaultException {
PartnerLinkDAO pl = fetchPartnerLinkDAO(pLink);
@@ -504,7 +504,7 @@ public class BpelRuntimeContextImpl impl
XmlDataDAO var = scopedao.getVariable(varname);
return (var == null || var.isNull()) ? null : var.get();
}
-
+
public Node writeVariable(VariableInstance variable, Node changes) {
ScopeDAO scopeDAO = _dao.getScope(variable.scopeInstance);
XmlDataDAO dataDAO = scopeDAO.getVariable(variable.declaration.name);
@@ -517,7 +517,7 @@ public class BpelRuntimeContextImpl impl
public void cancelOutstandingRequests(String channelId) {
_imaManager.cancel(channelId, false);
}
-
+
public void processOutstandingRequest(PartnerLinkInstance partnerLink, String opName, String bpelMexId, String odeMexId) throws FaultException {
String mexRef = _imaManager.processOutstandingRequest(partnerLink, opName, bpelMexId, odeMexId);
if (mexRef != null) {
@@ -732,7 +732,7 @@ public class BpelRuntimeContextImpl impl
/**
* Called back when the process executes an invokation.
- *
+ *
* @param activityId The activity id in the process definition (id of OInvoke)
* @param partnerLinkInstance The partner link variable instance
* @param operation The wsdl operation.
@@ -774,7 +774,7 @@ public class BpelRuntimeContextImpl impl
MessageExchangeDAO mexDao = _dao.getConnection().createMessageExchange(
MessageExchangeDAO.DIR_BPEL_INVOKES_PARTNERROLE);
- mexDao.setCreateTime(getCurrentEventDateTime());
+ mexDao.setCreateTime(getCurrentEventDateTime());
mexDao.setStatus(MessageExchange.Status.NEW.toString());
mexDao.setOperation(operation.getName());
mexDao.setPortType(partnerLink.partnerLink.partnerRolePortType.getQName());
@@ -807,13 +807,13 @@ public class BpelRuntimeContextImpl impl
// (for callback mechanism).
EndpointReference myRoleEndpoint = partnerLink.partnerLink.hasMyRole() ? _bpelProcess
.getInitialMyRoleEPR(partnerLink.partnerLink) : null;
- PartnerRoleMessageExchangeImpl mex =
+ PartnerRoleMessageExchangeImpl mex =
createPartnerRoleMessageExchangeImpl(mexDao, partnerLink,
operation, partnerEpr, myRoleEndpoint);
mex.setProperty("activityId", ""+aid);
-
+
List<BpelProcess> p2pProcesses = null;
-
+
Endpoint partnerEndpoint = _bpelProcess.getInitialPartnerRoleEndpoint(partnerLink.partnerLink);
if (getConfigForPartnerLink(partnerLink.partnerLink).usePeer2Peer && partnerEndpoint != null)
p2pProcesses = _bpelProcess.getEngine().route(partnerEndpoint.serviceName, mex.getRequest());
@@ -823,7 +823,7 @@ public class BpelRuntimeContextImpl impl
MyRoleMessageExchange myRoleMex = _bpelProcess.getEngine().createMessageExchange(
mex.getMessageExchangeId(), partnerEndpoint.serviceName,
operation.getName(), mex.getMessageExchangeId());
-
+
if (myRoleMex instanceof BrokeredMyRoleMessageExchangeImpl) {
mex.setSubscriberCount(((BrokeredMyRoleMessageExchangeImpl) myRoleMex).getSubscriberCount());
}
@@ -874,7 +874,7 @@ public class BpelRuntimeContextImpl impl
if (mexDao.getPattern().equals(MessageExchangePattern.REQUEST_ONLY.toString())) {
mexDao.setStatus(MessageExchange.Status.ASYNC.toString());
// This mex can now be released
- boolean succeeded = mex.getStatus() != MessageExchange.Status.FAILURE && mex.getStatus() != MessageExchange.Status.FAULT;
+ boolean succeeded = mex.getStatus() != MessageExchange.Status.FAILURE && mex.getStatus() != MessageExchange.Status.FAULT;
mexDao.release(_bpelProcess.isCleanupCategoryEnabled(succeeded, CLEANUP_CATEGORY.MESSAGES));
}
// Check if there is a synchronous response, if so, we need to inject the
@@ -897,16 +897,16 @@ public class BpelRuntimeContextImpl impl
return mexDao.getMessageExchangeId();
}
-
+
// enable extensibility
protected PartnerRoleMessageExchangeImpl createPartnerRoleMessageExchangeImpl(MessageExchangeDAO mexDao,
- PartnerLinkInstance partnerLink, Operation operation, EndpointReference partnerEpr,
+ PartnerLinkInstance partnerLink, Operation operation, EndpointReference partnerEpr,
EndpointReference myRoleEndpoint) {
return new PartnerRoleMessageExchangeImpl(getBpelProcess().getEngine(), mexDao,
partnerLink.partnerLink.partnerRolePortType, operation, partnerEpr, myRoleEndpoint,
getBpelProcess().getPartnerRoleChannel(partnerLink.partnerLink));
}
-
+
protected BpelProcess getBpelProcess() {
return _bpelProcess;
}
@@ -931,7 +931,7 @@ public class BpelRuntimeContextImpl impl
protected void buildOutgoingMessage(MessageDAO message, Element outgoingElmt) {
if (outgoingElmt == null) return;
-
+
Document doc = DOMUtils.newDocument();
Element header = doc.createElement("header");
NodeList parts = outgoingElmt.getChildNodes();
@@ -940,7 +940,7 @@ public class BpelRuntimeContextImpl impl
Element part = (Element) parts.item(m);
if (part.getAttribute("headerPart") != null && part.getAttribute("headerPart").length() > 0) {
header.appendChild(doc.importNode(part, true));
- // remove the element from the list AND decrement the index to avoid skipping the next element!!
+ // remove the element from the list AND decrement the index to avoid skipping the next element!!
outgoingElmt.removeChild(part);
m--;
}
@@ -1127,7 +1127,7 @@ public class BpelRuntimeContextImpl impl
ScopeDAO scope = _dao.getScope(scopeId);
scope.setState(scopeState);
}
-
+
/**
* @see BpelRuntimeContext#sendEvent(org.apache.ode.bpel.evt.ProcessInstanceEvent)
*/
@@ -1142,9 +1142,9 @@ public class BpelRuntimeContextImpl impl
List<String> scopeNames = null;
if (event instanceof ScopeEvent) {
ScopeEvent sevent = (ScopeEvent) event;
-
+
scopeNames = sevent.getParentScopesNames();
-
+
if (sevent instanceof ScopeStartEvent) {
saveScopeState(sevent.getScopeId(), ScopeStateEnum.ACTIVE);
} else if (sevent instanceof ScopeCompletionEvent) {
@@ -1266,7 +1266,7 @@ public class BpelRuntimeContextImpl impl
switch (status) {
case ASYNC:
case REQUEST:
- // In the case of pub-sub, the status may already be OK.
+ // In the case of pub-sub, the status may already be OK.
case COMPLETED_OK:
MessageDAO request = dao.getRequest();
if (request == null) {
@@ -1480,7 +1480,7 @@ public class BpelRuntimeContextImpl impl
if( MessageExchangePattern.REQUEST_RESPONSE.toString().equals(mexdao.getPattern())) {
__log.warn("A message arrived before a receive is ready for a request/response pattern. This may be processed to success. However, you should consider revising your process since a TCP port and a container thread will be held for a longer time and the process will not scale under heavy load.");
}
-
+
for (MessageRouteDAO mroute : mroutes) {
// We have a match, so we can get rid of the routing entries.
correlator.removeRoutes(mroute.getGroupId(), _dao);
@@ -1516,18 +1516,18 @@ public class BpelRuntimeContextImpl impl
public ValueReferencePair writeExtVar(Variable variable, Node reference, Node value) throws ExternalVariableModuleException {
ValueReferencePair vrp = new ValueReferencePair();
-
+
Value val = _bpelProcess.getEVM().write(variable, reference, value, _iid);
vrp.reference = val.locator.reference;
vrp.value = val.value;
-
+
return vrp;
}
public URI getBaseResourceURI() {
return _bpelProcess.getBaseResourceURI();
}
-
+
public Node getProcessProperty(QName propertyName) {
return _bpelProcess.getProcessProperty(propertyName);
}
@@ -1540,7 +1540,7 @@ public class BpelRuntimeContextImpl impl
if (_currentEventDateTime == null)
return Calendar.getInstance().getTime();
else
- return _currentEventDateTime;
+ return _currentEventDateTime;
}
public void setCurrentEventDateTime(Date eventDateTime) {
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java Thu May 27 18:09:53 2010
@@ -91,13 +91,13 @@ public class BpelServerImpl implements B
public final static String DEFERRED_PROCESS_INSTANCE_CLEANUP_DISABLED_NAME =
"org.apache.ode.disable.deferredProcessInstanceCleanup";
-
- private static boolean DEFERRED_PROCESS_INSTANCE_CLEANUP_DISABLED =
+
+ private static boolean DEFERRED_PROCESS_INSTANCE_CLEANUP_DISABLED =
Boolean.getBoolean(DEFERRED_PROCESS_INSTANCE_CLEANUP_DISABLED_NAME);
-
- /**
+
+ /**
* Set of processes that are registered with the server. Includes hydrated and dehydrated processes.
- * Guarded by _mngmtLock.writeLock().
+ * Guarded by _mngmtLock.writeLock().
*/
private final Set<BpelProcess> _registeredProcesses = new HashSet<BpelProcess>();
@@ -109,10 +109,10 @@ public class BpelServerImpl implements B
private int _hydrationLazyMinimumSize;
private int _migrationTransactionTimeout;
private Thread processDefReaper;
-
+
BpelEngineImpl _engine;
protected BpelDatabase _db;
-
+
/**
* Management lock for synchronizing management operations and preventing
* processing (transactions) from occuring while management operations are
@@ -147,7 +147,7 @@ public class BpelServerImpl implements B
public Contexts getContexts() {
return _contexts;
}
-
+
public void start() {
_mngmtLock.writeLock().lock();
try {
@@ -173,7 +173,7 @@ public class BpelServerImpl implements B
_mngmtLock.writeLock().unlock();
}
}
-
+
public void registerExternalVariableEngine(ExternalVariableModule eve) {
_contexts.externalVariableEngines.put(eve.getName(), eve);
}
@@ -204,7 +204,7 @@ public class BpelServerImpl implements B
_contexts.eventListeners.remove(listener);
}
}
-
+
private void unregisterBpelEventListeners() {
for (BpelEventListener l : _contexts.eventListeners) {
unregisterBpelEventListener(l);
@@ -244,7 +244,7 @@ public class BpelServerImpl implements B
_db = new BpelDatabase(_contexts.dao, _contexts.scheduler);
_state = State.INIT;
-
+
_engine = createBpelEngineImpl(_contexts);
} finally {
_mngmtLock.writeLock().unlock();
@@ -255,7 +255,7 @@ public class BpelServerImpl implements B
protected BpelEngineImpl createBpelEngineImpl(Contexts contexts) {
return new BpelEngineImpl(contexts);
}
-
+
public void shutdown() throws BpelEngineException {
_mngmtLock.writeLock().lock();
try {
@@ -331,7 +331,7 @@ public class BpelServerImpl implements B
_mngmtLock.writeLock().unlock();
}
}
-
+
private boolean isLazyHydratable(BpelProcess process) {
if (process.isHydrationLazySet()) {
return process.isHydrationLazy();
@@ -346,7 +346,7 @@ public class BpelServerImpl implements B
protected BpelProcess createBpelProcess(ProcessConf conf) {
return new BpelProcess(conf);
}
-
+
public void unregister(QName pid) throws BpelEngineException {
if (__log.isTraceEnabled())
__log.trace("unregister: " + pid);
@@ -423,7 +423,7 @@ public class BpelServerImpl implements B
throw new RuntimeException(e);
}
}
-
+
private boolean deleteProcessDAO(BpelDAOConnection conn, QName pid) {
final ProcessDAO proc = conn.getProcess(pid);
if (proc != null) {
@@ -443,13 +443,13 @@ public class BpelServerImpl implements B
return true;
}
return false;
-
+
}
public void onScheduledJob(JobInfo jobInfo) throws JobProcessorException {
getEngine().onScheduledJob(jobInfo);
}
-
+
private class ProcessDefReaper implements Runnable {
public void run() {
__log.debug("Starting process definition reaper thread.");
@@ -458,7 +458,7 @@ public class BpelServerImpl implements B
while (true) {
Thread.sleep(pollingTime);
if (!_mngmtLock.writeLock().tryLock(100L, TimeUnit.MILLISECONDS)) continue;
- try {
+ try {
__log.debug("Kicking reaper, OProcess instances: " + OProcess.instanceCount);
// Copying the runnning process list to avoid synchronization
// problems and a potential mess if a policy modifies the list
@@ -467,7 +467,7 @@ public class BpelServerImpl implements B
public boolean isMember(BpelProcess o) {
return !o.hintIsHydrated();
}
-
+
});
// And the happy winners are...
@@ -494,7 +494,7 @@ public class BpelServerImpl implements B
public void setConfigProperties(Properties configProperties) {
_configProperties = configProperties;
}
-
+
public void setMessageExchangeContext(MessageExchangeContext mexContext) throws BpelEngineException {
_contexts.mexContext = mexContext;
}
@@ -556,7 +556,7 @@ public class BpelServerImpl implements B
long hydrationThrottledMaximumSize) {
_engine.setProcessThrottledMaximumSize(hydrationThrottledMaximumSize);
}
-
+
public void setProcessThrottledMaximumCount(
int hydrationThrottledMaximumCount) {
_engine.setProcessThrottledMaximumCount(hydrationThrottledMaximumCount);
@@ -572,9 +572,9 @@ public class BpelServerImpl implements B
}
/**
- * A polled runnable instance that implements this interface will be set
+ * A polled runnable instance that implements this interface will be set
* with the contexts before the run() method is called.
- *
+ *
* @author sean
*
*/
@@ -584,14 +584,14 @@ public class BpelServerImpl implements B
/**
* This wraps up the executor service for polled runnables.
- *
+ *
* @author sean
*
*/
public static class PolledRunnableProcessor implements Scheduler.JobProcessor {
private ExecutorService _polledRunnableExec;
private Contexts _contexts;
-
+
// this map contains all polled runnable results that are not completed.
// keep an eye on this one, since if we re-use this polled runnable and
// generate too many entries in this map, this becomes a memory leak(
@@ -601,7 +601,7 @@ public class BpelServerImpl implements B
public void setContexts(Contexts contexts) {
_contexts = contexts;
}
-
+
public void setPolledRunnableExecutorService(ExecutorService polledRunnableExecutorService) {
_polledRunnableExec = polledRunnableExecutorService;
}
@@ -610,9 +610,9 @@ public class BpelServerImpl implements B
JOB_STATUS statusOfPriorTry = JOB_STATUS.PENDING;
Exception exceptionThrownOnPriorTry = null;
boolean toRetry = false;
-
+
synchronized( resultsByJobId ) {
- PolledRunnableResults results = resultsByJobId.get(jobInfo.jobName);
+ PolledRunnableResults results = resultsByJobId.get(jobInfo.jobName);
if( results != null ) {
statusOfPriorTry = results._status;
exceptionThrownOnPriorTry = results._exception;
@@ -627,7 +627,7 @@ public class BpelServerImpl implements B
toRetry = true;
}
}
-
+
if( toRetry ) {
// re-try
_polledRunnableExec.submit(new Runnable() {
@@ -652,21 +652,21 @@ public class BpelServerImpl implements B
}
});
}
-
+
jobInfo.jobDetail.getDetailsExt().put("runnable_status", JOB_STATUS.IN_PROGRESS);
if( exceptionThrownOnPriorTry != null ) {
throw new Scheduler.JobProcessorException(exceptionThrownOnPriorTry, true);
}
}
-
+
private static enum JOB_STATUS {
PENDING, IN_PROGRESS, FAILED, COMPLETED
}
-
+
private class PolledRunnableResults {
private JOB_STATUS _status = JOB_STATUS.PENDING;
private Exception _exception;
-
+
public PolledRunnableResults(JOB_STATUS status, Exception exception) {
_status = status;
_exception = exception;
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BrokeredMyRoleMessageExchangeImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BrokeredMyRoleMessageExchangeImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BrokeredMyRoleMessageExchangeImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BrokeredMyRoleMessageExchangeImpl.java Thu May 27 18:09:53 2010
@@ -37,7 +37,7 @@ import org.apache.ode.bpel.iapi.ProcessS
/**
- * A reliable MEP that delegates messages to a list of subscribers
+ * A reliable MEP that delegates messages to a list of subscribers
*
* @author $author$
* @version $Revision$
@@ -50,11 +50,11 @@ public class BrokeredMyRoleMessageExchan
/**
* Creates a new BrokeredReliableMyRoleMessageExchangeImpl object.
*
- * @param process
- * @param subscribers
- * @param mexId
- * @param oplink
- * @param template
+ * @param process
+ * @param subscribers
+ * @param mexId
+ * @param oplink
+ * @param template
*/
public BrokeredMyRoleMessageExchangeImpl(BpelProcess process, BpelEngineImpl engine,
List<MyRoleMessageExchange> subscribers, MessageExchangeDAO mexDao, MyRoleMessageExchange template) {
@@ -79,13 +79,13 @@ public class BrokeredMyRoleMessageExchan
}
return myFuture;
}
-
+
/**
* Use the EPR of one of the subscribers as my EPR
*
* @return type
*
- * @throws BpelEngineException BpelEngineException
+ * @throws BpelEngineException BpelEngineException
*/
@Override
public EndpointReference getEndpointReference() throws BpelEngineException {
@@ -93,7 +93,7 @@ public class BrokeredMyRoleMessageExchan
}
/**
- * Use the response from one of the subscribers as my response
+ * Use the response from one of the subscribers as my response
*
* @return type
*/
@@ -101,34 +101,34 @@ public class BrokeredMyRoleMessageExchan
public Message getResponse() {
return template.getResponse();
}
-
+
@Override
public Status getStatus() {
return template.getStatus();
}
-
+
@Override
public CorrelationStatus getCorrelationStatus() {
return template.getCorrelationStatus();
}
-
+
@Override
public int getSubscriberCount() {
return subscribers != null ? subscribers.size() : 0;
}
-
+
@Override
public void setSubscriberCount(int subscriberCount) {
for (MyRoleMessageExchange subscriber : subscribers) {
((MyRoleMessageExchangeImpl) subscriber).setSubscriberCount(subscriberCount);
}
}
-
+
@Override
public PortType getPortType() {
return template.getPortType();
}
-
+
@Override
public Operation getOperation() {
return template.getOperation();
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Contexts.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Contexts.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Contexts.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Contexts.java Thu May 27 18:09:53 2010
@@ -53,7 +53,7 @@ public class Contexts {
public BpelDAOConnectionFactory dao;
BpelDAOConnectionFactory inMemDao;
- /** Global Message-Exchange interceptors. Must be copy-on-write!!! */
+ /** Global Message-Exchange interceptors. Must be copy-on-write!!! */
final List<MessageExchangeInterceptor >globalInterceptors = new CopyOnWriteArrayList<MessageExchangeInterceptor>();
/** Global event listeners. Must be copy-on-write!!! */
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DebuggerSupport.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DebuggerSupport.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DebuggerSupport.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DebuggerSupport.java Thu May 27 18:09:53 2010
@@ -399,7 +399,7 @@ public class DebuggerSupport implements
}
-
+
/**
* @return the process model. Currently an {@link OProcess}
* However it is not guaranteed that it will remain an OProcess
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DocumentInfoGenerator.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DocumentInfoGenerator.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DocumentInfoGenerator.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DocumentInfoGenerator.java Thu May 27 18:09:53 2010
@@ -27,12 +27,12 @@ import java.util.Map;
/**
- * Class for generating information about a document resource.
+ * Class for generating information about a document resource.
*/
class DocumentInfoGenerator {
private final File _file;
private String _type;
-
+
private static final Map<String, String> __extToTypeMap = new HashMap<String,String>();
static {
// Assume WSDL is 1.1 for now...
@@ -44,11 +44,11 @@ class DocumentInfoGenerator {
// Assume BPEL is 2.0 for now...
__extToTypeMap.put(".bpel", "http://schemas.xmlsoap.org/ws/2004/03/business-process/");
}
-
-
+
+
DocumentInfoGenerator(File f) {
_file = f;
-
+
recognize();
}
@@ -79,7 +79,7 @@ class DocumentInfoGenerator {
private void recognize() {
String fname = _file.getName().toLowerCase();
-
+
for (Map.Entry<String,String>i:__extToTypeMap.entrySet()) {
if (fname.endsWith(i.getKey().toLowerCase())) {
_type = i.getValue();
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/IMAManager.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/IMAManager.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/IMAManager.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/IMAManager.java Thu May 27 18:09:53 2010
@@ -36,8 +36,8 @@ import org.apache.commons.logging.LogFac
/**
* <p>
- * This class handles behaviour of IMAs (Inbound Message Activities) as specified in WS BPEL.
- * This includes detecting conflictingReceive and conflictingRequest faults.
+ * This class handles behaviour of IMAs (Inbound Message Activities) as specified in WS BPEL.
+ * This includes detecting conflictingReceive and conflictingRequest faults.
* </p>
*/
public class IMAManager implements Serializable {
@@ -53,7 +53,7 @@ public class IMAManager implements Seria
/**
* finds conflictingReceive
- *
+ *
* @param selectors
* @return
*/
@@ -75,7 +75,7 @@ public class IMAManager implements Seria
/**
* Register IMA
- *
+ *
* @param pickResponseChannel
* response channel associated with this receive/pick
* @param selectors
@@ -109,7 +109,7 @@ public class IMAManager implements Seria
/**
* Registers Open IMA.
* It doesn't open IMA for non two way operations.
- *
+ *
* @param partnerLink
* @param opName
* @param mexId
@@ -134,7 +134,7 @@ public class IMAManager implements Seria
/**
* This is used to remove IMA from registered state.
- *
+ *
* @see #register(String, Selector[])
* @param pickResponseChannel
*/
@@ -154,7 +154,7 @@ public class IMAManager implements Seria
/**
* Release Open IMA.
- *
+ *
* @param plinkInstnace
* partner link
* @param opName
@@ -177,7 +177,7 @@ public class IMAManager implements Seria
}
return mexRef;
}
-
+
public void migrateRids(Map<OutstandingRequestManager.RequestIdTuple, OutstandingRequestManager.Entry> oldRids) {
for (OutstandingRequestManager.RequestIdTuple oldRid : oldRids.keySet()) {
OutstandingRequestManager.Entry oldEntry = oldRids.get(oldRid);
@@ -187,7 +187,7 @@ public class IMAManager implements Seria
_byOrid.put(orid, oldEntry.mexRef);
} else {
//registered IMA
- RequestIdTuple rid = new RequestIdTuple(oldRid.partnerLink, oldRid.opName);
+ RequestIdTuple rid = new RequestIdTuple(oldRid.partnerLink, oldRid.opName);
Entry entry = new Entry(oldEntry.pickResponseChannel, (Selector[]) oldEntry.selectors);
_byRid.put(rid, entry);
_byChannel.put(entry.pickResponseChannel, entry);
@@ -197,7 +197,7 @@ public class IMAManager implements Seria
/**
* "Release" all Open IMAs
- *
+ *
* @return a list of message exchange identifiers for message exchanges that were begun (receive/pick got a message) but not yet completed (reply not yet sent)
*/
public String[] releaseAll() {
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/InstanceLockManager.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/InstanceLockManager.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/InstanceLockManager.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/InstanceLockManager.java Thu May 27 18:09:53 2010
@@ -28,20 +28,20 @@ import java.util.concurrent.locks.Condit
import java.util.concurrent.locks.Lock;
/**
- *
+ *
* WARNING --- EXPERIMENTAL
- *
+ *
* Mechanism for obtaining instance-level locks. Very simple implementation at the moment, that is only valid
* for a single processing node. To move to multi-processor setup we'll need to implement this lock in the database.
- *
+ *
* @author Maciej Szefler - m s z e f l e r @ g m a i l . c o m
*/
public class InstanceLockManager {
private static final Log __log = LogFactory.getLog(InstanceLockManager.class);
-
+
private final Lock _mutex = new java.util.concurrent.locks.ReentrantLock();
private final Map<Long, InstanceInfo> _locks = new HashMap<Long,InstanceInfo> ();
-
+
public void lock(Long iid, int time, TimeUnit tu) throws InterruptedException, TimeoutException {
if (iid == null) return;
@@ -53,19 +53,19 @@ public class InstanceLockManager {
_mutex.lock();
try {
-
+
while (true) {
li = _locks.get(iid);
if (li == null) {
li = new InstanceInfo(iid, Thread.currentThread());
_locks.put(iid, li);
if (__log.isDebugEnabled())
- __log.debug(thrd + ": lock(iid=" + iid + ", time=" + time + tu+")-->GRANTED");
+ __log.debug(thrd + ": lock(iid=" + iid + ", time=" + time + tu+")-->GRANTED");
return;
} else {
if (__log.isDebugEnabled())
__log.debug(thrd + ": lock(iid=" + iid + ", time=" + time + tu+")-->WAITING(held by " + li.acquierer + ")");
-
+
if (!li.available.await(time, tu)) {
if (__log.isDebugEnabled())
__log.debug(thrd + ": lock(iid=" + iid + ", time=" + time + tu+")-->TIMEOUT (held by " + li.acquierer + ")");
@@ -73,69 +73,69 @@ public class InstanceLockManager {
}
}
}
-
+
} finally {
_mutex.unlock();
}
-
+
}
-
+
public void unlock(Long iid) {
if (iid == null) return;
String thrd = Thread.currentThread().toString();
if (__log.isDebugEnabled())
- __log.debug(thrd + ": unlock(iid=" + iid + ")");
+ __log.debug(thrd + ": unlock(iid=" + iid + ")");
_mutex.lock();
try {
InstanceInfo li = _locks.get(iid);
if (li == null)
throw new IllegalStateException("Instance not locked, cannot unlock!");
-
+
_locks.remove(iid);
-
- // Note, that we have to signall all threads, because new holder will create a new
+
+ // Note, that we have to signall all threads, because new holder will create a new
// instance of "available" condition variable, so all the waiters need to try again
li.available.signalAll();
-
+
} finally {
_mutex.unlock();
}
-
+
}
-
-
+
+
@Override
public String toString() {
return "{InstanceLockManager: " + _locks + "}";
}
-
+
/**
* Information about the lock state for a particular instance.
* @author Maciej Szefler - m s z e f l e r @ g m a i l . c o m
*/
private class InstanceInfo {
final long iid;
-
+
/** Thread that acquired the lock. */
final Thread acquierer;
/** Condition-Variable indicating that the lock has become available. */
Condition available = _mutex.newCondition();
-
+
InstanceInfo(long iid, Thread t) {
this.iid = iid;
this.acquierer = t;
}
-
+
@Override
public String toString() {
return "{Lock for Instance #" + iid +", acquired by " + acquierer + "}";
}
}
-
+
/** Exception class indicating a time-out occured while obtaining a lock. */
public static final class TimeoutException extends Exception {
private static final long serialVersionUID = 7247629086692580285L;
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/InterceptorContextImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/InterceptorContextImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/InterceptorContextImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/InterceptorContextImpl.java Thu May 27 18:09:53 2010
@@ -56,11 +56,11 @@ public class InterceptorContextImpl impl
public ProcessConf getProcessConf() {
return _pconf;
}
-
+
public BpelEngine getBpelEngine() {
return _bpelEngine;
}
-
+
public BpelProcess getBpelProcess() {
return _bpelProcess;
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MessageExchangeImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MessageExchangeImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MessageExchangeImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MessageExchangeImpl.java Thu May 27 18:09:53 2010
@@ -51,7 +51,7 @@ abstract class MessageExchangeImpl imple
protected EndpointReference _epr;
protected MessageExchangeDAO _dao;
-
+
/**
* Constructor: requires the minimal information for a message exchange.
*/
@@ -158,7 +158,7 @@ abstract class MessageExchangeImpl imple
setStatus(Status.FAULT);
getDAO().setFault(faultType);
getDAO().setResponse(((MessageImpl)outputFaultMessage)._dao);
-
+
responseReceived();
}
@@ -230,13 +230,13 @@ abstract class MessageExchangeImpl imple
}
public int getSubscriberCount() {
- return getDAO().getSubscriberCount();
+ return getDAO().getSubscriberCount();
}
-
+
public void setSubscriberCount(int subscriberCount) {
getDAO().setSubscriberCount(subscriberCount);
}
-
+
public void release() {
__log.debug("Releasing mex " + getMessageExchangeId());
// for a one-way, message exchanges are always deleted
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MessageImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MessageImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MessageImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MessageImpl.java Thu May 27 18:09:53 2010
@@ -135,5 +135,5 @@ public class MessageImpl implements Mess
}
return l;
}
-
+
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Messages.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Messages.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Messages.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/Messages.java Thu May 27 18:09:53 2010
@@ -29,7 +29,7 @@ import java.util.Map;
/**
* Message bundle used by the BPEL provider implementation.
- *
+ *
* @author mszefler
*/
public class Messages extends MessageBundle {
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MexDaoUtil.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MexDaoUtil.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MexDaoUtil.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MexDaoUtil.java Thu May 27 18:09:53 2010
@@ -31,7 +31,7 @@ import org.w3c.dom.Element;
/**
* Some handy utilities methods for dealing with MEX impls.
- *
+ *
*/
class MexDaoUtil {
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MyRoleMessageExchangeImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MyRoleMessageExchangeImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MyRoleMessageExchangeImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MyRoleMessageExchangeImpl.java Thu May 27 18:09:53 2010
@@ -74,13 +74,13 @@ public class MyRoleMessageExchangeImpl e
/**
* Process the message-exchange interceptors.
- *
+ *
* @param mex
* message exchange
* @return <code>true</code> if execution should continue, <code>false</code> otherwise
*/
private boolean processInterceptors(MyRoleMessageExchangeImpl mex, InterceptorInvoker invoker) {
- InterceptorContextImpl ictx = new InterceptorContextImpl(_engine._contexts.dao.getConnection(),
+ InterceptorContextImpl ictx = new InterceptorContextImpl(_engine._contexts.dao.getConnection(),
mex._dao.getProcess(), null, _engine, _process);
for (MessageExchangeInterceptor i : _engine.getGlobalInterceptors())
@@ -196,7 +196,7 @@ public class MyRoleMessageExchangeImpl e
/**
* Return a deep clone of the given message
- *
+ *
* @param message
* @return
*/
@@ -205,15 +205,15 @@ public class MyRoleMessageExchangeImpl e
clone.setMessage((Element) message.getMessage().cloneNode(true));
Map<String, Node> headerParts = message.getHeaderParts();
for (String partName : headerParts.keySet()) {
- clone.setHeaderPart(partName, (Element) headerParts.get(partName).cloneNode(true));
+ clone.setHeaderPart(partName, (Element) headerParts.get(partName).cloneNode(true));
}
Map<String, Node> parts = message.getHeaderParts();
for (String partName : parts.keySet()) {
- clone.setHeaderPart(partName, (Element) parts.get(partName).cloneNode(true));
+ clone.setHeaderPart(partName, (Element) parts.get(partName).cloneNode(true));
}
return clone;
}
-
+
@SuppressWarnings("unchecked")
static class ResponseFuture implements Future {
private String _clientId;
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/NStateLatch.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/NStateLatch.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/NStateLatch.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/NStateLatch.java Thu May 27 18:09:53 2010
@@ -29,12 +29,12 @@ import java.util.concurrent.locks.Reentr
/**
* An N state synchronization latch useful for implementing hydration/dehydration. The
* latch functions as follows. At any time, the latch is in one of N states and has a
- * count. Clients can "latch" and "release" the latch, which increments/decrements the
+ * count. Clients can "latch" and "release" the latch, which increments/decrements the
* count; however, when latching, a state must be specified. If the state does not match
* the current state, the latch blocks until the count is zero. Essentially, the latch
- * can change state only when the count is zero. Every time the latch changes state an
- * optional {@link Runnable} corresponding to the new state is executed.
- *
+ * can change state only when the count is zero. Every time the latch changes state an
+ * optional {@link Runnable} corresponding to the new state is executed.
+ *
* @author Maciej Szefler ( m s z e f l e r @ g m a i l . c o m )
*/
public class NStateLatch {
@@ -48,42 +48,42 @@ public class NStateLatch {
/** Action for state transition ?-->i */
protected Runnable _transitions[];
-
+
/** Synchronization lock .*/
- private Lock _lock;
-
+ private Lock _lock;
+
/** _depth == 0 condition. */
private Condition _depth0;
-
+
private boolean _transitioning = false;
/**
- * Constructor, the array of {@link Runnable}s defines the number of states and the transition
- * actions.
- * @param transitions action to perform when entering state x.
+ * Constructor, the array of {@link Runnable}s defines the number of states and the transition
+ * actions.
+ * @param transitions action to perform when entering state x.
*/
public NStateLatch(Runnable [] transitions) {
_transitions = transitions;
_lock = new ReentrantLock();
_depth0 = _lock.newCondition();
}
-
+
public void latch(int state) {
if (state >= _transitions.length || state < 0)
throw new IllegalArgumentException("Invalid state.");
-
+
_lock.lock();
try {
if (_transitioning )
throw new IllegalStateException("Manipulating latch from transition. ");
-
+
if (_state != state) {
// wait for the depth to become 0
- while (_depth != 0)
+ while (_depth != 0)
_depth0.awaitUninterruptibly();
-
+
if (_state != state) {
- if (_transitions[state] != null)
+ if (_transitions[state] != null)
try {
_transitioning = true;
_transitions[state].run();
@@ -98,11 +98,11 @@ public class NStateLatch {
_lock.unlock();
}
}
-
+
public void release(int state) {
_lock.lock();
try {
-
+
if (_transitioning )
throw new IllegalStateException("Manipulating latch from transition. ");
@@ -110,16 +110,16 @@ public class NStateLatch {
__log.error("Latch error, was releasing for state " + state + " but actually in " + _state);
if (_depth <= 0)
throw new IllegalStateException("Too many release() calls.");
-
+
_depth --;
-
+
if (_depth == 0)
_depth0.signal();
} finally {
_lock.unlock();
}
}
-
+
public int getDepth(int state) {
return (_state == state ? _depth : 0);
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/OutstandingRequestManager.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/OutstandingRequestManager.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/OutstandingRequestManager.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/OutstandingRequestManager.java Thu May 27 18:09:53 2010
@@ -38,11 +38,11 @@ import org.apache.commons.logging.LogFac
* reached in the script) and their association with a message exchange (for those receive/picks that have received
* a message). The purpose of this class is to 1) enable matching a reply activity to the corresponding receive/pick
* activity and 2) allow us to fault out message exchanges that have not been replied to when they go out of scope.
- * </p>
+ * </p>
* <p>
* Note, this class is only used for INBOUND synchronous (request-response) operations. None of this is necessary
- * for asynchronous messages.
- * </p>
+ * for asynchronous messages.
+ * </p>
*/
@Deprecated
public class OutstandingRequestManager implements Serializable {
@@ -73,8 +73,8 @@ public class OutstandingRequestManager i
}
/**
- * Register a receive/pick with the manager. This occurs when the receive/pick is encountered in the processing of
- * the BPEL script.
+ * Register a receive/pick with the manager. This occurs when the receive/pick is encountered in the processing of
+ * the BPEL script.
* @param pickResponseChannel response channel associated with this receive/pick
* @param selectors selectors for this receive/pick
*/
@@ -97,7 +97,7 @@ public class OutstandingRequestManager i
if (selectors[i].oneWay) {
continue;
}
-
+
final RequestIdTuple rid = new RequestIdTuple(selectors[i].plinkInstance,selectors[i].opName, selectors[i].messageExchangeId);
if (_byRid.containsKey(rid)) {
String errmsg = "INTERNAL ERROR: Duplicate ENTRY for RID " + rid;
@@ -111,7 +111,7 @@ public class OutstandingRequestManager i
}
/**
- * Cancel a previous registration.
+ * Cancel a previous registration.
* @see #register(String, Selector[])
* @param pickResponseChannel
*/
@@ -129,7 +129,7 @@ public class OutstandingRequestManager i
/**
* Associate a message exchange with a registered receive/pick. This happens when a message corresponding to the
- * receive/pick is received by the system.
+ * receive/pick is received by the system.
* @param pickResponseChannel
* @param mexRef
*/
@@ -160,9 +160,9 @@ public class OutstandingRequestManager i
/**
* Release the registration. This method is called when the reply activity sends a reply corresponding to the
- * registration.
- * @param plinkInstnace partner link
- * @param opName operation
+ * registration.
+ * @param plinkInstnace partner link
+ * @param opName operation
* @param mexId message exchange identifier IN THE BPEL SENSE OF THE TERM (i.e. a receive/reply disambiguator).
* @return message exchange identifier associated with the registration that matches the parameters
*/
@@ -190,8 +190,8 @@ public class OutstandingRequestManager i
/**
* "Release" all outstanding incoming messages exchanges. Makes the object forget about
* the previous registrations
- * @return a list of message exchange identifiers for message exchanges that were begun (receive/pick got a message)
- * but not yet completed (reply not yet sent)
+ * @return a list of message exchange identifiers for message exchanges that were begun (receive/pick got a message)
+ * but not yet completed (reply not yet sent)
*/
public String[] releaseAll() {
if (__log.isTraceEnabled())
@@ -213,7 +213,7 @@ public class OutstandingRequestManager i
"byChannel", _byChannel
});
}
-
+
public Map<RequestIdTuple, Entry> getRids() {
return _byRid;
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkMyRoleImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkMyRoleImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkMyRoleImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkMyRoleImpl.java Thu May 27 18:09:53 2010
@@ -93,7 +93,7 @@ public class PartnerLinkMyRoleImpl exten
public List<RoutingInfo> findRoute(MyRoleMessageExchangeImpl mex) {
List<RoutingInfo> routingInfos = new ArrayList<RoutingInfo>();
-
+
if (__log.isTraceEnabled()) {
__log.trace(ObjectPrinter.stringifyMethodEnter(this + ":inputMsgRcvd", new Object[] {
"messageExchange", mex }));
@@ -130,7 +130,7 @@ public class PartnerLinkMyRoleImpl exten
mex.setFailure(MessageExchange.FailureType.FORMAT_ERROR, ime.getMessage(), null);
return null;
}
-
+
String mySessionId = mex.getProperty(MessageExchange.PROPERTY_SEP_MYROLE_SESSIONID);
String partnerSessionId = mex.getProperty(MessageExchange.PROPERTY_SEP_PARTNERROLE_SESSIONID);
if (__log.isDebugEnabled()) {
@@ -149,7 +149,7 @@ public class PartnerLinkMyRoleImpl exten
routingInfos.add(new RoutingInfo(messageRoute, messageRoute.getCorrelationKeySet(), correlator, keySet));
}
}
-
+
if (routingInfos.size() == 0) {
routingInfos.add(new RoutingInfo(null, null, correlator, keySet));
}
@@ -206,8 +206,8 @@ public class PartnerLinkMyRoleImpl exten
mex.setCorrelationStatus(MyRoleMessageExchange.CorrelationStatus.CREATE_INSTANCE);
mex.getDAO().setInstance(newInstance);
if (mex.getDAO().getCreateTime() == null)
- mex.getDAO().setCreateTime(instance.getCurrentEventDateTime());
-
+ mex.getDAO().setCreateTime(instance.getCurrentEventDateTime());
+
instance.execute();
}
@@ -244,8 +244,8 @@ public class PartnerLinkMyRoleImpl exten
mex.setCorrelationStatus(MyRoleMessageExchange.CorrelationStatus.MATCHED);
mex.getDAO().setInstance(routing.messageRoute.getTargetInstance());
if (mex.getDAO().getCreateTime() == null)
- mex.getDAO().setCreateTime(instance.getCurrentEventDateTime());
-
+ mex.getDAO().setCreateTime(instance.getCurrentEventDateTime());
+
instance.execute();
}
@@ -254,8 +254,8 @@ public class PartnerLinkMyRoleImpl exten
mex.setFailure(MessageExchange.FailureType.NOMATCH, "No process instance matching correlation keys.", null);
} else {
// enqueue message with the last message route, as per the comments in caller (@see BpelProcess.invokeProcess())
- RoutingInfo routing =
- (routings != null && routings.size() > 0) ?
+ RoutingInfo routing =
+ (routings != null && routings.size() > 0) ?
routings.get(routings.size() - 1) : null;
if (routing != null) {
if (__log.isDebugEnabled()) {
@@ -265,13 +265,13 @@ public class PartnerLinkMyRoleImpl exten
// send event
CorrelationNoMatchEvent evt = new CorrelationNoMatchEvent(mex.getPortType().getQName(), mex
.getOperation().getName(), mex.getMessageExchangeId(), routing.wholeKeySet);
-
+
evt.setProcessId(_process.getProcessDAO().getProcessId());
evt.setProcessName(new QName(_process.getOProcess().targetNamespace, _process.getOProcess().getName()));
_process._debugger.onEvent(evt);
-
+
mex.setCorrelationStatus(MyRoleMessageExchange.CorrelationStatus.QUEUED);
-
+
// No match, means we add message exchange to the queue.
routing.correlator.enqueueMessage(mex.getDAO(), routing.wholeKeySet);
}
@@ -323,7 +323,7 @@ public class PartnerLinkMyRoleImpl exten
private CorrelationKey computeCorrelationKey(OScope.CorrelationSet cset, OMessageVarType messagetype,
Element msg) {
CorrelationKey key = null;
-
+
String[] values = new String[cset.properties.size()];
int jIdx = 0;
@@ -354,10 +354,10 @@ public class PartnerLinkMyRoleImpl exten
} else {
key = new CorrelationKey(cset.name, values);
}
-
+
return key;
}
-
+
@SuppressWarnings("unchecked")
public boolean isOneWayOnly() {
PortType portType = _plinkDef.myRolePortType;
@@ -370,5 +370,5 @@ public class PartnerLinkMyRoleImpl exten
}
}
return true;
- }
+ }
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkPartnerRoleImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkPartnerRoleImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkPartnerRoleImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkPartnerRoleImpl.java Thu May 27 18:09:53 2010
@@ -33,7 +33,7 @@ class PartnerLinkPartnerRoleImpl extends
Endpoint _initialPartner;
public PartnerRoleChannel _channel;
-
+
public boolean usePeer2Peer = true;
PartnerLinkPartnerRoleImpl(BpelProcess process, OPartnerLink plink, Endpoint initialPartner) {