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 17:52:38 UTC
svn commit: r948869 [7/20] - in /ode/trunk: ./
agents/src/main/java/org/apache/ode/agents/memory/ axis2-war/
axis2-war/src/main/assembly/ axis2-war/src/main/webapp/WEB-INF/conf/
axis2-war/src/main/webapp/js/ axis2-war/src/test/java/org/apache/ode/axis2...
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=948869&r1=948868&r2=948869&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 15:52:24 2010
@@ -86,14 +86,14 @@ public class PartnerLinkMyRoleImpl exten
public boolean isCreateInstance(MyRoleMessageExchangeImpl mex) {
Operation operation = getMyRoleOperation(mex.getOperationName());
if(operation == null) {
- return false;
+ return false;
}
return _plinkDef.isCreateInstanceOperation(operation);
}
public List<RoutingInfo> findRoute(MyRoleMessageExchangeImpl mex) {
- List<RoutingInfo> routingInfos = new ArrayList<RoutingInfo>();
-
+ List<RoutingInfo> routingInfos = new ArrayList<RoutingInfo>();
+
if (__log.isTraceEnabled()) {
__log.trace(ObjectPrinter.stringifyMethodEnter(this + ":inputMsgRcvd", new Object[] {
"messageExchange", mex }));
@@ -151,7 +151,7 @@ public class PartnerLinkMyRoleImpl exten
}
if (routingInfos.size() == 0) {
- routingInfos.add(new RoutingInfo(null, null, correlator, keySet));
+ routingInfos.add(new RoutingInfo(null, null, correlator, keySet));
}
return routingInfos;
@@ -219,7 +219,7 @@ public class PartnerLinkMyRoleImpl exten
}
ProcessInstanceDAO instanceDao = routing.messageRoute.getTargetInstance();
- BpelProcess process2 = _process._engine._activeProcesses.get(instanceDao.getProcess().getProcessId());
+ BpelProcess process2 = _process._engine._activeProcesses.get(instanceDao.getProcess().getProcessId());
// Reload process instance for DAO.
BpelRuntimeContextImpl instance = process2.createRuntimeContext(instanceDao, null, null);
@@ -231,7 +231,7 @@ public class PartnerLinkMyRoleImpl exten
// send process instance event
CorrelationMatchEvent evt = new CorrelationMatchEvent(new QName(process2.getOProcess().targetNamespace,
- process2.getOProcess().getName()), process2.getProcessDAO().getProcessId(),
+ process2.getOProcess().getName()), process2.getProcessDAO().getProcessId(),
instanceDao.getInstanceId(), routing.matchedKeySet);
evt.setPortType(mex.getPortType().getQName());
evt.setOperation(operation.getName());
@@ -253,28 +253,28 @@ public class PartnerLinkMyRoleImpl exten
if (!mex.isAsynchronous()) {
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) ?
- routings.get(routings.size() - 1) : null;
- if (routing != null) {
+ // enqueue message with the last message route, as per the comments in caller (@see BpelProcess.invokeProcess())
+ RoutingInfo routing =
+ (routings != null && routings.size() > 0) ?
+ routings.get(routings.size() - 1) : null;
+ if (routing != null) {
if (__log.isDebugEnabled()) {
__log.debug("INPUTMSG: " + routing.correlator.getCorrelatorId() + ": SAVING to DB (no match) ");
}
- // 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);
- }
+ // 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);
+ }
}
}
@@ -322,8 +322,8 @@ public class PartnerLinkMyRoleImpl exten
@SuppressWarnings("unchecked")
private CorrelationKey computeCorrelationKey(OScope.CorrelationSet cset, OMessageVarType messagetype,
Element msg) {
- CorrelationKey key = null;
-
+ CorrelationKey key = null;
+
String[] values = new String[cset.properties.size()];
int jIdx = 0;
@@ -350,9 +350,9 @@ public class PartnerLinkMyRoleImpl exten
}
if( cset.hasJoinUseCases ) {
- key = new OptionalCorrelationKey(cset.name, values);
+ key = new OptionalCorrelationKey(cset.name, values);
} else {
- key = new CorrelationKey(cset.name, values);
+ key = new CorrelationKey(cset.name, values);
}
return key;
@@ -360,15 +360,15 @@ public class PartnerLinkMyRoleImpl exten
@SuppressWarnings("unchecked")
public boolean isOneWayOnly() {
- PortType portType = _plinkDef.myRolePortType;
- if (portType == null) {
- return false;
- }
- for (Operation operation : (List<Operation>) portType.getOperations()) {
- if (operation.getOutput() != null) {
- return false;
- }
- }
- return true;
+ PortType portType = _plinkDef.myRolePortType;
+ if (portType == null) {
+ return false;
+ }
+ for (Operation operation : (List<Operation>) portType.getOperations()) {
+ if (operation.getOutput() != null) {
+ return false;
+ }
+ }
+ return true;
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerRoleMessageExchangeImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerRoleMessageExchangeImpl.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerRoleMessageExchangeImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerRoleMessageExchangeImpl.java Thu May 27 15:52:24 2010
@@ -92,14 +92,14 @@ public class PartnerRoleMessageExchangeI
@Override
void setResponse(Message outputMessage) throws BpelEngineException {
- // If pub-sub is enabled, we may receive multiple responses. In such cases,
- // don't bail out if our status is already set to RESPONSE.
- if (++responsesReceived > 1) {
- if (getSubscriberCount() > 1 && getStatus() == Status.RESPONSE) {
- return;
- }
- }
- super.setResponse(outputMessage);
+ // If pub-sub is enabled, we may receive multiple responses. In such cases,
+ // don't bail out if our status is already set to RESPONSE.
+ if (++responsesReceived > 1) {
+ if (getSubscriberCount() > 1 && getStatus() == Status.RESPONSE) {
+ return;
+ }
+ }
+ super.setResponse(outputMessage);
}
public void replyWithFailure(FailureType type, String description, Element details) throws BpelEngineException {
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java Thu May 27 15:52:24 2010
@@ -343,12 +343,12 @@ public class ProcessAndInstanceManagemen
}
private boolean garbage(String filter) {
- if(filter == null) {
- return false;
- }
+ if(filter == null) {
+ return false;
+ }
Matcher expressionMatcher = Filter.__comparatorPattern.matcher(filter);
if(!filter.trim().equals("") && !expressionMatcher.find()) {
- return true;
+ return true;
}
return false;
}
@@ -357,7 +357,7 @@ public class ProcessAndInstanceManagemen
InstanceInfoListDocument ret = InstanceInfoListDocument.Factory.newInstance();
final TInstanceInfoList infolist = ret.addNewInstanceInfoList();
if(garbage(filter)) {
- return ret;
+ return ret;
}
final InstanceFilter instanceFilter = new InstanceFilter(filter, order, limit);
try {
@@ -381,7 +381,7 @@ public class ProcessAndInstanceManagemen
InstanceInfoListDocument ret = InstanceInfoListDocument.Factory.newInstance();
final TInstanceInfoList infolist = ret.addNewInstanceInfoList();
if(garbage(filter)) {
- return ret;
+ return ret;
}
final InstanceFilter instanceFilter = new InstanceFilter(filter, order, limit);
try {
@@ -542,7 +542,7 @@ public class ProcessAndInstanceManagemen
final InstanceFilter instanceFilter = new InstanceFilter(filter);
final List<Long> ret = new LinkedList<Long>();
if(garbage(filter)) {
- return ret;
+ return ret;
}
try {
_db.exec(new BpelDatabase.Callable<Object>() {
@@ -910,15 +910,15 @@ public class ProcessAndInstanceManagemen
}
String findVersionStringFromNodeToken(String packageName) {
- int i = packageName.length() - 1;
- while( i > 0 && Character.isDigit(packageName.charAt(i)) ) {
- i--;
- }
- if( i < packageName.length() - 1 && packageName.charAt(i) == '-') {
- return packageName.substring(i + 1);
- }
-
- return null;
+ int i = packageName.length() - 1;
+ while( i > 0 && Character.isDigit(packageName.charAt(i)) ) {
+ i--;
+ }
+ if( i < packageName.length() - 1 && packageName.charAt(i) == '-') {
+ return packageName.substring(i + 1);
+ }
+
+ return null;
}
/**
@@ -1077,43 +1077,43 @@ public class ProcessAndInstanceManagemen
// if event generation was enabled
if(events!=null && events.size() >0) {
- ActivityStateDocumentBuilder b = new ActivityStateDocumentBuilder();
- for (BpelEvent e : events)
- b.onEvent(e);
- for (ActivityInfoDocument ai : b.getActivities()) {
- for (ActivityRecoveryDAO recovery : recoveries) {
- if (String.valueOf(recovery.getActivityId()).equals(ai.getActivityInfo().getAiid())) {
- TFailureInfo failure = ai.getActivityInfo().addNewFailure();
- failure.setReason(recovery.getReason());
- failure.setDtFailure(toCalendar(recovery.getDateTime()));
- failure.setActions(recovery.getActions());
- failure.setRetries(recovery.getRetries());
- ai.getActivityInfo().setStatus(TActivityStatus.FAILURE);
- }
- }
- activities.addNewActivityInfo().set(ai.getActivityInfo());
- }
+ ActivityStateDocumentBuilder b = new ActivityStateDocumentBuilder();
+ for (BpelEvent e : events)
+ b.onEvent(e);
+ for (ActivityInfoDocument ai : b.getActivities()) {
+ for (ActivityRecoveryDAO recovery : recoveries) {
+ if (String.valueOf(recovery.getActivityId()).equals(ai.getActivityInfo().getAiid())) {
+ TFailureInfo failure = ai.getActivityInfo().addNewFailure();
+ failure.setReason(recovery.getReason());
+ failure.setDtFailure(toCalendar(recovery.getDateTime()));
+ failure.setActions(recovery.getActions());
+ failure.setRetries(recovery.getRetries());
+ ai.getActivityInfo().setStatus(TActivityStatus.FAILURE);
+ }
+ }
+ activities.addNewActivityInfo().set(ai.getActivityInfo());
+ }
}
// otherwise at least try to get the information about failed activities
// TODO: we are losing information about which scope does failed activities belong to
// as failure table does not have scope id, we would attach every failed activity to process scope
else {
- if(scope.getParentScope() == null) {
- for (ActivityRecoveryDAO recovery : recoveries) {
- ActivityInfoDocument ai = ActivityInfoDocument.Factory.newInstance();
- ai.addNewActivityInfo().setAiid(String.valueOf(recovery.getActivityId()));
- ai.getActivityInfo().setType("OActivity");
- ai.getActivityInfo().setScope(TScopeRef.Factory.newInstance());
- TFailureInfo failure = ai.getActivityInfo().addNewFailure();
- failure.setReason(recovery.getReason());
- failure.setDtFailure(toCalendar(recovery.getDateTime()));
- failure.setActions(recovery.getActions());
- failure.setRetries(recovery.getRetries());
- ai.getActivityInfo().setStatus(TActivityStatus.FAILURE);
- activities.addNewActivityInfo().set(ai.getActivityInfo());
- }
- }
+ if(scope.getParentScope() == null) {
+ for (ActivityRecoveryDAO recovery : recoveries) {
+ ActivityInfoDocument ai = ActivityInfoDocument.Factory.newInstance();
+ ai.addNewActivityInfo().setAiid(String.valueOf(recovery.getActivityId()));
+ ai.getActivityInfo().setType("OActivity");
+ ai.getActivityInfo().setScope(TScopeRef.Factory.newInstance());
+ TFailureInfo failure = ai.getActivityInfo().addNewFailure();
+ failure.setReason(recovery.getReason());
+ failure.setDtFailure(toCalendar(recovery.getDateTime()));
+ failure.setActions(recovery.getActions());
+ failure.setRetries(recovery.getRetries());
+ ai.getActivityInfo().setStatus(TActivityStatus.FAILURE);
+ activities.addNewActivityInfo().set(ai.getActivityInfo());
+ }
+ }
}
}
@@ -1235,8 +1235,8 @@ public class ProcessAndInstanceManagemen
info.setVariableName(((VariableEvent) event).getVarName());
}
if(event instanceof VariableModificationEvent) {
- if(((VariableModificationEvent) event).getNewValue()!=null)
- info.setNewValue(DOMUtils.domToString(((VariableModificationEvent) event).getNewValue()));
+ if(((VariableModificationEvent) event).getNewValue()!=null)
+ info.setNewValue(DOMUtils.domToString(((VariableModificationEvent) event).getNewValue()));
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementMBean.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementMBean.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementMBean.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementMBean.java Thu May 27 15:52:24 2010
@@ -47,109 +47,109 @@ import org.apache.ode.bpel.iapi.ProcessS
*/
public class ProcessAndInstanceManagementMBean implements DynamicMBean {
- private MBeanInfo _mbeanInfo;
- private ProcessAndInstanceManagementImpl _pm;
+ private MBeanInfo _mbeanInfo;
+ private ProcessAndInstanceManagementImpl _pm;
- private static final List<String> __excludes = new ArrayList<String>();
- static {
- __excludes.add("hashCode");
- __excludes.add("equals");
- __excludes.add("getClass");
- __excludes.add("wait");
- __excludes.add("notify");
- __excludes.add("notifyAll");
- __excludes.add("toString");
- }
-
- private final static Hashtable<String, Class<?>> primitives = new Hashtable<String, Class<?>>();
- static {
- primitives.put(Boolean.TYPE.toString(), Boolean.TYPE);
- primitives.put(Character.TYPE.toString(), Character.TYPE);
- primitives.put(Byte.TYPE.toString(), Byte.TYPE);
- primitives.put(Short.TYPE.toString(), Short.TYPE);
- primitives.put(Integer.TYPE.toString(), Integer.TYPE);
- primitives.put(Long.TYPE.toString(), Long.TYPE);
- primitives.put(Float.TYPE.toString(), Float.TYPE);
- primitives.put(Double.TYPE.toString(), Double.TYPE);
- }
-
- public ProcessAndInstanceManagementMBean(BpelServer server, ProcessStore store) {
- this(new ProcessAndInstanceManagementImpl(server, store));
- }
-
- /**
- */
- public ProcessAndInstanceManagementMBean(ProcessAndInstanceManagementImpl pm) {
- _pm = pm;
- List<MBeanOperationInfo> exposedOperations = new ArrayList<MBeanOperationInfo>();
- for (Method m : pm.getClass().getMethods()) {
- if (!__excludes.contains(m.getName())) {
- exposedOperations.add(new MBeanOperationInfo(m.getName(), m));
- }
- }
-
- MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[] {};
- MBeanConstructorInfo[] constructors = new MBeanConstructorInfo[] {};
- MBeanOperationInfo[] operations = new MBeanOperationInfo[exposedOperations.size()];
- operations = (MBeanOperationInfo[]) exposedOperations.toArray(operations);
- MBeanNotificationInfo[] notifications = new MBeanNotificationInfo[] {};
-
- _mbeanInfo = new MBeanInfo(getClass().getName(), "Process and Instance Management",
- attributes, constructors, operations, notifications);
- }
-
- public Object getAttribute(String attribute)
- throws AttributeNotFoundException, MBeanException,
- ReflectionException {
- throw new UnsupportedOperationException();
- }
-
- public AttributeList getAttributes(String[] attributes) {
- throw new UnsupportedOperationException();
- }
-
- public MBeanInfo getMBeanInfo() {
- return _mbeanInfo;
- }
-
- public Object invoke(String actionName, Object[] params, String[] signature)
- throws MBeanException, ReflectionException {
- try {
- Method m = _pm.getClass().getMethod(actionName, findTypes(_pm.getClass().getClassLoader(), signature));
- if (m == null) {
- throw new ReflectionException(new NoSuchMethodException(actionName));
- }
- return m.invoke(_pm, params);
- } catch (Exception e) {
- throw new ReflectionException(e);
- }
- }
-
- private Class[] findTypes(ClassLoader loader, String[] signature) throws ReflectionException {
- if (signature == null)
- return null;
- final Class[] result = new Class[signature.length];
- try {
- for (int i = 0; i < signature.length; i++) {
- result[i] = primitives.get(signature[i]);
- if (result[i] == null) {
- result[i] = Class.forName(signature[i], false, loader);
- }
- }
- } catch (ClassNotFoundException e) {
- throw new ReflectionException(e);
- }
- return result;
- }
-
- public void setAttribute(Attribute attribute)
- throws AttributeNotFoundException, InvalidAttributeValueException,
- MBeanException, ReflectionException {
- throw new UnsupportedOperationException();
- }
-
- public AttributeList setAttributes(AttributeList attributes) {
- throw new UnsupportedOperationException();
- }
+ private static final List<String> __excludes = new ArrayList<String>();
+ static {
+ __excludes.add("hashCode");
+ __excludes.add("equals");
+ __excludes.add("getClass");
+ __excludes.add("wait");
+ __excludes.add("notify");
+ __excludes.add("notifyAll");
+ __excludes.add("toString");
+ }
+
+ private final static Hashtable<String, Class<?>> primitives = new Hashtable<String, Class<?>>();
+ static {
+ primitives.put(Boolean.TYPE.toString(), Boolean.TYPE);
+ primitives.put(Character.TYPE.toString(), Character.TYPE);
+ primitives.put(Byte.TYPE.toString(), Byte.TYPE);
+ primitives.put(Short.TYPE.toString(), Short.TYPE);
+ primitives.put(Integer.TYPE.toString(), Integer.TYPE);
+ primitives.put(Long.TYPE.toString(), Long.TYPE);
+ primitives.put(Float.TYPE.toString(), Float.TYPE);
+ primitives.put(Double.TYPE.toString(), Double.TYPE);
+ }
+
+ public ProcessAndInstanceManagementMBean(BpelServer server, ProcessStore store) {
+ this(new ProcessAndInstanceManagementImpl(server, store));
+ }
+
+ /**
+ */
+ public ProcessAndInstanceManagementMBean(ProcessAndInstanceManagementImpl pm) {
+ _pm = pm;
+ List<MBeanOperationInfo> exposedOperations = new ArrayList<MBeanOperationInfo>();
+ for (Method m : pm.getClass().getMethods()) {
+ if (!__excludes.contains(m.getName())) {
+ exposedOperations.add(new MBeanOperationInfo(m.getName(), m));
+ }
+ }
+
+ MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[] {};
+ MBeanConstructorInfo[] constructors = new MBeanConstructorInfo[] {};
+ MBeanOperationInfo[] operations = new MBeanOperationInfo[exposedOperations.size()];
+ operations = (MBeanOperationInfo[]) exposedOperations.toArray(operations);
+ MBeanNotificationInfo[] notifications = new MBeanNotificationInfo[] {};
+
+ _mbeanInfo = new MBeanInfo(getClass().getName(), "Process and Instance Management",
+ attributes, constructors, operations, notifications);
+ }
+
+ public Object getAttribute(String attribute)
+ throws AttributeNotFoundException, MBeanException,
+ ReflectionException {
+ throw new UnsupportedOperationException();
+ }
+
+ public AttributeList getAttributes(String[] attributes) {
+ throw new UnsupportedOperationException();
+ }
+
+ public MBeanInfo getMBeanInfo() {
+ return _mbeanInfo;
+ }
+
+ public Object invoke(String actionName, Object[] params, String[] signature)
+ throws MBeanException, ReflectionException {
+ try {
+ Method m = _pm.getClass().getMethod(actionName, findTypes(_pm.getClass().getClassLoader(), signature));
+ if (m == null) {
+ throw new ReflectionException(new NoSuchMethodException(actionName));
+ }
+ return m.invoke(_pm, params);
+ } catch (Exception e) {
+ throw new ReflectionException(e);
+ }
+ }
+
+ private Class[] findTypes(ClassLoader loader, String[] signature) throws ReflectionException {
+ if (signature == null)
+ return null;
+ final Class[] result = new Class[signature.length];
+ try {
+ for (int i = 0; i < signature.length; i++) {
+ result[i] = primitives.get(signature[i]);
+ if (result[i] == null) {
+ result[i] = Class.forName(signature[i], false, loader);
+ }
+ }
+ } catch (ClassNotFoundException e) {
+ throw new ReflectionException(e);
+ }
+ return result;
+ }
+
+ public void setAttribute(Attribute attribute)
+ throws AttributeNotFoundException, InvalidAttributeValueException,
+ MBeanException, ReflectionException {
+ throw new UnsupportedOperationException();
+ }
+
+ public AttributeList setAttributes(AttributeList attributes) {
+ throw new UnsupportedOperationException();
+ }
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessStatusConverter.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessStatusConverter.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessStatusConverter.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessStatusConverter.java Thu May 27 15:52:24 2010
@@ -38,7 +38,7 @@ class ProcessStatusConverter {
* A mapping from the interface status codes, to the internal ODE status codes.
*/
private final Map<TInstanceStatus.Enum, BitSet> __interfaceStatusCodeToInternalStatusCodeMap =
- new HashMap<TInstanceStatus.Enum,BitSet>();
+ new HashMap<TInstanceStatus.Enum,BitSet>();
/**
* One-to-one map between internal/external representation of the scope
@@ -48,17 +48,17 @@ class ProcessStatusConverter {
new HashMap<ScopeStateEnum, TScopeStatus.Enum>();
ProcessStatusConverter() {
-
- for (int i = 0 ; i < ProcessState.ALL_STATES.length; ++i){
- short pistate = ProcessState.ALL_STATES[i];
- TInstanceStatus.Enum intstc = cvtInstanceStatus(pistate);
- BitSet bset = __interfaceStatusCodeToInternalStatusCodeMap.get(intstc);
- if (bset == null) {
- bset = new BitSet();
- __interfaceStatusCodeToInternalStatusCodeMap.put(intstc,bset);
- }
- bset.set(pistate);
- }
+
+ for (int i = 0 ; i < ProcessState.ALL_STATES.length; ++i){
+ short pistate = ProcessState.ALL_STATES[i];
+ TInstanceStatus.Enum intstc = cvtInstanceStatus(pistate);
+ BitSet bset = __interfaceStatusCodeToInternalStatusCodeMap.get(intstc);
+ if (bset == null) {
+ bset = new BitSet();
+ __interfaceStatusCodeToInternalStatusCodeMap.put(intstc,bset);
+ }
+ bset.set(pistate);
+ }
__scopeStateMap.put(ScopeStateEnum.ACTIVE, TScopeStatus.ACTIVE);
__scopeStateMap.put(ScopeStateEnum.COMPLETED,TScopeStatus.COMPLETED);
@@ -104,16 +104,16 @@ class ProcessStatusConverter {
* @return internal states corresponding to the requested interface representation.
*/
short[] cvtInstanceStatus(TInstanceStatus.Enum status) {
- BitSet bset = __interfaceStatusCodeToInternalStatusCodeMap.get(status);
- if (bset == null)
- return new short[0];
-
- short ret[] = new short[bset.cardinality()];
- for (int i = 0; i < ret.length; ++i) {
- ret[i] = (short)bset.nextSetBit(i==0?0:ret[i-1]+1);
- }
+ BitSet bset = __interfaceStatusCodeToInternalStatusCodeMap.get(status);
+ if (bset == null)
+ return new short[0];
+
+ short ret[] = new short[bset.cardinality()];
+ for (int i = 0; i < ret.length; ++i) {
+ ret[i] = (short)bset.nextSetBit(i==0?0:ret[i-1]+1);
+ }
- return ret;
+ return ret;
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/SharedEndpoints.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/SharedEndpoints.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/SharedEndpoints.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/SharedEndpoints.java Thu May 27 15:52:24 2010
@@ -44,7 +44,7 @@ public class SharedEndpoints {
* Creates a new SharedEndpoints object.
*/
public SharedEndpoints() {
- init();
+ init();
}
/**
@@ -111,16 +111,16 @@ public class SharedEndpoints {
}
public int getReferenceCount(EndpointReference epr) {
- int referenceCount = 0;
- for (Endpoint endpoint : _eprs.keySet()) {
- if (_eprs.get(endpoint).equals(epr)) {
- for (Endpoint reference : _referenceCounts) {
- if (reference.equals(endpoint)) {
- ++referenceCount;
- }
- }
- }
- }
- return referenceCount;
+ int referenceCount = 0;
+ for (Endpoint endpoint : _eprs.keySet()) {
+ if (_eprs.get(endpoint).equals(epr)) {
+ for (Endpoint reference : _referenceCounts) {
+ if (reference.equals(endpoint)) {
+ ++referenceCount;
+ }
+ }
+ }
+ }
+ return referenceCount;
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/MigrationHandler.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/MigrationHandler.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/MigrationHandler.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/MigrationHandler.java Thu May 27 15:52:24 2010
@@ -48,7 +48,7 @@ public class MigrationHandler {
private Contexts _contexts;
private List<MigrationLink> migrationLinks = new ArrayList<MigrationLink>() {{
add(new MigrationLink(1, 2, new Migration[] { new CorrelatorsMigration(),
- new CorrelationKeyMigration() } ));
+ new CorrelationKeyMigration() } ));
add(new MigrationLink(2, 3, new Migration[] { new CorrelationKeySetMigration() } ));
add(new MigrationLink(4, 3, new Migration[] { new CorrelationKeySetMigration() } ));
add(new MigrationLink(3, 5, new Migration[] { new CorrelationKeySetDataMigration() } ));
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/evtproc/ActivityStateDocumentBuilder.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/evtproc/ActivityStateDocumentBuilder.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/evtproc/ActivityStateDocumentBuilder.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/evtproc/ActivityStateDocumentBuilder.java Thu May 27 15:52:24 2010
@@ -56,8 +56,8 @@ public class ActivityStateDocumentBuilde
private Long _scope;
- public ActivityStateDocumentBuilder() {
- }
+ public ActivityStateDocumentBuilder() {
+ }
public List<ActivityInfoDocument> getActivities() {
return _activitiesOrdered;
@@ -103,7 +103,7 @@ public class ActivityStateDocumentBuilde
}
}
- }
+ }
private void completed(ActivityInfoDocument ainf) {
if (_removeCompleted) {
@@ -139,12 +139,12 @@ public class ActivityStateDocumentBuilde
info.getScope().setSiid("" + event.getScopeId());
}
- public void shutdown() {
- // do nothing
- }
-
- public void startup(Properties configProperties) {
- // do nothing
- }
+ public void shutdown() {
+ // do nothing
+ }
+
+ public void startup(Properties configProperties) {
+ // do nothing
+ }
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/DbExternalVariable.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/DbExternalVariable.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/DbExternalVariable.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/DbExternalVariable.java Thu May 27 15:52:24 2010
@@ -50,212 +50,212 @@ import org.w3c.dom.NodeList;
class DbExternalVariable {
private static final Log __log = LogFactory.getLog(DbExternalVariable.class);
- private static final String XSI_NS = "http://www.w3.org/2001/XMLSchema-instance";
+ private static final String XSI_NS = "http://www.w3.org/2001/XMLSchema-instance";
- EVarId evarId;
+ EVarId evarId;
- DataSource dataSource;
+ DataSource dataSource;
- final ArrayList<Column> _columns = new ArrayList<Column>();
+ final ArrayList<Column> _columns = new ArrayList<Column>();
- private final HashMap<String, Column> _colmap = new HashMap<String, Column>();
+ private final HashMap<String, Column> _colmap = new HashMap<String, Column>();
- final ArrayList<Column> _keycolumns = new ArrayList<Column>();
+ final ArrayList<Column> _keycolumns = new ArrayList<Column>();
- final ArrayList<Column> _inscolumns = new ArrayList<Column>();
+ final ArrayList<Column> _inscolumns = new ArrayList<Column>();
- final ArrayList<Column> _updcolumns = new ArrayList<Column>();
+ final ArrayList<Column> _updcolumns = new ArrayList<Column>();
- InitType _initType = InitType.update_insert;
+ InitType _initType = InitType.update_insert;
- public String[] _autoColNames;
+ public String[] _autoColNames;
- String select;
+ String select;
- String insert;
+ String insert;
- String update;
+ String update;
- String table;
+ String table;
String schema; // table schema
- /** Does the database support retrieval of generated keys? */
- boolean generatedKeys;
+ /** Does the database support retrieval of generated keys? */
+ boolean generatedKeys;
- DbExternalVariable(EVarId evar, DataSource ds) {
- this.evarId = evar;
- this.dataSource = ds;
- }
-
- Column getColumn(String key) {
- return _colmap.get(key);
- }
-
- void addColumn(Column c) {
- c.idx = _columns.size();
- _colmap.put(c.name, c);
- _columns.add(c);
- if (c.key) {
- _keycolumns.add(c);
- _autoColNames = new String[_keycolumns.size()];
- for (int i = 0; i < _autoColNames.length; ++i)
- _autoColNames[i] = _keycolumns.get(i).colname;
- }
- createSelect();
- createInsert();
- createUpdate();
- }
-
- public int numColumns() {
- return _columns.size();
- }
-
- /**
- * Create a key from a locator.
- */
- RowKey keyFromLocator(Locator locator) throws ExternalVariableModuleException {
- RowKey rc = new RowKey();
- parseXmlRow(rc, locator.reference);
-
+ DbExternalVariable(EVarId evar, DataSource ds) {
+ this.evarId = evar;
+ this.dataSource = ds;
+ }
+
+ Column getColumn(String key) {
+ return _colmap.get(key);
+ }
+
+ void addColumn(Column c) {
+ c.idx = _columns.size();
+ _colmap.put(c.name, c);
+ _columns.add(c);
+ if (c.key) {
+ _keycolumns.add(c);
+ _autoColNames = new String[_keycolumns.size()];
+ for (int i = 0; i < _autoColNames.length; ++i)
+ _autoColNames[i] = _keycolumns.get(i).colname;
+ }
+ createSelect();
+ createInsert();
+ createUpdate();
+ }
+
+ public int numColumns() {
+ return _columns.size();
+ }
+
+ /**
+ * Create a key from a locator.
+ */
+ RowKey keyFromLocator(Locator locator) throws ExternalVariableModuleException {
+ RowKey rc = new RowKey();
+ parseXmlRow(rc, locator.reference);
+
// Put in the static goodies such as pid/iid
- for (Column c : rc._columns) {
- switch (c.genType) {
- case iid:
- case pid:
+ for (Column c : rc._columns) {
+ switch (c.genType) {
+ case iid:
+ case pid:
rc.put(c.name, c.getValue(c.name, null, null, locator.iid));
- break;
- }
- }
-
- return rc;
- }
-
- private void createSelect() {
- StringBuilder sb = new StringBuilder("select ");
- boolean first = true;
- for (Column c : _columns) {
- if (!first) {
- sb.append(',');
- }
- first = false;
-
- sb.append(c.colname);
- }
- sb.append(" from ");
- sb.append(schema + "." + table);
- if (_keycolumns.size() > 0) {
- sb.append(" where ");
- first = true;
-
- for (Column kc : _keycolumns) {
- if (!first) {
- sb.append(" and ");
- }
- first = false;
-
- sb.append(kc.colname);
- sb.append(" = ?");
- }
- select = sb.toString();
-
- } else {
- select = null;
- }
- }
-
- private void createUpdate() {
- _updcolumns.clear();
- StringBuilder sb = new StringBuilder("update ");
- sb.append(schema + "." + table);
- sb.append(" set ");
- boolean first = true;
- for (Column c : _columns) {
- // Don't ever update keys or sequences or create time stamps
+ break;
+ }
+ }
+
+ return rc;
+ }
+
+ private void createSelect() {
+ StringBuilder sb = new StringBuilder("select ");
+ boolean first = true;
+ for (Column c : _columns) {
+ if (!first) {
+ sb.append(',');
+ }
+ first = false;
+
+ sb.append(c.colname);
+ }
+ sb.append(" from ");
+ sb.append(schema + "." + table);
+ if (_keycolumns.size() > 0) {
+ sb.append(" where ");
+ first = true;
+
+ for (Column kc : _keycolumns) {
+ if (!first) {
+ sb.append(" and ");
+ }
+ first = false;
+
+ sb.append(kc.colname);
+ sb.append(" = ?");
+ }
+ select = sb.toString();
+
+ } else {
+ select = null;
+ }
+ }
+
+ private void createUpdate() {
+ _updcolumns.clear();
+ StringBuilder sb = new StringBuilder("update ");
+ sb.append(schema + "." + table);
+ sb.append(" set ");
+ boolean first = true;
+ for (Column c : _columns) {
+ // Don't ever update keys or sequences or create time stamps
if (c.genType == GenType.sequence || c.key || c.genType == GenType.ctimestamp)
- continue;
+ continue;
+
+ if (!first)
+ sb.append(", ");
+ first = false;
+
+ sb.append(c.colname);
+ sb.append(" = ");
+ if (c.genType == GenType.expression)
+ sb.append(c.expression);
+ else {
+ sb.append(" ?");
+ _updcolumns.add(c);
+ }
+ }
+
+ if (_keycolumns.size() > 0) {
+ sb.append(" where ");
+ first = true;
+
+ for (Column kc : _keycolumns) {
+ if (!first) {
+ sb.append(" and ");
+ }
+ first = false;
- if (!first)
- sb.append(", ");
- first = false;
-
- sb.append(c.colname);
- sb.append(" = ");
- if (c.genType == GenType.expression)
- sb.append(c.expression);
- else {
- sb.append(" ?");
- _updcolumns.add(c);
- }
- }
-
- if (_keycolumns.size() > 0) {
- sb.append(" where ");
- first = true;
-
- for (Column kc : _keycolumns) {
- if (!first) {
- sb.append(" and ");
- }
- first = false;
-
- sb.append(kc.colname);
- sb.append(" = ?");
- }
- }
-
- // If we have no key columns, we cannot do an update
- if (_keycolumns.size() == 0)
- update = null;
- else
- update = sb.toString();
- }
-
- private void createInsert() {
- _inscolumns.clear();
- StringBuilder sb = new StringBuilder("insert into ");
- sb.append(schema + "." + table);
- sb.append(" ( ");
- boolean first = true;
- for (Column c : _columns) {
- if (c.genType == GenType.sequence)
- continue;
-
- if (!first)
- sb.append(',');
-
- first = false;
- sb.append(c.colname);
- }
- sb.append(" ) ");
-
- sb.append(" values ( ");
-
- first = true;
- for (Column c : _columns) {
- if (c.genType == GenType.sequence)
- continue;
- if (!first)
- sb.append(',');
- first = false;
-
- if (c.genType == GenType.expression)
- sb.append(c.expression);
- else {
- sb.append(" ? ");
- _inscolumns.add(c);
- }
- }
- sb.append(" ) ");
+ sb.append(kc.colname);
+ sb.append(" = ?");
+ }
+ }
+
+ // If we have no key columns, we cannot do an update
+ if (_keycolumns.size() == 0)
+ update = null;
+ else
+ update = sb.toString();
+ }
+
+ private void createInsert() {
+ _inscolumns.clear();
+ StringBuilder sb = new StringBuilder("insert into ");
+ sb.append(schema + "." + table);
+ sb.append(" ( ");
+ boolean first = true;
+ for (Column c : _columns) {
+ if (c.genType == GenType.sequence)
+ continue;
- insert = sb.toString();
+ if (!first)
+ sb.append(',');
- }
+ first = false;
+ sb.append(c.colname);
+ }
+ sb.append(" ) ");
+
+ sb.append(" values ( ");
+
+ first = true;
+ for (Column c : _columns) {
+ if (c.genType == GenType.sequence)
+ continue;
+ if (!first)
+ sb.append(',');
+ first = false;
+
+ if (c.genType == GenType.expression)
+ sb.append(c.expression);
+ else {
+ sb.append(" ? ");
+ _inscolumns.add(c);
+ }
+ }
+ sb.append(" ) ");
+
+ insert = sb.toString();
+
+ }
<T extends RowSubset> Element renderXmlRow(Locator locator, QName varType, T value) throws ExternalVariableModuleException {
- Document doc = DOMUtils.newDocument();
+ Document doc = DOMUtils.newDocument();
Element el = doc.createElementNS(varType.getNamespaceURI(), varType.getLocalPart());
- doc.appendChild(el);
+ doc.appendChild(el);
if (value != null) {
for (Column c : value._columns) {
Object data = value.get(c.idx);
@@ -269,8 +269,8 @@ class DbExternalVariable {
addElement(el, varType, c, data);
}
}
- return el;
- }
+ return el;
+ }
private void addElement(Element parent, QName varType, Column c, Object data) {
Document doc = parent.getOwnerDocument();
@@ -284,165 +284,165 @@ class DbExternalVariable {
parent.appendChild(cel);
}
- <T extends RowSubset> T parseXmlRow(T ret, Node rowel)
- throws ExternalVariableModuleException {
- if (rowel == null)
- return ret;
-
- NodeList nl = rowel.getChildNodes();
+ <T extends RowSubset> T parseXmlRow(T ret, Node rowel)
+ throws ExternalVariableModuleException {
+ if (rowel == null)
+ return ret;
+
+ NodeList nl = rowel.getChildNodes();
if (__log.isDebugEnabled()) __log.debug("parseXmlRow: element="+rowel.getLocalName());
- for (int i = 0; i < nl.getLength(); ++i) {
- Node n = nl.item(i);
- if (n.getNodeType() != Node.ELEMENT_NODE)
- continue;
- String key = n.getLocalName();
- String val = n.getTextContent();
+ for (int i = 0; i < nl.getLength(); ++i) {
+ Node n = nl.item(i);
+ if (n.getNodeType() != Node.ELEMENT_NODE)
+ continue;
+ String key = n.getLocalName();
+ String val = n.getTextContent();
if (__log.isDebugEnabled()) __log.debug("Extvar key: "+key+" value: "+val);
- Column column = ret.getColumn(key);
+ Column column = ret.getColumn(key);
if (column == null) {
if (__log.isDebugEnabled()) __log.debug("No matching column for key '"+key+"'");
- continue;
+ continue;
}
- String nil = ((Element) n).getAttributeNS(XSI_NS, "nil");
+ String nil = ((Element) n).getAttributeNS(XSI_NS, "nil");
if (nil != null && "true".equalsIgnoreCase(nil) && (val == null || val.trim().length() == 0)) {
if (__log.isDebugEnabled()) __log.debug("Extvar key: "+key+" is null (xsi:nil)");
- ret.put(key, null);
+ ret.put(key, null);
} else {
- ret.put(key, column.fromText(val));
+ ret.put(key, column.fromText(val));
}
- }
- return ret;
- }
+ }
+ return ret;
+ }
- class Column {
+ class Column {
- int idx;
+ int idx;
- /** name of the column */
+ /** name of the column */
final String name;
- /** database name of the column (in case we need to override */
+ /** database name of the column (in case we need to override */
final String colname;
- /** Is this a key column? */
+ /** Is this a key column? */
final boolean key;
- /** Type of value generator to use for creating values for this column. */
+ /** Type of value generator to use for creating values for this column. */
final GenType genType;
- /** The (SQL) expression used to populate the column. */
+ /** The (SQL) expression used to populate the column. */
final String expression;
- /** The SQL data type of this column, one of java.sql.Types */
- int dataType;
+ /** The SQL data type of this column, one of java.sql.Types */
+ int dataType;
- /** Indicates NULL values are OK */
- boolean nullok;
+ /** Indicates NULL values are OK */
+ boolean nullok;
Column(String name, String colname, boolean key, GenType genType, String expression) {
- this.name = name;
- this.colname = colname == null ? name : colname;
- this.key = key;
- this.genType = genType;
- this.expression = expression;
- }
+ this.name = name;
+ this.colname = colname == null ? name : colname;
+ this.key = key;
+ this.genType = genType;
+ this.expression = expression;
+ }
public Object getValue(String name, RowKey keys, RowVal values, Long iid) {
- switch (genType) {
- case ctimestamp:
- case utimestamp:
- return isTimeStamp() ? new Timestamp(new Date().getTime())
- : new Date();
- case uuid:
- return new GUID().toString();
- case pid:
- return evarId.pid.toString();
- case iid:
- return iid;
- case none:
- default:
+ switch (genType) {
+ case ctimestamp:
+ case utimestamp:
+ return isTimeStamp() ? new Timestamp(new Date().getTime())
+ : new Date();
+ case uuid:
+ return new GUID().toString();
+ case pid:
+ return evarId.pid.toString();
+ case iid:
+ return iid;
+ case none:
+ default:
if (key && keys.get(name) != null)
return keys.get(name);
else
return values.get(name);
- }
- }
+ }
+ }
boolean supportsEmptyValue() {
return (dataType == Types.VARCHAR || dataType == Types.LONGVARCHAR || dataType == Types.CLOB);
}
- /**
- * Return <code>true</code> if column is a date-like type.
- */
- boolean isDate() {
- return dataType == Types.DATE;
- }
-
- boolean isTimeStamp() {
- return dataType == Types.TIMESTAMP;
- }
-
- boolean isTime() {
- return dataType == Types.TIME;
- }
-
- /**
- * Is this column best represented as an integer?
- */
- boolean isInteger() {
- switch (dataType) {
- case Types.BIGINT:
- case Types.INTEGER:
- case Types.SMALLINT:
- case Types.TINYINT:
- return true;
- default:
- return false;
- }
- }
-
- /**
- * Is this column best represented as a real number?
- */
- boolean isReal() {
- switch (dataType) {
- case Types.DECIMAL:
- case Types.REAL:
- case Types.NUMERIC:
- return true;
- default:
- return false;
- }
-
- }
-
- boolean isBoolean() {
- switch (dataType) {
- case Types.BIT:
- return true;
- default:
- return false;
- }
- }
-
- String toText(Object val) {
- if (val == null)
- return null;
+ /**
+ * Return <code>true</code> if column is a date-like type.
+ */
+ boolean isDate() {
+ return dataType == Types.DATE;
+ }
+
+ boolean isTimeStamp() {
+ return dataType == Types.TIMESTAMP;
+ }
+
+ boolean isTime() {
+ return dataType == Types.TIME;
+ }
+
+ /**
+ * Is this column best represented as an integer?
+ */
+ boolean isInteger() {
+ switch (dataType) {
+ case Types.BIGINT:
+ case Types.INTEGER:
+ case Types.SMALLINT:
+ case Types.TINYINT:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ /**
+ * Is this column best represented as a real number?
+ */
+ boolean isReal() {
+ switch (dataType) {
+ case Types.DECIMAL:
+ case Types.REAL:
+ case Types.NUMERIC:
+ return true;
+ default:
+ return false;
+ }
+
+ }
+
+ boolean isBoolean() {
+ switch (dataType) {
+ case Types.BIT:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ String toText(Object val) {
+ if (val == null)
+ return null;
Date date = null;
if (val instanceof java.util.Date) {
// also applies to java.sql.Time, java.sql.Timestamp
date = (Date) val;
- return ISO8601DateParser.format((Date) val);
+ return ISO8601DateParser.format((Date) val);
}
return val.toString();
- }
+ }
- Object fromText(String val) throws ExternalVariableModuleException {
- try {
+ Object fromText(String val) throws ExternalVariableModuleException {
+ try {
if (val == null)
return null;
@@ -450,12 +450,12 @@ class DbExternalVariable {
return null;
}
- // TODO: use xsd:date and xsd:time conversions
- if (isDate())
+ // TODO: use xsd:date and xsd:time conversions
+ if (isDate())
return new java.sql.Date(ISO8601DateParser.parse(val).getTime());
- else if (isTime())
+ else if (isTime())
return new java.sql.Time(ISO8601DateParser.parse(val).getTime());
- else if (isTimeStamp())
+ else if (isTimeStamp())
return new java.sql.Timestamp(ISO8601DateParser.parse(val).getTime());
else if (isInteger()) {
String v = val.trim().toLowerCase();
@@ -463,25 +463,25 @@ class DbExternalVariable {
return 1;
if (v.equals("false"))
return 0;
- return new java.math.BigDecimal(val).longValue();
+ return new java.math.BigDecimal(val).longValue();
} else if (isReal())
- return Double.valueOf(val);
+ return Double.valueOf(val);
else if (isBoolean()) {
String v = val.trim();
if (v.equals("1"))
return true;
if (v.equals("0"))
return false;
- return Boolean.valueOf(val);
+ return Boolean.valueOf(val);
}
- return val;
- } catch (Exception ex) {
- throw new ExternalVariableModuleException(
- "Unable to convert value \"" + val + "\" for column \""
- + name + "\" !", ex);
- }
- }
+ return val;
+ } catch (Exception ex) {
+ throw new ExternalVariableModuleException(
+ "Unable to convert value \"" + val + "\" for column \""
+ + name + "\" !", ex);
+ }
+ }
public boolean isGenerated() {
return (genType != null && !genType.equals(GenType.none));
@@ -499,47 +499,47 @@ class DbExternalVariable {
+",genType="+genType
+")";
}
- }
+ }
+
+ /**
+ * Key used to identify a row.
+ */
+ class RowKey extends RowSubset {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create empty row key.
+ */
+ RowKey() {
+ super(_keycolumns);
+ }
- /**
- * Key used to identify a row.
- */
- class RowKey extends RowSubset {
- private static final long serialVersionUID = 1L;
-
- /**
- * Create empty row key.
- */
- RowKey() {
- super(_keycolumns);
- }
-
- /**
- * Write the key to a locator.
- */
+ /**
+ * Write the key to a locator.
+ */
void write(QName varType, Locator locator) throws ExternalVariableModuleException {
locator.reference = renderXmlRow(locator, varType, this);
- }
+ }
- public Set<String> getMissing() {
- HashSet<String> missing = new HashSet<String>();
- for (Column c : _keycolumns) {
+ public Set<String> getMissing() {
+ HashSet<String> missing = new HashSet<String>();
+ for (Column c : _keycolumns) {
if (get(c.idx) == null)
- missing.add(c.name);
- }
- return missing;
- }
- }
-
- /**
- * Row values.
- */
- class RowVal extends RowSubset {
- private static final long serialVersionUID = 1L;
-
- RowVal() {
- super(DbExternalVariable.this._columns);
- }
- }
+ missing.add(c.name);
+ }
+ return missing;
+ }
+ }
+
+ /**
+ * Row values.
+ */
+ class RowVal extends RowSubset {
+ private static final long serialVersionUID = 1L;
+
+ RowVal() {
+ super(DbExternalVariable.this._columns);
+ }
+ }
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableModule.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableModule.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableModule.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/JdbcExternalVariableModule.java Thu May 27 15:52:24 2010
@@ -362,126 +362,126 @@ public class JdbcExternalVariableModule
}
private Object downcastValue(Object value, int dataType) {
- if (value == null) {
- return null;
- }
- // Try down casting the value as per its column type.
- try {
- // Some JDBC 4.0 types have been ignored to avoid compilation errors
- switch (dataType) {
- case Types.ARRAY:
- break;
- case Types.BIGINT:
- if (!(value instanceof BigInteger)) {
- value = new BigDecimal(value.toString()).longValue();
- }
- break;
- case Types.BINARY:
- break;
- case Types.BIT:
- if (!(value instanceof Boolean)) {
- value = new Boolean(value.toString());
- }
- break;
- case Types.BLOB:
- break;
- case Types.BOOLEAN:
- if (!(value instanceof Boolean)) {
- value = new Boolean(value.toString());
- }
- break;
- case Types.CHAR:
- break;
- case Types.CLOB:
- break;
- case Types.DATALINK:
- break;
- case Types.DATE:
- break;
- case Types.DECIMAL:
- if (!(value instanceof BigDecimal)) {
- value = new BigDecimal(value.toString());
- }
- break;
- case Types.DISTINCT:
- break;
- case Types.DOUBLE:
- if (!(value instanceof Double)) {
- value = Double.valueOf(value.toString()).doubleValue();
- }
- break;
- case Types.FLOAT:
- if (!(value instanceof Float)) {
- value = Float.valueOf(value.toString()).floatValue();
- }
- break;
- case Types.INTEGER:
- if (!(value instanceof Integer)) {
- value = Double.valueOf(value.toString()).intValue();
- }
- break;
- case Types.JAVA_OBJECT:
- break;
+ if (value == null) {
+ return null;
+ }
+ // Try down casting the value as per its column type.
+ try {
+ // Some JDBC 4.0 types have been ignored to avoid compilation errors
+ switch (dataType) {
+ case Types.ARRAY:
+ break;
+ case Types.BIGINT:
+ if (!(value instanceof BigInteger)) {
+ value = new BigDecimal(value.toString()).longValue();
+ }
+ break;
+ case Types.BINARY:
+ break;
+ case Types.BIT:
+ if (!(value instanceof Boolean)) {
+ value = new Boolean(value.toString());
+ }
+ break;
+ case Types.BLOB:
+ break;
+ case Types.BOOLEAN:
+ if (!(value instanceof Boolean)) {
+ value = new Boolean(value.toString());
+ }
+ break;
+ case Types.CHAR:
+ break;
+ case Types.CLOB:
+ break;
+ case Types.DATALINK:
+ break;
+ case Types.DATE:
+ break;
+ case Types.DECIMAL:
+ if (!(value instanceof BigDecimal)) {
+ value = new BigDecimal(value.toString());
+ }
+ break;
+ case Types.DISTINCT:
+ break;
+ case Types.DOUBLE:
+ if (!(value instanceof Double)) {
+ value = Double.valueOf(value.toString()).doubleValue();
+ }
+ break;
+ case Types.FLOAT:
+ if (!(value instanceof Float)) {
+ value = Float.valueOf(value.toString()).floatValue();
+ }
+ break;
+ case Types.INTEGER:
+ if (!(value instanceof Integer)) {
+ value = Double.valueOf(value.toString()).intValue();
+ }
+ break;
+ case Types.JAVA_OBJECT:
+ break;
// case Types.LONGNVARCHAR:
// break;
- case Types.LONGVARBINARY:
- break;
- case Types.LONGVARCHAR:
- break;
+ case Types.LONGVARBINARY:
+ break;
+ case Types.LONGVARCHAR:
+ break;
// case Types.NCHAR:
// break;
// case Types.NCLOB:
// break;
- case Types.NUMERIC:
- if (!(value instanceof BigDecimal)) {
- value = new BigDecimal(value.toString());
- }
- break;
+ case Types.NUMERIC:
+ if (!(value instanceof BigDecimal)) {
+ value = new BigDecimal(value.toString());
+ }
+ break;
// case Types.NVARCHAR:
// break;
- case Types.OTHER:
- break;
- case Types.REAL:
- if (!(value instanceof Double)) {
- value = Float.valueOf(value.toString()).floatValue();
- }
- break;
- case Types.REF:
- break;
+ case Types.OTHER:
+ break;
+ case Types.REAL:
+ if (!(value instanceof Double)) {
+ value = Float.valueOf(value.toString()).floatValue();
+ }
+ break;
+ case Types.REF:
+ break;
// case Types.ROWID:
// break;
- case Types.SMALLINT:
- if (!(value instanceof Short)) {
- value = new Short(value.toString()).shortValue();
- }
- break;
+ case Types.SMALLINT:
+ if (!(value instanceof Short)) {
+ value = new Short(value.toString()).shortValue();
+ }
+ break;
// case Types.SQLXML:
// break;
- case Types.STRUCT:
- break;
- case Types.TIME:
- break;
- case Types.TIMESTAMP:
- break;
- case Types.TINYINT:
- if (!(value instanceof Short)) {
- value = new Short(value.toString()).shortValue();
- }
- break;
- case Types.VARBINARY:
- break;
- case Types.VARCHAR:
- break;
- default:
- break;
- }
- } catch (Exception e) {
- // couldn't cast... let's just use original value object
- }
- return value;
- }
+ case Types.STRUCT:
+ break;
+ case Types.TIME:
+ break;
+ case Types.TIMESTAMP:
+ break;
+ case Types.TINYINT:
+ if (!(value instanceof Short)) {
+ value = new Short(value.toString()).shortValue();
+ }
+ break;
+ case Types.VARBINARY:
+ break;
+ case Types.VARCHAR:
+ break;
+ default:
+ break;
+ }
+ } catch (Exception e) {
+ // couldn't cast... let's just use original value object
+ }
+ return value;
+ }
- RowVal execSelect(DbExternalVariable dbev, Locator locator) throws SQLException, ExternalVariableModuleException {
+ RowVal execSelect(DbExternalVariable dbev, Locator locator) throws SQLException, ExternalVariableModuleException {
RowKey rowkey = dbev.keyFromLocator(locator);
if (__log.isDebugEnabled()) __log.debug("execSelect: " + rowkey);
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/AbortMessageExchangeException.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/AbortMessageExchangeException.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/AbortMessageExchangeException.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/AbortMessageExchangeException.java Thu May 27 15:52:24 2010
@@ -23,11 +23,11 @@ package org.apache.ode.bpel.intercept;
* @author mszefler
*/
public abstract class AbortMessageExchangeException extends Exception {
- protected AbortMessageExchangeException(String msg, Throwable cause) {
- super(msg, cause);
- }
-
- protected AbortMessageExchangeException(String msg) {
- super(msg);
- }
+ protected AbortMessageExchangeException(String msg, Throwable cause) {
+ super(msg, cause);
+ }
+
+ protected AbortMessageExchangeException(String msg) {
+ super(msg);
+ }
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/FailMessageExchangeException.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/FailMessageExchangeException.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/FailMessageExchangeException.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/FailMessageExchangeException.java Thu May 27 15:52:24 2010
@@ -25,14 +25,14 @@ package org.apache.ode.bpel.intercept;
* @author Maciej Szefler
*/
public final class FailMessageExchangeException extends AbortMessageExchangeException{
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
- protected FailMessageExchangeException(String msg) {
- super(msg);
- }
-
- protected FailMessageExchangeException(String msg, Throwable cause) {
- super(msg,cause);
- }
-
+ protected FailMessageExchangeException(String msg) {
+ super(msg);
+ }
+
+ protected FailMessageExchangeException(String msg, Throwable cause) {
+ super(msg,cause);
+ }
+
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/FaultMessageExchangeException.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/FaultMessageExchangeException.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/FaultMessageExchangeException.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/FaultMessageExchangeException.java Thu May 27 15:52:24 2010
@@ -29,23 +29,23 @@ import org.apache.ode.bpel.iapi.Message;
* @author Maciej Szefler
*/
public final class FaultMessageExchangeException extends AbortMessageExchangeException {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
- private QName _faultName;
- private Message _faultData;
+ private QName _faultName;
+ private Message _faultData;
- public FaultMessageExchangeException(String errmsg, QName faultName, Message faultData) {
- super(errmsg);
-
- _faultName = faultName;
- _faultData = faultData;
- }
-
- public QName getFaultName() {
- return _faultName;
- }
-
- public Message getFaultData() {
- return _faultData;
- }
+ public FaultMessageExchangeException(String errmsg, QName faultName, Message faultData) {
+ super(errmsg);
+
+ _faultName = faultName;
+ _faultData = faultData;
+ }
+
+ public QName getFaultName() {
+ return _faultName;
+ }
+
+ public Message getFaultData() {
+ return _faultData;
+ }
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/InterceptorInvoker.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/InterceptorInvoker.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/InterceptorInvoker.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/InterceptorInvoker.java Thu May 27 15:52:24 2010
@@ -31,58 +31,58 @@ import org.apache.ode.bpel.intercept.Mes
*/
public abstract class InterceptorInvoker {
- private final String _name;
- // Closures anyone?
-
- /** Invoke {@link MessageExchangeInterceptor#onProcessInvoked(MyRoleMessageExchange, InterceptorContext)} */
- public static final InterceptorInvoker __onProcessInvoked= new InterceptorInvoker("onProcessInvoked") {
- public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
- throws FailMessageExchangeException, FaultMessageExchangeException {
- i.onProcessInvoked((MyRoleMessageExchange) mex, ictx);
- }
- };
-
- /** Invoke {@link MessageExchangeInterceptor#onBpelServerInvoked(MyRoleMessageExchange, InterceptorContext)} */
- public static final InterceptorInvoker __onBpelServerInvoked = new InterceptorInvoker("onBpelServerInvoked") {
- public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
- throws FailMessageExchangeException, FaultMessageExchangeException {
- i.onBpelServerInvoked((MyRoleMessageExchange) mex, ictx);
- }
- };
+ private final String _name;
+ // Closures anyone?
+
+ /** Invoke {@link MessageExchangeInterceptor#onProcessInvoked(MyRoleMessageExchange, InterceptorContext)} */
+ public static final InterceptorInvoker __onProcessInvoked= new InterceptorInvoker("onProcessInvoked") {
+ public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
+ throws FailMessageExchangeException, FaultMessageExchangeException {
+ i.onProcessInvoked((MyRoleMessageExchange) mex, ictx);
+ }
+ };
+
+ /** Invoke {@link MessageExchangeInterceptor#onBpelServerInvoked(MyRoleMessageExchange, InterceptorContext)} */
+ public static final InterceptorInvoker __onBpelServerInvoked = new InterceptorInvoker("onBpelServerInvoked") {
+ public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
+ throws FailMessageExchangeException, FaultMessageExchangeException {
+ i.onBpelServerInvoked((MyRoleMessageExchange) mex, ictx);
+ }
+ };
- /** Invoke {@link MessageExchangeInterceptor#onBpelServerInvoked(MyRoleMessageExchange, InterceptorContext)} */
- public static final InterceptorInvoker __onJobScheduled = new InterceptorInvoker("onJobScheduled") {
- public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
- throws FailMessageExchangeException, FaultMessageExchangeException {
- i.onJobScheduled((MyRoleMessageExchange) mex, ictx);
- }
- };
-
- /** Invoke {@link MessageExchangeInterceptor#onPartnerInvoked(PartnerRoleMessageExchange, InterceptorContext)} */
- public static final InterceptorInvoker __onPartnerInvoked = new InterceptorInvoker("onPartnerInvoked") {
- public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
- throws FailMessageExchangeException, FaultMessageExchangeException {
- i.onPartnerInvoked((PartnerRoleMessageExchange) mex, ictx);
- }
- };
+ /** Invoke {@link MessageExchangeInterceptor#onBpelServerInvoked(MyRoleMessageExchange, InterceptorContext)} */
+ public static final InterceptorInvoker __onJobScheduled = new InterceptorInvoker("onJobScheduled") {
+ public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
+ throws FailMessageExchangeException, FaultMessageExchangeException {
+ i.onJobScheduled((MyRoleMessageExchange) mex, ictx);
+ }
+ };
+
+ /** Invoke {@link MessageExchangeInterceptor#onPartnerInvoked(PartnerRoleMessageExchange, InterceptorContext)} */
+ public static final InterceptorInvoker __onPartnerInvoked = new InterceptorInvoker("onPartnerInvoked") {
+ public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
+ throws FailMessageExchangeException, FaultMessageExchangeException {
+ i.onPartnerInvoked((PartnerRoleMessageExchange) mex, ictx);
+ }
+ };
- /** Invoke {@link MessageExchangeInterceptor#onPartnerInvoked(PartnerRoleMessageExchange, InterceptorContext)} */
- public static final InterceptorInvoker __onNewInstanceInvoked = new InterceptorInvoker("onNewInstanceInvoked") {
- public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
- throws FailMessageExchangeException, FaultMessageExchangeException {
- i.onNewInstanceInvoked((MyRoleMessageExchange) mex, ictx);
- }
- };
+ /** Invoke {@link MessageExchangeInterceptor#onPartnerInvoked(PartnerRoleMessageExchange, InterceptorContext)} */
+ public static final InterceptorInvoker __onNewInstanceInvoked = new InterceptorInvoker("onNewInstanceInvoked") {
+ public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
+ throws FailMessageExchangeException, FaultMessageExchangeException {
+ i.onNewInstanceInvoked((MyRoleMessageExchange) mex, ictx);
+ }
+ };
- private InterceptorInvoker(String name) {
- _name = name;
- }
-
- public abstract void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
- throws FailMessageExchangeException, FaultMessageExchangeException;
-
- public String toString() {
- return InterceptorInvoker.class.getName() + "." + _name;
- }
+ private InterceptorInvoker(String name) {
+ _name = name;
+ }
+
+ public abstract void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
+ throws FailMessageExchangeException, FaultMessageExchangeException;
+
+ public String toString() {
+ return InterceptorInvoker.class.getName() + "." + _name;
+ }
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/MessageExchangeInterceptor.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/MessageExchangeInterceptor.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/MessageExchangeInterceptor.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/MessageExchangeInterceptor.java Thu May 27 15:52:24 2010
@@ -97,7 +97,7 @@ public interface MessageExchangeIntercep
BpelEngine getBpelEngine();
- BpelProcess getBpelProcess();
+ BpelProcess getBpelProcess();
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/NoOpInterceptor.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/NoOpInterceptor.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/NoOpInterceptor.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/NoOpInterceptor.java Thu May 27 15:52:24 2010
@@ -31,30 +31,30 @@ import org.apache.ode.bpel.iapi.PartnerR
*/
public class NoOpInterceptor implements MessageExchangeInterceptor {
- public void onJobScheduled(MyRoleMessageExchange mex,
- InterceptorContext ic) throws FailMessageExchangeException,
- FaultMessageExchangeException {
- }
-
- public void onBpelServerInvoked(MyRoleMessageExchange mex,
- InterceptorContext ic) throws FailMessageExchangeException,
- FaultMessageExchangeException {
- }
-
- public void onProcessInvoked(MyRoleMessageExchange mex,
- InterceptorContext ic) throws FailMessageExchangeException,
- FaultMessageExchangeException {
- }
-
- public void onPartnerInvoked(PartnerRoleMessageExchange mex,
- InterceptorContext ic) throws FailMessageExchangeException,
- FaultMessageExchangeException {
- }
-
- public void onNewInstanceInvoked(MyRoleMessageExchange mex,
- InterceptorContext ic) throws FailMessageExchangeException,
- FaultMessageExchangeException {
+ public void onJobScheduled(MyRoleMessageExchange mex,
+ InterceptorContext ic) throws FailMessageExchangeException,
+ FaultMessageExchangeException {
+ }
+
+ public void onBpelServerInvoked(MyRoleMessageExchange mex,
+ InterceptorContext ic) throws FailMessageExchangeException,
+ FaultMessageExchangeException {
+ }
+
+ public void onProcessInvoked(MyRoleMessageExchange mex,
+ InterceptorContext ic) throws FailMessageExchangeException,
+ FaultMessageExchangeException {
+ }
+
+ public void onPartnerInvoked(PartnerRoleMessageExchange mex,
+ InterceptorContext ic) throws FailMessageExchangeException,
+ FaultMessageExchangeException {
+ }
+
+ public void onNewInstanceInvoked(MyRoleMessageExchange mex,
+ InterceptorContext ic) throws FailMessageExchangeException,
+ FaultMessageExchangeException {
- }
+ }
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/ProcessCountThrottler.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/ProcessCountThrottler.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/ProcessCountThrottler.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/ProcessCountThrottler.java Thu May 27 15:52:24 2010
@@ -29,13 +29,13 @@ public class ProcessCountThrottler exten
@Override
public void onJobScheduled(MyRoleMessageExchange mex,
- InterceptorContext ic) throws FailMessageExchangeException,
- FaultMessageExchangeException {
- while (ic.getBpelEngine().getHydratedProcessCount(ic.getBpelProcess().getPID()) > ic.getBpelEngine().getProcessThrottledMaximumCount()) {
- if (!ic.getBpelEngine().dehydrateLastUnusedProcess()) {
- mex.setProperty("causeCode", String.valueOf(InvalidProcessException.TOO_MANY_PROCESSES_CAUSE_CODE));
- throw new FailMessageExchangeException("The number of processes in-use is more than the upper limit (" + ic.getBpelEngine().getProcessThrottledMaximumCount() + ")");
- }
- }
+ InterceptorContext ic) throws FailMessageExchangeException,
+ FaultMessageExchangeException {
+ while (ic.getBpelEngine().getHydratedProcessCount(ic.getBpelProcess().getPID()) > ic.getBpelEngine().getProcessThrottledMaximumCount()) {
+ if (!ic.getBpelEngine().dehydrateLastUnusedProcess()) {
+ mex.setProperty("causeCode", String.valueOf(InvalidProcessException.TOO_MANY_PROCESSES_CAUSE_CODE));
+ throw new FailMessageExchangeException("The number of processes in-use is more than the upper limit (" + ic.getBpelEngine().getProcessThrottledMaximumCount() + ")");
+ }
+ }
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/ProcessSizeThrottler.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/ProcessSizeThrottler.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/ProcessSizeThrottler.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/ProcessSizeThrottler.java Thu May 27 15:52:24 2010
@@ -29,13 +29,13 @@ public class ProcessSizeThrottler extend
@Override
public void onJobScheduled(MyRoleMessageExchange mex,
- InterceptorContext ic) throws FailMessageExchangeException,
- FaultMessageExchangeException {
- while (ic.getBpelEngine().getHydratedProcessSize(ic.getBpelProcess().getPID()) > ic.getBpelEngine().getProcessThrottledMaximumSize()) {
- if (!ic.getBpelEngine().dehydrateLastUnusedProcess()) {
- mex.setProperty("causeCode", String.valueOf(InvalidProcessException.TOO_HUGE_PROCESSES_CAUSE_CODE));
- throw new FailMessageExchangeException("The size of all running processes is more than the upper limit (" + ic.getBpelEngine().getProcessThrottledMaximumSize() + ")");
- }
- }
+ InterceptorContext ic) throws FailMessageExchangeException,
+ FaultMessageExchangeException {
+ while (ic.getBpelEngine().getHydratedProcessSize(ic.getBpelProcess().getPID()) > ic.getBpelEngine().getProcessThrottledMaximumSize()) {
+ if (!ic.getBpelEngine().dehydrateLastUnusedProcess()) {
+ mex.setProperty("causeCode", String.valueOf(InvalidProcessException.TOO_HUGE_PROCESSES_CAUSE_CODE));
+ throw new FailMessageExchangeException("The size of all running processes is more than the upper limit (" + ic.getBpelEngine().getProcessThrottledMaximumSize() + ")");
+ }
+ }
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/CorrelatorDaoImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/CorrelatorDaoImpl.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/CorrelatorDaoImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/CorrelatorDaoImpl.java Thu May 27 15:52:24 2010
@@ -78,14 +78,14 @@ class CorrelatorDaoImpl extends DaoBaseI
assert route._ckeySet != null;
if(keySet.isRoutableTo(route._ckeySet, "all".equals(route.getRoute()))) {
- if ("all".equals(route.getRoute())) {
- routes.add(route);
- } else {
- if (!routed) {
- routes.add(route);
- }
- routed = true;
- }
+ if ("all".equals(route.getRoute())) {
+ routes.add(route);
+ } else {
+ if (!routed) {
+ routes.add(route);
+ }
+ routed = true;
+ }
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageDAOImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageDAOImpl.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageDAOImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageDAOImpl.java Thu May 27 15:52:24 2010
@@ -27,43 +27,43 @@ import org.w3c.dom.Element;
import javax.xml.namespace.QName;
public class MessageDAOImpl extends DaoBaseImpl implements MessageDAO {
- private QName type;
- private Element data;
- private Element header;
- private MessageExchangeDAO messageExchange;
-
- public MessageDAOImpl(MessageExchangeDAO messageExchange) {
- this.messageExchange = messageExchange;
- }
-
- public void setType(QName type) {
- this.type = type;
- }
-
- public QName getType() {
- return type;
- }
-
- public void setData(Element value) {
- this.data = value;
- }
-
- public Element getData() {
- if (data == null) data = DOMUtils.newDocument().getDocumentElement();
- return data;
- }
-
- public void setHeader(Element value) {
- this.header = value;
- }
-
- public Element getHeader() {
- if ( header == null ) header = DOMUtils.newDocument().getDocumentElement();
- return header;
- }
-
- public MessageExchangeDAO getMessageExchange() {
- return messageExchange;
- }
+ private QName type;
+ private Element data;
+ private Element header;
+ private MessageExchangeDAO messageExchange;
+
+ public MessageDAOImpl(MessageExchangeDAO messageExchange) {
+ this.messageExchange = messageExchange;
+ }
+
+ public void setType(QName type) {
+ this.type = type;
+ }
+
+ public QName getType() {
+ return type;
+ }
+
+ public void setData(Element value) {
+ this.data = value;
+ }
+
+ public Element getData() {
+ if (data == null) data = DOMUtils.newDocument().getDocumentElement();
+ return data;
+ }
+
+ public void setHeader(Element value) {
+ this.header = value;
+ }
+
+ public Element getHeader() {
+ if ( header == null ) header = DOMUtils.newDocument().getDocumentElement();
+ return header;
+ }
+
+ public MessageExchangeDAO getMessageExchange() {
+ return messageExchange;
+ }
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessManagementDaoImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessManagementDaoImpl.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessManagementDaoImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessManagementDaoImpl.java Thu May 27 15:52:24 2010
@@ -33,7 +33,7 @@ import org.apache.ode.bpel.dao.ProcessMa
import org.apache.ode.bpel.dao.ProcessManagementDAO.InstanceSummaryKey;
public class ProcessManagementDaoImpl extends DaoBaseImpl implements ProcessManagementDAO {
- public Object[] findFailedCountAndLastFailedDateForProcessId(BpelDAOConnection conn, String status, String processId) {
+ public Object[] findFailedCountAndLastFailedDateForProcessId(BpelDAOConnection conn, String status, String processId) {
Date lastFailureDt = null;
int failureInstances = 0;
@@ -49,11 +49,11 @@ public class ProcessManagementDaoImpl ex
}
return new Object[] {failureInstances, lastFailureDt};
- }
-
- public void prefetchActivityFailureCounts(Collection<ProcessInstanceDAO> instances) {
- // do nothing
- }
+ }
+
+ public void prefetchActivityFailureCounts(Collection<ProcessInstanceDAO> instances) {
+ // do nothing
+ }
public int countInstancesByPidAndString(BpelDAOConnection conn, QName pid, String status) {
InstanceFilter instanceFilter = new InstanceFilter("status=" + status + " pid="+ pid);
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java?rev=948869&r1=948868&r2=948869&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java Thu May 27 15:52:24 2010
@@ -44,7 +44,7 @@ import org.w3c.dom.Node;
* Base template for activities.
*/
abstract class ACTIVITY extends BpelJacobRunnable implements IndexedObject {
- private static final Log __log = LogFactory.getLog(ACTIVITY.class);
+ private static final Log __log = LogFactory.getLog(ACTIVITY.class);
protected ActivityInfo _self;
/**
@@ -72,9 +72,9 @@ abstract class ACTIVITY extends BpelJaco
protected void sendVariableReadEvent(VariableInstance var) {
- VariableReadEvent vre = new VariableReadEvent();
- vre.setVarName(var.declaration.name);
- sendEvent(vre);
+ VariableReadEvent vre = new VariableReadEvent();
+ vre.setVarName(var.declaration.name);
+ sendEvent(vre);
}
protected void sendEvent(ActivityEvent event) {
@@ -118,7 +118,7 @@ abstract class ACTIVITY extends BpelJaco
}
protected OConstants getConstants() {
- return _self.o.getOwner().constants;
+ return _self.o.getOwner().constants;
}
/**
@@ -151,8 +151,8 @@ abstract class ACTIVITY extends BpelJaco
Node fetchVariableData(VariableInstance variable, boolean forWriting)
throws FaultException
{
- return _scopeFrame.fetchVariableData(getBpelRuntimeContext(), variable, forWriting);
- }
+ return _scopeFrame.fetchVariableData(getBpelRuntimeContext(), variable, forWriting);
+ }
Node fetchVariableData(VariableInstance var, OMessageVarType.Part part, boolean forWriting)
throws FaultException
@@ -163,17 +163,17 @@ abstract class ACTIVITY extends BpelJaco
Node initializeVariable(VariableInstance lvar, Node val)
throws ExternalVariableModuleException
{
- return _scopeFrame.initializeVariable(getBpelRuntimeContext(), lvar, val);
+ return _scopeFrame.initializeVariable(getBpelRuntimeContext(), lvar, val);
}
void commitChanges(VariableInstance lval, Node lvalue)
throws ExternalVariableModuleException
{
- _scopeFrame.commitChanges(getBpelRuntimeContext(),lval, lvalue);
- }
+ _scopeFrame.commitChanges(getBpelRuntimeContext(),lval, lvalue);
+ }
Node getPartData(Element message, Part part) {
- return _scopeFrame.getPartData(message, part);
+ return _scopeFrame.getPartData(message, part);
}