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 [17/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/engine/PartnerRoleMessageExchangeImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerRoleMessageExchangeImpl.java?rev=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -43,9 +43,9 @@ public class PartnerRoleMessageExchangeI
private PartnerRoleChannel _channel;
private EndpointReference _myRoleEPR;
private int responsesReceived;
-
+
protected PartnerRoleMessageExchangeImpl(BpelEngineImpl engine, MessageExchangeDAO dao, PortType portType,
- Operation operation,
+ Operation operation,
EndpointReference epr,
EndpointReference myRoleEPR,
PartnerRoleChannel channel) {
@@ -89,7 +89,7 @@ public class PartnerRoleMessageExchangeI
continueAsync();
}
-
+
@Override
void setResponse(Message outputMessage) throws BpelEngineException {
// If pub-sub is enabled, we may receive multiple responses. In such cases,
@@ -119,7 +119,7 @@ public class PartnerRoleMessageExchangeI
/**
* Continue from the ASYNC state.
- *
+ *
*/
private void continueAsync() {
// If there is no channel waiting for us, there is nothing to do.
@@ -129,7 +129,7 @@ public class PartnerRoleMessageExchangeI
}
return;
}
-
+
if (LOG.isDebugEnabled()) {
LOG.debug("create work event for mex=" + getMessageExchangeId());
}
@@ -152,7 +152,7 @@ public class PartnerRoleMessageExchangeI
/**
* Check if we are in the ASYNC state.
- *
+ *
* @return
*/
private boolean isAsync() {
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -346,13 +346,13 @@ public class ProcessAndInstanceManagemen
if(filter == null) {
return false;
}
- Matcher expressionMatcher = Filter.__comparatorPattern.matcher(filter);
+ Matcher expressionMatcher = Filter.__comparatorPattern.matcher(filter);
if(!filter.trim().equals("") && !expressionMatcher.find()) {
return true;
}
return false;
}
-
+
public InstanceInfoListDocument listInstances(String filter, String order, int limit) {
InstanceInfoListDocument ret = InstanceInfoListDocument.Factory.newInstance();
final TInstanceInfoList infolist = ret.addNewInstanceInfoList();
@@ -809,12 +809,12 @@ public class ProcessAndInstanceManagemen
if (custom.includeInstanceSummary()) {
Set<String> pids = new HashSet<String>();
for (TProcessInfo i : infos) {
- pids.add(i.getPid());
+ pids.add(i.getPid());
}
Map<InstanceSummaryKey, Long> m = conn.getProcessManagement().countInstancesSummary(pids);
Map<String, FailedSummaryValue> f = conn.getProcessManagement().findFailedCountAndLastFailedDateForProcessIds(pids);
-
+
for (TProcessInfo info : infos) {
TInstanceSummary isum = info.addNewInstanceSummary();
genInstanceSummaryEntry(isum.addNewInstances(), TInstanceStatus.ACTIVE, info.getPid(), m);
@@ -827,7 +827,7 @@ public class ProcessAndInstanceManagemen
}
}
}
-
+
/**
* Fill in the <code>process-info</code> element of the transfer object.
*
@@ -908,7 +908,7 @@ public class ProcessAndInstanceManagemen
// TODO: add documents to the above data structure.
}
-
+
String findVersionStringFromNodeToken(String packageName) {
int i = packageName.length() - 1;
while( i > 0 && Character.isDigit(packageName.charAt(i)) ) {
@@ -917,10 +917,10 @@ public class ProcessAndInstanceManagemen
if( i < packageName.length() - 1 && packageName.charAt(i) == '-') {
return packageName.substring(i + 1);
}
-
+
return null;
}
-
+
/**
* Generate document information elements for a set of files.
*
@@ -962,7 +962,7 @@ public class ProcessAndInstanceManagemen
TInstanceStatus.Enum state, String pid, Map<InstanceSummaryKey, Long> summary)
{
instances.setState(state);
- Long count = summary.get(new InstanceSummaryKey(pid, state.toString()));
+ Long count = summary.get(new InstanceSummaryKey(pid, state.toString()));
instances.setCount(count == null ? 0 : count.intValue());
}
@@ -1094,7 +1094,7 @@ public class ProcessAndInstanceManagemen
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
@@ -1112,7 +1112,7 @@ public class ProcessAndInstanceManagemen
failure.setRetries(recovery.getRetries());
ai.getActivityInfo().setStatus(TActivityStatus.FAILURE);
activities.addNewActivityInfo().set(ai.getActivityInfo());
- }
+ }
}
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessCleanUpRunnable.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessCleanUpRunnable.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessCleanUpRunnable.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessCleanUpRunnable.java Thu May 27 18:09:53 2010
@@ -38,13 +38,13 @@ public class ProcessCleanUpRunnable impl
private static final Log __log = LogFactory.getLog(ProcessCleanUpRunnable.class);
public final static int PROCESS_CLEANUP_TRANSACTION_SIZE = Integer.getInteger("org.apache.ode.processInstanceDeletion.transactionSize", 10);
-
+
private transient Contexts _contexts;
private transient Serializable _pid;
public ProcessCleanUpRunnable() {
}
-
+
public ProcessCleanUpRunnable(Serializable pid) {
_pid = pid;
}
@@ -52,7 +52,7 @@ public class ProcessCleanUpRunnable impl
public void storeToDetails(JobDetails details) {
details.getDetailsExt().put("pid", _pid);
}
-
+
public void restoreFromDetails(JobDetails details) {
_pid = (Serializable) details.getDetailsExt().get("pid");
}
@@ -60,11 +60,11 @@ public class ProcessCleanUpRunnable impl
public void setContexts(Contexts contexts) {
_contexts = contexts;
}
-
+
public void run() {
if(__log.isDebugEnabled()) __log.debug("Deleting runtime data for old process: " + _pid + "...");
try {
- // deleting of a process may involve hours' of database transaction,
+ // deleting of a process may involve hours' of database transaction,
// we need to break it down to smaller transactions
int transactionResultSize = 0;
do {
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -34,7 +34,7 @@ import org.apache.ode.bpel.pmapi.TScopeS
*/
class ProcessStatusConverter {
- /**
+ /**
* A mapping from the interface status codes, to the internal ODE status codes.
*/
private final Map<TInstanceStatus.Enum, BitSet> __interfaceStatusCodeToInternalStatusCodeMap =
@@ -44,11 +44,11 @@ class ProcessStatusConverter {
* One-to-one map between internal/external representation of the scope
* status codes.
*/
- private final Map<ScopeStateEnum, TScopeStatus.Enum> __scopeStateMap =
+ private final Map<ScopeStateEnum, TScopeStatus.Enum> __scopeStateMap =
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);
@@ -59,14 +59,14 @@ class ProcessStatusConverter {
}
bset.set(pistate);
}
-
+
__scopeStateMap.put(ScopeStateEnum.ACTIVE, TScopeStatus.ACTIVE);
__scopeStateMap.put(ScopeStateEnum.COMPLETED,TScopeStatus.COMPLETED);
__scopeStateMap.put(ScopeStateEnum.FAULT,TScopeStatus.FAULTED);
-
+
}
-
-
+
+
/**
* Convert instance status from the internal database representation to
* the process management API enumerations.
@@ -94,20 +94,20 @@ class ProcessStatusConverter {
// The above should have been exhaustive.
throw new ProcessingException("Encountered unexpected instance state: " + instancestate);
}
-
-
+
+
/**
- * The inverse of the above function. The above is not one-to-one, so this
- * functions returns a set.
- * @param status instance status (interface representation)
+ * The inverse of the above function. The above is not one-to-one, so this
+ * functions returns a set.
+ * @param status instance status (interface representation)
* @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);
@@ -115,10 +115,10 @@ class ProcessStatusConverter {
return ret;
}
-
-
+
+
/**
- * Convert the internal scope state to the external representation.
+ * Convert the internal scope state to the external representation.
* @param status
* @return
*/
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -29,14 +29,14 @@ import org.apache.ode.bpel.iapi.Endpoint
/**
- * An in-memory map from the endpoints provided by various processes in
- * the server to their corresponding endpoint references.
+ * An in-memory map from the endpoints provided by various processes in
+ * the server to their corresponding endpoint references.
*
* @author $author$
* @version $Revision$
*/
public class SharedEndpoints {
- // Map of every endpoint provided by the server
+ // Map of every endpoint provided by the server
private static Map<Endpoint, EndpointReference> _eprs = new HashMap<Endpoint, EndpointReference>();
private static List<Endpoint> _referenceCounts = new ArrayList<Endpoint>();
@@ -67,8 +67,8 @@ public class SharedEndpoints {
/**
* Remove an endpoint along with its EPR
- * This is called when there are no more references
- * to this endpoint from any BPEL process
+ * This is called when there are no more references
+ * to this endpoint from any BPEL process
* (which provides a service at this endpoint)
*
* @param endpoint endpoint
@@ -89,7 +89,7 @@ public class SharedEndpoints {
}
/**
- * Increment the number of BPEL processes who provide
+ * Increment the number of BPEL processes who provide
* a service specifically at this endpoint.
*
* @param endpoint endpoint
@@ -99,7 +99,7 @@ public class SharedEndpoints {
}
/**
- * Decrement the number of BPEL processes who provide
+ * Decrement the number of BPEL processes who provide
* a service specifically at this endpoint.
*
* @param endpoint endpoint
@@ -109,7 +109,7 @@ public class SharedEndpoints {
public boolean decrementReferenceCount(Endpoint endpoint) {
return _referenceCounts.remove(endpoint);
}
-
+
public int getReferenceCount(EndpointReference epr) {
int referenceCount = 0;
for (Endpoint endpoint : _eprs.keySet()) {
@@ -121,6 +121,6 @@ public class SharedEndpoints {
}
}
}
- return referenceCount;
+ return referenceCount;
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/CronScheduler.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/CronScheduler.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/CronScheduler.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/CronScheduler.java Thu May 27 18:09:53 2010
@@ -51,25 +51,25 @@ public class CronScheduler {
private final long TOLERABLE_SCHEDULE_DELAY = 0;
private ExecutorService _scheduledTaskExec;
-
+
private Contexts _contexts;
-
+
private final Timer _schedulerTimer = new Timer("CronScheduler", true);
private final Collection<TerminationListener> _systemTerminationListeners = new ArrayList<TerminationListener>();
-
+
private final Map<QName, Collection<TerminationListener>> _terminationListenersByPid = new HashMap<QName, Collection<CronScheduler.TerminationListener>>();
-
+
private volatile boolean _shuttingDown = false;
-
+
public void setScheduledTaskExec(ExecutorService taskExec) {
_scheduledTaskExec = taskExec;
}
-
+
public void setContexts(Contexts _contexts) {
this._contexts = _contexts;
}
-
+
public void shutdown() {
_shuttingDown = true;
_schedulerTimer.cancel();
@@ -86,10 +86,10 @@ public class CronScheduler {
}
_terminationListenersByPid.clear();
}
-
+
public void cancelProcessCronJobs(QName pid, boolean undeployed) {
assert pid != null;
-
+
if( __log.isInfoEnabled() ) __log.info("Cancelling PROCESS CRON jobs for: " + pid);
Collection<TerminationListener> listenersToTerminate = new ArrayList<TerminationListener>();
@@ -103,7 +103,7 @@ public class CronScheduler {
_terminationListenersByPid.remove(pid);
}
}
-
+
// terminate existing cron jobs if there are
synchronized( pid ) {
for( TerminationListener listener : listenersToTerminate ) {
@@ -111,19 +111,19 @@ public class CronScheduler {
}
}
}
-
+
public void scheduleProcessCronJobs(QName pid, ProcessConf pconf) {
if( _shuttingDown ) {
return;
}
assert pid != null;
-
+
cancelProcessCronJobs(pid, false);
Collection<TerminationListener> newListeners = new ArrayList<TerminationListener>();
-
+
synchronized( pid ) {
if( __log.isInfoEnabled() ) __log.info("Scheduling PROCESS CRON jobs for: " + pid);
-
+
// start new cron jobs
for( final CronJob job : pconf.getCronJobs() ) {
if( __log.isDebugEnabled() ) __log.debug("Scheduling PROCESS CRON job: " + job.getCronExpression() + " for: " + pid);
@@ -149,8 +149,8 @@ public class CronScheduler {
newListeners.add(schedule(job.getCronExpression(), runnable, null, null));
}
}
-
- // make sure the pid does not get into the terminationListener map if no cron is setup
+
+ // make sure the pid does not get into the terminationListener map if no cron is setup
if( !newListeners.isEmpty() ) {
synchronized( _terminationListenersByPid ) {
Collection<TerminationListener> oldListeners = _terminationListenersByPid.get(pid);
@@ -162,7 +162,7 @@ public class CronScheduler {
}
}
}
-
+
public void refreshSystemCronJobs(SystemSchedulesConfig systemSchedulesConf) {
if( _shuttingDown ) {
return;
@@ -174,13 +174,13 @@ public class CronScheduler {
try {
// if error thrown on reading the schedules.xml, do not cancel existing cron jobs
List<CronJob> systemCronJobs = systemSchedulesConf.getSystemCronJobs();
-
+
// cancel cron jobs
for( TerminationListener listener : _systemTerminationListeners ) {
listener.terminate();
}
_systemTerminationListeners.clear();
-
+
// start new cron jobs
for( final CronJob job : systemCronJobs ) {
if( __log.isDebugEnabled() ) __log.debug("Scheduling SYSTEM CRON job:" + job);
@@ -215,8 +215,8 @@ public class CronScheduler {
}
}
- public TerminationListener schedule(final CronExpression cronExpression,
- final Runnable runnable, final JobDetails runnableDetails,
+ public TerminationListener schedule(final CronExpression cronExpression,
+ final Runnable runnable, final JobDetails runnableDetails,
TerminationListener terminationListener) {
if( _shuttingDown ) {
__log.info("CRON Scheduler is being shut down. This new scheduling request is ignored.");
@@ -226,23 +226,23 @@ public class CronScheduler {
}
};
}
-
+
assert cronExpression != null;
assert runnable != null;
-
+
final Date nextScheduleTime = cronExpression.getNextValidTimeAfter(new Date(
System.currentTimeMillis() + MIN_INTERVAL));
final CronScheduledJob job = new CronScheduledJob(nextScheduleTime, runnable, runnableDetails, cronExpression, terminationListener);
if( __log.isDebugEnabled() ) __log.debug("CRON will run in " + (nextScheduleTime.getTime() - System.currentTimeMillis()) + "ms.");
-
+
try {
_schedulerTimer.schedule(new TimerTask() {
@Override
public void run() {
__log.debug("Cron scheduling timer kicked in: " + cronExpression);
- // run only if the current node is the coordinator,
+ // run only if the current node is the coordinator,
// with the SimpleScheduler, the node is always the coordinator
- if( !(_contexts.scheduler instanceof ClusterAware)
+ if( !(_contexts.scheduler instanceof ClusterAware)
|| ((ClusterAware)_contexts.scheduler).amICoordinator() ) {
// do not hold the timer thread too long, submit the work to an executorService
_scheduledTaskExec.submit(job);
@@ -260,11 +260,11 @@ public class CronScheduler {
return job.terminationListener;
}
-
+
public interface TerminationListener {
void terminate();
}
-
+
private class CronScheduledJob implements Callable<TerminationListener> {
private volatile boolean terminated = false;
private Date nextScheduleTime;
@@ -272,7 +272,7 @@ public class CronScheduler {
private JobDetails runnableDetails;
private CronExpression cronExpression;
private TerminationListener terminationListener;
-
+
public CronScheduledJob(Date nextScheduleTime,
Runnable runnable, JobDetails runnableDetails,
CronExpression cronExpression, TerminationListener terminationListener) {
@@ -294,7 +294,7 @@ public class CronScheduler {
try {
if( TOLERABLE_SCHEDULE_DELAY == 0 ||
nextScheduleTime.getTime() < System.currentTimeMillis() + TOLERABLE_SCHEDULE_DELAY) {
- if( runnableDetails != null &&
+ if( runnableDetails != null &&
runnable instanceof MapSerializableRunnable ) {
((MapSerializableRunnable)runnable).restoreFromDetails(runnableDetails);
}
@@ -321,7 +321,7 @@ public class CronScheduler {
schedule(cronExpression, runnable, runnableDetails, terminationListener);
}
}
-
+
return terminationListener;
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/RuntimeDataCleanupRunnable.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/RuntimeDataCleanupRunnable.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/RuntimeDataCleanupRunnable.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/RuntimeDataCleanupRunnable.java Thu May 27 18:09:53 2010
@@ -48,10 +48,10 @@ public class RuntimeDataCleanupRunnable
private CleanupInfo _cleanupInfo;
private QName _pid;
private Set<QName> _pidsToExclude;
-
+
public RuntimeDataCleanupRunnable() {
}
-
+
@SuppressWarnings("unchecked")
public void restoreFromDetails(JobDetails details) {
_cleanupInfo = (CleanupInfo)details.getDetailsExt().get("cleanupInfo");
@@ -67,7 +67,7 @@ public class RuntimeDataCleanupRunnable
public void setContexts(Contexts contexts) {
_contexts = contexts;
}
-
+
public void run() {
_log.info("CRON CLEAN.run().");
@@ -84,7 +84,7 @@ public class RuntimeDataCleanupRunnable
}
filter += " pid<>" + pids.toString();
}
-
+
if( filter.trim().length() > 0 ) {
_log.info("CRON CLEAN.run(" + filter + ")");
long numberOfDeletedInstances = 0;
@@ -94,10 +94,10 @@ public class RuntimeDataCleanupRunnable
}
}
}
-
+
int cleanInstances(String filter, final Set<CLEANUP_CATEGORY> categories, int limit) {
_log.debug("CRON CLEAN using filter: " + filter + ", limit: " + limit);
-
+
final InstanceFilter instanceFilter = new InstanceFilter(filter, "", limit);
try {
if( _contexts.scheduler != null ) {
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/SystemSchedulesConfig.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/SystemSchedulesConfig.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/SystemSchedulesConfig.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/cron/SystemSchedulesConfig.java Thu May 27 18:09:53 2010
@@ -40,16 +40,16 @@ import org.apache.xmlbeans.XmlOptions;
public class SystemSchedulesConfig {
private final static Log __log = LogFactory.getLog(SystemSchedulesConfig.class);
-
+
public final static String SCHEDULE_CONFIG_FILE_PROP_KEY = "org.apache.ode.scheduleConfigFile";
private File schedulesFile;
-
+
public SystemSchedulesConfig(File configRoot) {
String scheduleConfigFile = System.getProperty(SCHEDULE_CONFIG_FILE_PROP_KEY);
if( scheduleConfigFile != null ) {
schedulesFile = new File(scheduleConfigFile);
if( !new File(scheduleConfigFile).exists()) {
- __log.warn("A custom location for schedules has been set. However, the file does not exist at the location: "
+ __log.warn("A custom location for schedules has been set. However, the file does not exist at the location: "
+ schedulesFile.getAbsolutePath() + ". The file will be read when one gets created.");
}
} else {
@@ -58,20 +58,20 @@ public class SystemSchedulesConfig {
}
__log.info("SYSTEM CRON configuration: " + schedulesFile.getAbsolutePath());
}
-
+
public File getSchedulesFile() {
return schedulesFile;
}
-
+
/**
* Returns the list of cron jobs configured for all processes. This call returns
* a fresh snapshot.
- *
+ *
* @return the list of cron jobs
*/
public List<CronJob> getSystemCronJobs() {
List<CronJob> jobs = new ArrayList<CronJob>();
-
+
if( schedulesFile != null && schedulesFile.exists() ) {
for(TSchedule schedule : getSystemSchedulesDocument().getSchedules().getScheduleList()) {
CronJob job = new CronJob();
@@ -82,9 +82,9 @@ public class SystemSchedulesConfig {
assert !aCleanup.getFilterList().isEmpty();
cleanupInfo.setFilters(aCleanup.getFilterList());
ProcessCleanupConfImpl.processACleanup(cleanupInfo.getCategories(), aCleanup.getCategoryList());
-
+
JobDetails runnableDetails = new JobDetails();
-
+
runnableDetails.getDetailsExt().put("cleanupInfo", cleanupInfo);
runnableDetails.getDetailsExt().put("transactionSize", 10);
job.getRunnableDetailList().add(runnableDetails);
@@ -96,7 +96,7 @@ public class SystemSchedulesConfig {
}
}
}
-
+
if( __log.isDebugEnabled() ) __log.debug("SYSTEM CRON configuration found cron jobs: " + jobs);
return jobs;
}
@@ -104,7 +104,7 @@ public class SystemSchedulesConfig {
@SuppressWarnings("unchecked")
private SchedulesDocument getSystemSchedulesDocument() {
SchedulesDocument sd = null;
-
+
try {
XmlOptions options = new XmlOptions();
HashMap otherNs = new HashMap();
@@ -117,7 +117,7 @@ public class SystemSchedulesConfig {
throw new ContextException("Couldn't read schedule descriptor at location "
+ schedulesFile.getAbsolutePath(), e);
}
-
+
return sd;
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/extvar/ExternalVariableConf.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/extvar/ExternalVariableConf.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/extvar/ExternalVariableConf.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/extvar/ExternalVariableConf.java Thu May 27 18:09:53 2010
@@ -29,14 +29,14 @@ import org.apache.ode.utils.DOMUtils;
import org.w3c.dom.Element;
public class ExternalVariableConf {
- public final static QName EXTVARCONF_ELEMENT = new QName("http://ode.apache.org/externalVariables",
+ public final static QName EXTVARCONF_ELEMENT = new QName("http://ode.apache.org/externalVariables",
"externalVariable");
-
-
+
+
private final HashMap<String,Variable> _vars = new HashMap<String, Variable>();
-
+
public ExternalVariableConf(List<Element> els) {
-
+
for (Element el : els) {
String varId = el.getAttribute("id");
if (varId == null || "".equals(varId))
@@ -48,26 +48,26 @@ public class ExternalVariableConf {
Element child = DOMUtils.getFirstChildElement(el);
if (child == null)
throw new BpelEngineException("Invalid external variable configuration for id \"" + varId + "\"; no engine configuration!");
-
+
QName engineQName = new QName(child.getNamespaceURI(), child.getLocalName());
-
+
Variable var = new Variable(varId, engineQName, child);
_vars.put(varId,var);
}
-
+
}
-
+
public class Variable {
public final String extVariableId;
public final QName engineQName;
- public final Element configuration;
-
+ public final Element configuration;
+
Variable(String id, QName engine, Element config) {
this.extVariableId = id;
this.engineQName = engine;
this.configuration = config;
-
+
}
}
@@ -75,7 +75,7 @@ public class ExternalVariableConf {
public Variable getVariable(String id) {
return _vars.get(id);
}
-
+
public Collection<Variable> getVariables() {
return _vars.values();
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/extvar/ExternalVariableManager.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/extvar/ExternalVariableManager.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/extvar/ExternalVariableManager.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/extvar/ExternalVariableManager.java Thu May 27 18:09:53 2010
@@ -41,7 +41,7 @@ import org.w3c.dom.Node;
/**
* Manager for external variable instances; used by {@link BpelProcess} to manage external variables.
- *
+ *
* @author Maciej Szefler <mszefler at gmail dot com>
*
*/
@@ -62,8 +62,8 @@ public class ExternalVariableManager {
private QName _pid;
public ExternalVariableManager(QName pid,
- ExternalVariableConf evconf,
- Map<QName, ExternalVariableModule> engines,
+ ExternalVariableConf evconf,
+ Map<QName, ExternalVariableModule> engines,
OProcess oprocess)
throws BpelEngineException {
_pid = pid;
@@ -76,13 +76,13 @@ public class ExternalVariableManager {
for (ExternalVariableConf.Variable var : _extVarConf.getVariables()) {
EVar evar = new EVar(var.extVariableId, _engines.get(var.engineQName), var.configuration);
if (evar._engine == null) {
- __log.error("External variable engine \"" + var.engineQName
+ __log.error("External variable engine \"" + var.engineQName
+ "\" referenced by external variable \"" + var.extVariableId
+ "\" not registered.");
fatal = true;
continue;
}
-
+
try {
evar._engine.configure(_pid, evar._extVarId, evar._config);
} catch (ExternalVariableModuleException eve) {
@@ -133,7 +133,7 @@ public class ExternalVariableManager {
// Should not happen if constructor is working.
throw new BpelEngineException("InternalError: reference to unknown external variable " + variable.extVar.externalVariableId);
}
-
+
Locator locator = new Locator(variable.extVar.externalVariableId, _pid,iid, reference);
Value newval;
newval = evar._engine.readValue(((OElementVarType) variable.type).elementType, locator );
@@ -142,14 +142,14 @@ public class ExternalVariableManager {
return newval;
}
-
+
public Value write(Variable variable, Node reference, Node val, Long iid) throws ExternalVariableModuleException {
EVar evar = _externalVariables.get(variable.extVar.externalVariableId);
if (evar == null) {
// Should not happen if constructor is working.
throw new BpelEngineException("InternalError: reference to unknown external variable " + variable.extVar.externalVariableId);
}
-
+
Locator locator = new Locator(variable.extVar.externalVariableId,_pid,iid,reference);
Value newval = new Value(locator,val,null);
newval = evar._engine.writeValue(((OElementVarType) variable.type).elementType, newval);
@@ -157,7 +157,7 @@ public class ExternalVariableManager {
return newval;
}
-
+
static final class EVar {
final ExternalVariableModule _engine;
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/CorrelatorsMigration.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/CorrelatorsMigration.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/CorrelatorsMigration.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/CorrelatorsMigration.java Thu May 27 18:09:53 2010
@@ -42,7 +42,7 @@ public class CorrelatorsMigration implem
for (BpelProcess process : registeredProcesses) {
__log.debug("Migrating correlators for process " + process.getConf().getProcessId());
ProcessDAO processDao = connection.getProcess(process.getConf().getProcessId());
-
+
for (OPartnerLink plink : process.getOProcess().getAllPartnerLinks()) {
if (plink.hasMyRole()) {
for (Iterator opI = plink.myRolePortType.getOperations().iterator(); opI.hasNext();) {
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -47,7 +47,7 @@ public class MigrationHandler {
private Contexts _contexts;
private List<MigrationLink> migrationLinks = new ArrayList<MigrationLink>() {{
- add(new MigrationLink(1, 2, new Migration[] { new CorrelatorsMigration(),
+ add(new MigrationLink(1, 2, new Migration[] { new CorrelatorsMigration(),
new CorrelationKeyMigration() } ));
add(new MigrationLink(2, 3, new Migration[] { new CorrelationKeySetMigration() } ));
add(new MigrationLink(4, 3, new Migration[] { new CorrelationKeySetMigration() } ));
@@ -79,7 +79,7 @@ public class MigrationHandler {
return true;
}
if (version == CURRENT_SCHEMA_VERSION) return true;
-
+
try {
boolean success = _contexts.scheduler.execTransaction(new Callable<Boolean>() {
public Boolean call() throws Exception {
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/OutstandingRequestsMigration.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/OutstandingRequestsMigration.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/OutstandingRequestsMigration.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/migration/OutstandingRequestsMigration.java Thu May 27 18:09:53 2010
@@ -62,11 +62,11 @@ public class OutstandingRequestsMigratio
Object data = soup.getGlobalData();
if (data instanceof OutstandingRequestManager) {
OutstandingRequestManager orm = (OutstandingRequestManager) data;
-
+
IMAManager imaManager = new IMAManager();
imaManager.migrateRids(orm.getRids());
soup.setGlobalData(imaManager);
-
+
ByteArrayOutputStream bos = new ByteArrayOutputStream();
soup.write(bos);
instance.setExecutionState(bos.toByteArray());
@@ -80,7 +80,7 @@ public class OutstandingRequestsMigratio
}
}
}
-
+
return migrationResult;
}
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/RemainingExchangesException.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/RemainingExchangesException.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/RemainingExchangesException.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/RemainingExchangesException.java Thu May 27 18:09:53 2010
@@ -24,9 +24,9 @@ import org.apache.ode.bpel.pmapi.Communi
/**
* It's raised when replayed invokes don't drain out all provided communication.
- * For example if there is invoke in process and two requests in provided communication, this
- * exception occurs.
- *
+ * For example if there is invoke in process and two requests in provided communication, this
+ * exception occurs.
+ *
* @author Rafal Rusin
*
*/
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/Replayer.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/Replayer.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/Replayer.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/Replayer.java Thu May 27 18:09:53 2010
@@ -61,9 +61,9 @@ import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
/**
- * Main class used for replaying. It's invoked from InstanceManagement API.
- * Receives request and sets up replaying contexts for each instance to replay.
- *
+ * Main class used for replaying. It's invoked from InstanceManagement API.
+ * Receives request and sets up replaying contexts for each instance to replay.
+ *
* @author Rafal Rusin
*
*/
@@ -80,21 +80,21 @@ public class Replayer {
replayer.set(this);
this.engine = (BpelEngineImpl) engine;
this.conn = conn;
-
+
Date startDate = Calendar.getInstance().getTime();
contexts = new ArrayList<ReplayerContext>();
{
List<Long> toDelete = new ArrayList<Long>();
List<CommunicationType> toRestore = new ArrayList<CommunicationType>();
-
+
toDelete.addAll(request.getReplaceInstanceList());
-
+
for (Long iid : request.getUpgradeInstanceList()) {
toDelete.add(iid);
toRestore.add(CommunicationType.Factory.parse(getCommunication(iid, conn).toString()));
}
toRestore.addAll(request.getRestoreInstanceList());
-
+
{
Set<CLEANUP_CATEGORY> cleanupCategory = new HashSet<CLEANUP_CATEGORY>();
cleanupCategory.add(CLEANUP_CATEGORY.INSTANCE);
@@ -102,12 +102,12 @@ public class Replayer {
cleanupCategory.add(CLEANUP_CATEGORY.VARIABLES);
cleanupCategory.add(CLEANUP_CATEGORY.CORRELATIONS);
cleanupCategory.add(CLEANUP_CATEGORY.EVENTS);
-
+
for (Long l : toDelete) {
conn.getInstance(l).delete(cleanupCategory);
}
}
-
+
for (CommunicationType r : toRestore) {
ReplayerContext context = new ReplayerContext(startDate);
context.bpelEngine = (BpelEngineImpl) engine;
@@ -115,11 +115,11 @@ public class Replayer {
contexts.add(context);
}
}
-
+
scheduler.startReplaying(this);
{
List<Exchange> remainingExchanges = new ArrayList<Exchange>();
-
+
for (ReplayerContext c : contexts) {
c.answers.remainingExchanges(remainingExchanges);
}
@@ -127,12 +127,12 @@ public class Replayer {
throw new RemainingExchangesException(remainingExchanges);
}
}
-
+
List<Long> r = new ArrayList<Long>();
for (ReplayerContext c : contexts) {
r.add(c.runtimeContext.getPid());
}
-
+
return r;
} finally {
replayer.set(null);
@@ -213,7 +213,7 @@ public class Replayer {
}
return result;
}
-
+
public ReplayerContext findReplayedInstance(long iid) {
for (ReplayerContext r : contexts) {
if (r.runtimeContext.getPid() == iid) {
@@ -222,7 +222,7 @@ public class Replayer {
}
return null;
}
-
+
public void handleJobDetails(JobDetails jobDetail, final Date when) {
JobDetails we = jobDetail;
__log.debug("handleJobDetails " + jobDetail + " " + when);
@@ -260,7 +260,7 @@ public class Replayer {
throw new IllegalStateException("Trying to hit existing instance via live communication, but there's no such instance mex:" + mex + " iid:" + iid);
}
__log.debug("hitting existing instance via live communication mex:" + mex + " iid:" + iid);
-
+
ctx.runtimeContext.inputMsgMatch(routing.messageRoute.getGroupId(), routing.messageRoute.getIndex(), mex);
routing.correlator.removeRoutes(routing.messageRoute.getGroupId(), ctx.runtimeContext.getDAO());
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerBpelRuntimeContextImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerBpelRuntimeContextImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerBpelRuntimeContextImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerBpelRuntimeContextImpl.java Thu May 27 18:09:53 2010
@@ -61,10 +61,10 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
/**
- * This class intercepts invocations on BpelRuntimeContextImpl and substitutes them as necessary during replaying.
+ * This class intercepts invocations on BpelRuntimeContextImpl and substitutes them as necessary during replaying.
* For exaple when INVOKE activity calls invoke on BpelRuntimeContextImpl then ReplayerBpelRuntimeContextImpl intercepts this call
* and provides specific answer.
- *
+ *
* @author Rafal Rusin
*
*/
@@ -83,8 +83,8 @@ public class ReplayerBpelRuntimeContextI
__log.debug("cancel " + timerResponseChannel.export());
super.cancel(timerResponseChannel);
}
-
-
+
+
@Override
public void checkInvokeExternalPermission() {
@@ -121,9 +121,9 @@ public class ReplayerBpelRuntimeContextI
// }
mexDao.setRequest(request);
}
-
+
Exchange answer = answerResult.e;
-
+
if (mexDao.getPattern().equals(MessageExchangePattern.REQUEST_RESPONSE.toString())) {
if (answer.isSetFault()) {
MessageDAO response = mexDao.createMessage(new QName("replayer", "replayer"));
@@ -136,7 +136,7 @@ public class ReplayerBpelRuntimeContextI
mexDao.setFault(answer.getFault().getType());
mexDao.setFaultExplanation(answer.getFault().getExplanation());
mexDao.setStatus(Status.FAULT.toString());
-
+
} else if (answer.isSetOut()) {
MessageDAO response = mexDao.createMessage(new QName("replayer", "replayer"));
try {
@@ -154,7 +154,7 @@ public class ReplayerBpelRuntimeContextI
// replayer error to the top
throw new IllegalStateException("I don't have response for invoke " + answer);
}
-
+
final String channel2 = channel.export();
final String mexid = mexDao.getMessageExchangeId();
replayerContext.scheduler.scheduleReplayerJob(new Callable() {
@@ -169,7 +169,7 @@ public class ReplayerBpelRuntimeContextI
// in only - continuing
mexDao.setStatus(Status.COMPLETED_OK.toString());
}
-
+
return mexDao.getMessageExchangeId();
}
}
@@ -208,13 +208,13 @@ public class ReplayerBpelRuntimeContextI
}
}
-
+
@Override
public void registerActivityForRecovery(ActivityRecoveryChannel channel, long activityId, String reason, Date dateTime, Element details, String[] actions, int retries) {
super.registerActivityForRecovery(channel, activityId, reason, dateTime, details, actions, retries);
replayerContext.checkRollbackOnFault();
}
-
+
@Override
public void completedFault(FaultData faultData) {
super.completedFault(faultData);
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerContext.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerContext.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerContext.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerContext.java Thu May 27 18:09:53 2010
@@ -62,7 +62,7 @@ import org.w3c.dom.Node;
/**
* Context holding replayer state (eg. invoke answers) for single instance during replaying.
- *
+ *
* @author Rafal Rusin
*
*/
@@ -73,7 +73,7 @@ public class ReplayerContext {
public BpelEngineImpl bpelEngine;
public ReplayerBpelRuntimeContextImpl runtimeContext;
-
+
public Map<QName, ServiceConfig> servicesConfig = new HashMap<QName, ServiceConfig>();
public CommunicationType replayerConfig;
@@ -103,9 +103,9 @@ public class ReplayerContext {
public AnswerResult fetchAnswer(QName service, String operation, Element outgoingMessage, Date currentEventDateTime) {
__log.debug("fetching answer for " + service + " " + operation);
-
+
ServiceConfig cfg = getServiceConfig(service);
-
+
if (cfg.getReplayType().isSetMock()) {
String key = getAnswersKey(service, operation);
AnswersForKey v = answersMap.get(key);
@@ -129,16 +129,16 @@ public class ReplayerContext {
v.remainingExchanges(e);
}
}
-
+
private Exchange fetchMockQuery(QName service, String operation, Element outgoingMessage, org.apache.ode.bpel.pmapi.CommunicationType.ServiceConfig serviceConfig) {
try {
MockQueryRequestDocument request = MockQueryRequestDocument.Factory.newInstance();
request.addNewMockQueryRequest().addNewIn().set(XmlObject.Factory.parse(outgoingMessage));
String xquery = serviceConfig.getReplayType().getMockQuery();
-
+
XQDataSource xqds = new SaxonXQDataSource();
XQConnection xqconn = xqds.getConnection();
-
+
net.sf.saxon.Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
configuration.setHostLanguage(net.sf.saxon.Configuration.XQUERY);
// XQStaticContext staticEnv = xqconn.getStaticContext();
@@ -160,12 +160,12 @@ public class ReplayerContext {
}
}
ResponseType response2 = response.getMockQueryResponse();
-
+
if (__log.isDebugEnabled()) {
__log.debug("mockQuery result " + response);
}
-
-
+
+
Exchange answer = Exchange.Factory.newInstance();
{
if (response2.isSetOut()) {
@@ -178,7 +178,7 @@ public class ReplayerContext {
answer.setFailure(response2.getFailure());
}
}
-
+
return answer;
} catch (Exception e) {
__log.error("", e);
@@ -222,13 +222,13 @@ public class ReplayerContext {
public void init(final CommunicationType r, ReplayerScheduler scheduler) throws Exception {
this.scheduler = scheduler;
-
+
replayerConfig = r;
-
+
for (ServiceConfig s : r.getServiceConfigList()) {
servicesConfig.put(s.getService(), s);
}
-
+
final List<Exchange> exchangeList = r.getExchangeList();
for (int i = 1; i < exchangeList.size(); i++) {
@@ -294,7 +294,7 @@ public class ReplayerContext {
super();
this.replayStartDate = replayStartDate;
}
-
+
public ServiceConfig getServiceConfig(QName service) {
ServiceConfig c = servicesConfig.get(service);
if (c == null) {
@@ -304,7 +304,7 @@ public class ReplayerContext {
return c;
} else return c;
}
-
+
public void checkRollbackOnFault() {
if (replayerConfig.getRollbackOnFault()) {
RuntimeException e = new RuntimeException("Process instance run into fault.");
@@ -314,7 +314,7 @@ public class ReplayerContext {
throw e;
}
}
-
+
public static class AnswerResult {
public final boolean isLive;
public final Exchange e;
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerScheduler.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerScheduler.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerScheduler.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerScheduler.java Thu May 27 18:09:53 2010
@@ -31,8 +31,8 @@ import org.apache.ode.bpel.iapi.ContextE
import org.apache.ode.bpel.iapi.Scheduler;
/**
- * Manages events invocation in sorted order during replaying.
- *
+ * Manages events invocation in sorted order during replaying.
+ *
* @author Rafal Rusin
*
*/
@@ -40,9 +40,9 @@ public class ReplayerScheduler implement
private static final Log __log = LogFactory.getLog(ReplayerScheduler.class);
public Replayer replayer;
-
+
public static ThreadLocal<TaskElement> currentTaskElement = new ThreadLocal<TaskElement>();
-
+
private PriorityQueue<TaskElement> taskQueue = new PriorityQueue<TaskElement>();
private static class TaskElement implements Comparable<TaskElement> {
@@ -77,7 +77,7 @@ public class ReplayerScheduler implement
public <T> T execTransaction(Callable<T> transaction, int timeout) throws Exception, ContextException {
throw new IllegalStateException();
}
-
+
public boolean isTransacted() {
return true;
}
@@ -101,7 +101,7 @@ public class ReplayerScheduler implement
this.replayer = replayer;
while (!taskQueue.isEmpty()) {
TaskElement taskElement = taskQueue.remove();
-
+
try {
currentTaskElement.set(taskElement);
__log.debug("executing action at time " + taskElement.when);
@@ -138,7 +138,7 @@ public class ReplayerScheduler implement
return null;
}
}, when, null);
-
+
return null;
}
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -41,11 +41,11 @@ import org.apache.ode.bpel.pmapi.TScopeR
* objects.
*/
public class ActivityStateDocumentBuilder implements BpelEventListener {
-
- private HashMap<Long, ActivityInfoDocument> _activities =
+
+ private HashMap<Long, ActivityInfoDocument> _activities =
new HashMap<Long,ActivityInfoDocument>();
- /**
+ /**
* Keep a list of the activity info objects, so we can return
* them in the order of creation.
*/
@@ -54,11 +54,11 @@ public class ActivityStateDocumentBuilde
private boolean _removeCompleted = false;
private Long _scope;
-
-
+
+
public ActivityStateDocumentBuilder() {
}
-
+
public List<ActivityInfoDocument> getActivities() {
return _activitiesOrdered;
}
@@ -126,7 +126,7 @@ public class ActivityStateDocumentBuilde
/**
* Fill the common activity info from an event.
- * @param info
+ * @param info
* @param event
*/
private void fill(TActivityInfo info, ActivityEvent event) {
@@ -142,7 +142,7 @@ public class ActivityStateDocumentBuilde
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -44,7 +44,7 @@ import org.w3c.dom.NodeList;
/**
* Configuration for an external variable.
- *
+ *
* @author Maciej Szefler <mszefler at gmail dot com>
*/
class DbExternalVariable {
@@ -117,7 +117,7 @@ class DbExternalVariable {
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) {
@@ -127,7 +127,7 @@ class DbExternalVariable {
break;
}
}
-
+
return rc;
}
@@ -278,7 +278,7 @@ class DbExternalVariable {
String strdat = c.toText(data);
if (strdat != null) {
cel.appendChild(doc.createTextNode(strdat));
- } else if (c.nullok || c.isGenerated()) {
+ } else if (c.nullok || c.isGenerated()) {
cel.setAttributeNS(XSI_NS, "xsi:nil", "true");
}
parent.appendChild(cel);
@@ -288,7 +288,7 @@ class DbExternalVariable {
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) {
@@ -371,7 +371,7 @@ class DbExternalVariable {
}
boolean supportsEmptyValue() {
- return (dataType == Types.VARCHAR || dataType == Types.LONGVARCHAR || dataType == Types.CLOB);
+ return (dataType == Types.VARCHAR || dataType == Types.LONGVARCHAR || dataType == Types.CLOB);
}
/**
@@ -445,11 +445,11 @@ class DbExternalVariable {
try {
if (val == null)
return null;
-
+
if (!supportsEmptyValue() && val.trim().length() == 0) {
return null;
}
-
+
// TODO: use xsd:date and xsd:time conversions
if (isDate())
return new java.sql.Date(ISO8601DateParser.parse(val).getTime());
@@ -486,11 +486,11 @@ class DbExternalVariable {
public boolean isGenerated() {
return (genType != null && !genType.equals(GenType.none));
}
-
+
public boolean isDatabaseGenerated() {
return isGenerated() && (genType.equals(GenType.sequence) || genType.equals(GenType.expression));
}
-
+
public String toString() {
return "Column {idx="+idx
+",name="+name
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/EVarId.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/EVarId.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/EVarId.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/EVarId.java Thu May 27 18:09:53 2010
@@ -21,29 +21,29 @@ package org.apache.ode.bpel.extvar.jdbc;
import javax.xml.namespace.QName;
/**
- * Key for identifiying an external variable.
- *
+ * Key for identifiying an external variable.
+ *
* @author Maciej Szefler <mszefler at gmail dot com>
*
*/
class EVarId {
final QName pid;
final String varId;
-
-
+
+
EVarId(QName pid, String varId) {
this.pid = pid;
this.varId = varId;
}
-
+
public boolean equals(Object o) {
return ((EVarId)o).varId.equals(varId ) && ((EVarId)o).pid.equals(pid);
}
-
+
public int hashCode() {
- return varId.hashCode() ^ pid.hashCode();
+ return varId.hashCode() ^ pid.hashCode();
}
-
+
public String toString() {
return pid + "#" + varId;
}
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/ExternalVariableKeyMapSerializer.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/ExternalVariableKeyMapSerializer.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/ExternalVariableKeyMapSerializer.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/ExternalVariableKeyMapSerializer.java Thu May 27 18:09:53 2010
@@ -28,8 +28,8 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
/**
- * Provides methods to serialize (into XML) the name-value pairs of an external-variable key map.
- *
+ * Provides methods to serialize (into XML) the name-value pairs of an external-variable key map.
+ *
* @author Maciej Szefler <mszefler at gmail dot com>
*
*/
@@ -51,9 +51,9 @@ public class ExternalVariableKeyMapSeria
el.appendChild(nvel);
}
return el;
-
+
}
-
+
/**
* Convert to map from XML.
* @param el
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/GenType.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/GenType.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/GenType.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/GenType.java Thu May 27 18:09:53 2010
@@ -20,32 +20,32 @@ package org.apache.ode.bpel.extvar.jdbc;
/**
* Generator type enumaration.
- *
+ *
* @author Maciej Szefler <mszefler at gmail dot com>
*
*/
enum GenType {
/** plain old column */
none,
-
+
/** sequence column */
sequence,
-
+
/** SQL expression column */
expression,
-
+
/** server-generated uuid column */
- uuid,
-
+ uuid,
+
/** process-id column */
- pid,
-
+ pid,
+
/** instance-id column */
- iid,
-
+ iid,
+
/** create timestamp */
- ctimestamp,
-
+ ctimestamp,
+
/** update timestamp */
utimestamp
}
\ No newline at end of file
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/InitType.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/InitType.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/InitType.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/InitType.java Thu May 27 18:09:53 2010
@@ -19,21 +19,21 @@
package org.apache.ode.bpel.extvar.jdbc;
/**
- * Enumeration of methods in which a new external variable row initialization is handled.
- *
+ * Enumeration of methods in which a new external variable row initialization is handled.
+ *
* @author Maciej Szefler <mszefler at gmail dot com>
*
*/
public enum InitType {
/** Just try to update the row, if does not already exist, fails. */
update,
-
+
/** Just insert the row, if already exist fails. */
insert,
-
+
/** Try updating the row, if no exist, then try inserting. */
update_insert,
-
+
/** First delete the row, then insert a new one. */
delete_insert
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -52,7 +52,7 @@ public class JdbcExternalVariableModule
private static final Log __log = LogFactory.getLog(JdbcExternalVariableModule.class);
public static final String JDBC_NS = "http://ode.apache.org/externalVariables/jdbc";
-
+
/** Unique QName for the engine, this should be the element used for the external-variable configuration. */
public static final QName NAME = new QName(JDBC_NS, "jdbc");
@@ -93,7 +93,7 @@ public class JdbcExternalVariableModule
} finally {
try {
ctx.close();
- } catch (NamingException e) { /* ignore */ }
+ } catch (NamingException e) { /* ignore */ }
}
if (dsCandidate == null)
@@ -122,7 +122,7 @@ public class JdbcExternalVariableModule
}
throw new ExternalVariableModuleException("Unable to open database connection for external variable " + evarId, ex);
}
-
+
try {
DbExternalVariable dbev = new DbExternalVariable(evarId, ds);
@@ -278,7 +278,7 @@ public class JdbcExternalVariableModule
+ " key.isEmpty: " + evar._keycolumns.isEmpty()
+ " key.missingValues: " + key.missingValues()
+ " key.missingDBValues: " + key.missingDatabaseGeneratedValues());
-
+
try {
if (tryupdatefirst)
insert = execUpdate(evar, key, val) == 0;
@@ -299,7 +299,7 @@ public class JdbcExternalVariableModule
DbExternalVariable evar = _vars.get(evarId);
if (evar == null)
throw new ExternalVariableModuleException("No such variable: "+evarId);
-
+
Element val;
try {
RowVal rowval = execSelect(evar, locator);
@@ -313,7 +313,7 @@ public class JdbcExternalVariableModule
/**
* Manually register a data source. Handy if you don't want to use JNDI to look these up.
- *
+ *
* @param dsName
* @param ds
*/
@@ -367,7 +367,7 @@ public class JdbcExternalVariableModule
}
// Try down casting the value as per its column type.
try {
- // Some JDBC 4.0 types have been ignored to avoid compilation errors
+ // Some JDBC 4.0 types have been ignored to avoid compilation errors
switch (dataType) {
case Types.ARRAY:
break;
@@ -396,7 +396,7 @@ public class JdbcExternalVariableModule
break;
case Types.DATALINK:
break;
- case Types.DATE:
+ case Types.DATE:
break;
case Types.DECIMAL:
if (!(value instanceof BigDecimal)) {
@@ -472,7 +472,7 @@ public class JdbcExternalVariableModule
break;
case Types.VARCHAR:
break;
- default:
+ default:
break;
}
} catch (Exception e) {
@@ -484,15 +484,15 @@ public class JdbcExternalVariableModule
RowVal execSelect(DbExternalVariable dbev, Locator locator) throws SQLException, ExternalVariableModuleException {
RowKey rowkey = dbev.keyFromLocator(locator);
if (__log.isDebugEnabled()) __log.debug("execSelect: " + rowkey);
-
+
if (rowkey.missingDatabaseGeneratedValues()) {
return null;
}
-
+
if (rowkey.missingValues()) {
throw new IncompleteKeyException(rowkey.getMissing());
}
-
+
RowVal ret = dbev.new RowVal();
Connection conn = dbev.dataSource.getConnection();
PreparedStatement stmt = null;
@@ -540,7 +540,7 @@ public class JdbcExternalVariableModule
RowKey execInsert(DbExternalVariable dbev, Locator locator, RowKey keys, RowVal values) throws SQLException {
Connection conn = dbev.dataSource.getConnection();
- PreparedStatement stmt = null;
+ PreparedStatement stmt = null;
try {
if (__log.isDebugEnabled()) {
__log.debug("execInsert: keys=" + keys + " values=" + values);
@@ -549,8 +549,8 @@ public class JdbcExternalVariableModule
__log.debug("_autoColNames: " + ObjectPrinter.stringifyNvList(dbev._autoColNames));
}
- stmt = keys.missingDatabaseGeneratedValues()
- ? conn.prepareStatement(dbev.insert, dbev._autoColNames)
+ stmt = keys.missingDatabaseGeneratedValues()
+ ? conn.prepareStatement(dbev.insert, dbev._autoColNames)
: conn.prepareStatement(dbev.insert);
int idx = 1;
@@ -560,7 +560,7 @@ public class JdbcExternalVariableModule
if (__log.isDebugEnabled()) __log.debug("Set parameter "+idx+": "+val);
if (val == null)
stmt.setNull(idx, c.dataType);
- else
+ else
stmt.setObject(idx, val);
idx++;
}
@@ -577,7 +577,7 @@ public class JdbcExternalVariableModule
// With JDBC 3, we can get the values of the key columns (if the db supports it)
ResultSet keyRS = stmt.getGeneratedKeys();
try {
- if (keyRS == null)
+ if (keyRS == null)
throw new SQLException("Database did not return generated keys");
keyRS.next();
for (Column ck : keys._columns) {
@@ -588,7 +588,7 @@ public class JdbcExternalVariableModule
} finally {
keyRS.close();
}
- }
+ }
return keys;
} finally {
if (stmt != null) stmt.close();
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/RowSubset.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/RowSubset.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/RowSubset.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/extvar/jdbc/RowSubset.java Thu May 27 18:09:53 2010
@@ -18,7 +18,7 @@
*/
/**
- *
+ *
*/
package org.apache.ode.bpel.extvar.jdbc;
@@ -39,11 +39,11 @@ class RowSubset extends ArrayList<Object
/* Name --> Column mapping. */
protected HashMap<String, Column> _colmap = new HashMap<String,Column>();
-
-
+
+
RowSubset(List<Column> columns) {
_columns = columns;
-
+
for(Column c : columns) {
add(null);
_colmap.put(c.name,c);
@@ -59,7 +59,7 @@ class RowSubset extends ArrayList<Object
}
return false;
}
-
+
/**
* Return <code>true</code> if any database-generated values are missing
*/
@@ -70,8 +70,8 @@ class RowSubset extends ArrayList<Object
}
return false;
}
-
-
+
+
Column getColumn(String name) {
return _colmap.get(name);
}
@@ -79,7 +79,7 @@ class RowSubset extends ArrayList<Object
Column getColumn(int idx) {
return _columns.get(idx);
}
-
+
Object get(String name) {
Column c = _colmap.get(name);
if (c == null)
@@ -96,7 +96,7 @@ class RowSubset extends ArrayList<Object
int idx = _columns.indexOf(c);
this.set(idx, val);
}
-
+
public String toString() {
StringBuffer buf = new StringBuffer(getClass().getSimpleName());
buf.append("(");
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -26,7 +26,7 @@ public abstract class AbortMessageExchan
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -30,9 +30,9 @@ public final class FailMessageExchangeEx
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -36,15 +36,15 @@ public final class FaultMessageExchangeE
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/InstanceCountThrottler.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/InstanceCountThrottler.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/InstanceCountThrottler.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/intercept/InstanceCountThrottler.java Thu May 27 18:09:53 2010
@@ -26,9 +26,9 @@ import javax.xml.namespace.QName;
import java.util.Map;
/**
- * An example of a simple interceptor providing a "throttling" capability - that is an
+ * An example of a simple interceptor providing a "throttling" capability - that is an
* ability to limit the number of instances created for a given process.
- *
+ *
* @author Maciej Szefler
*/
public class InstanceCountThrottler extends NoOpInterceptor {
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -25,26 +25,26 @@ import org.apache.ode.bpel.intercept.Mes
/**
* Helper for invoking the appropriate {@link org.apache.ode.bpel.intercept.MessageExchangeInterceptor}
- * method -- basically a work-around for lack of closures.
+ * method -- basically a work-around for lack of closures.
* @author mszefler
*
*/
public abstract class InterceptorInvoker {
private final String _name;
- // Closures anyone?
-
+ // 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)
+ 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)
+ public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
throws FailMessageExchangeException, FaultMessageExchangeException {
i.onBpelServerInvoked((MyRoleMessageExchange) mex, ictx);
}
@@ -52,15 +52,15 @@ public abstract class InterceptorInvoker
/** Invoke {@link MessageExchangeInterceptor#onBpelServerInvoked(MyRoleMessageExchange, InterceptorContext)} */
public static final InterceptorInvoker __onJobScheduled = new InterceptorInvoker("onJobScheduled") {
- public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
+ 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)
+ public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
throws FailMessageExchangeException, FaultMessageExchangeException {
i.onPartnerInvoked((PartnerRoleMessageExchange) mex, ictx);
}
@@ -68,7 +68,7 @@ public abstract class InterceptorInvoker
/** Invoke {@link MessageExchangeInterceptor#onPartnerInvoked(PartnerRoleMessageExchange, InterceptorContext)} */
public static final InterceptorInvoker __onNewInstanceInvoked = new InterceptorInvoker("onNewInstanceInvoked") {
- public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
+ public void invoke(MessageExchangeInterceptor i, MessageExchange mex, InterceptorContext ictx)
throws FailMessageExchangeException, FaultMessageExchangeException {
i.onNewInstanceInvoked((MyRoleMessageExchange) mex, ictx);
}
@@ -78,10 +78,10 @@ public abstract class InterceptorInvoker
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -29,26 +29,26 @@ import org.apache.ode.bpel.iapi.ProcessC
/**
* Hook into the BPEL server that enables intercepting of message exchange
* invocation.
- *
+ *
* @author Maciej Szefler
- *
+ *
*/
public interface MessageExchangeInterceptor {
/**
* Called when the message is scheduled, before any attempt to
* invoke the BPEL server is made.
- *
+ *
* @param mex
* message exchange
*/
void onJobScheduled(MyRoleMessageExchange mex, InterceptorContext ic)
throws FailMessageExchangeException, FaultMessageExchangeException;
-
+
/**
* Called when the BPEL server is invoked, before any attempt to route the
* message exchange to a process.
- *
+ *
* @param mex
* message exchange
*/
@@ -58,7 +58,7 @@ public interface MessageExchangeIntercep
/**
* Called when the BPEL server is invoked, after the message exchange has
* been routed to the process.
- *
+ *
* @param mex
* message exchange
*/
@@ -69,7 +69,7 @@ public interface MessageExchangeIntercep
* Called when the BPEL server is invoked, after the message exchange has
* been routed to the process and it has been determined that a new instance
* needs to be created.
- *
+ *
* @param mex
* message exchange
*/
@@ -79,7 +79,7 @@ public interface MessageExchangeIntercep
/**
* Called when the BPEL server is invoked, before any attempt to route the
* message exchange to a process.
- *
+ *
* @param mex
* message exchange
*/
@@ -94,7 +94,7 @@ public interface MessageExchangeIntercep
ProcessDAO getProcessDAO();
ProcessConf getProcessConf();
-
+
BpelEngine getBpelEngine();
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -25,9 +25,9 @@ import org.apache.ode.bpel.iapi.PartnerR
* No-Op implementation of the
* {@link org.apache.ode.bpel.intercept.MessageExchangeInterceptor interface;
* good for sub-classing.
- *
+ *
* @author mszefler
- *
+ *
*/
public class NoOpInterceptor implements MessageExchangeInterceptor {
@@ -35,7 +35,7 @@ public class NoOpInterceptor implements
InterceptorContext ic) throws FailMessageExchangeException,
FaultMessageExchangeException {
}
-
+
public void onBpelServerInvoked(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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -22,7 +22,7 @@ import org.apache.ode.bpel.iapi.MyRoleMe
import org.apache.ode.bpel.runtime.InvalidProcessException;
/**
- * An example of a simple interceptor providing a "throttling" capability - that is an
+ * An example of a simple interceptor providing a "throttling" capability - that is an
* ability to limit the size of processes created in a server.
*/
public class ProcessCountThrottler extends NoOpInterceptor {
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -22,7 +22,7 @@ import org.apache.ode.bpel.iapi.MyRoleMe
import org.apache.ode.bpel.runtime.InvalidProcessException;
/**
- * An example of a simple interceptor providing a "throttling" capability - that is an
+ * An example of a simple interceptor providing a "throttling" capability - that is an
* ability to limit the size of processes created in a server.
*/
public class ProcessSizeThrottler extends NoOpInterceptor {
Modified: ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/BpelDAOConnectionImpl.java
URL: http://svn.apache.org/viewvc/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/BpelDAOConnectionImpl.java?rev=948937&r1=948936&r2=948937&view=diff
==============================================================================
--- ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/BpelDAOConnectionImpl.java (original)
+++ ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/BpelDAOConnectionImpl.java Thu May 27 18:09:53 2010
@@ -83,7 +83,7 @@ class BpelDAOConnectionImpl implements B
return process;
}
-
+
public ProcessDAO createProcess(QName pid, QName type, String guid, long version) {
ProcessDaoImpl process = new ProcessDaoImpl(this,_store,pid,type, guid,version);
_store.put(pid,process);
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=948937&r1=948936&r2=948937&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 18:09:53 2010
@@ -76,7 +76,7 @@ class CorrelatorDaoImpl extends DaoBaseI
boolean routed = false;
for (MessageRouteDaoImpl route : _routes) {
assert route._ckeySet != null;
-
+
if(keySet.isRoutableTo(route._ckeySet, "all".equals(route.getRoute()))) {
if ("all".equals(route.getRoute())) {
routes.add(route);