ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sath...@apache.org
Subject [23/30] ode git commit: tested with concurrent process
Date Fri, 06 Nov 2015 10:51:18 GMT
tested with concurrent process


Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/9ffe0c77
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/9ffe0c77
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/9ffe0c77

Branch: refs/heads/ODE-563
Commit: 9ffe0c779115515c045888229871187bf3c41a24
Parents: 9a0b742
Author: suba <suba.11@cse.mrt.ac.lk>
Authored: Wed Jul 15 00:21:09 2015 +0530
Committer: suba <suba.11@cse.mrt.ac.lk>
Committed: Wed Jul 15 00:21:09 2015 +0530

----------------------------------------------------------------------
 .../java/org/apache/ode/axis2/ODEServer.java    | 56 +++++++-------------
 .../hazelcast/HazelcastInstanceLock.java        | 15 ++----
 2 files changed, 24 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/9ffe0c77/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
----------------------------------------------------------------------
diff --git a/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java b/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
index 34e245a..da62139 100644
--- a/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
+++ b/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
@@ -19,38 +19,11 @@
 
 package org.apache.ode.axis2;
 
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadFactory;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.sql.DataSource;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.InvalidTransactionException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import javax.transaction.xa.XAResource;
-
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
-import org.apache.commons.httpclient.util.IdleConnectionTimeoutThread;
 import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
+import org.apache.commons.httpclient.util.IdleConnectionTimeoutThread;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ode.axis2.deploy.DeploymentPoller;
@@ -64,12 +37,7 @@ import org.apache.ode.bpel.engine.BpelServerImpl;
 import org.apache.ode.bpel.engine.CountLRUDehydrationPolicy;
 import org.apache.ode.bpel.engine.cron.CronScheduler;
 import org.apache.ode.bpel.extvar.jdbc.JdbcExternalVariableModule;
-import org.apache.ode.bpel.iapi.BpelEventListener;
-import org.apache.ode.bpel.iapi.EndpointReferenceContext;
-import org.apache.ode.bpel.iapi.ProcessConf;
-import org.apache.ode.bpel.iapi.ProcessStoreEvent;
-import org.apache.ode.bpel.iapi.ProcessStoreListener;
-import org.apache.ode.bpel.iapi.Scheduler;
+import org.apache.ode.bpel.iapi.*;
 import org.apache.ode.bpel.intercept.MessageExchangeInterceptor;
 import org.apache.ode.bpel.memdao.BpelDAOConnectionFactoryImpl;
 import org.apache.ode.bpel.pmapi.InstanceManagement;
@@ -78,11 +46,25 @@ import org.apache.ode.il.config.OdeConfigProperties;
 import org.apache.ode.il.dbutil.Database;
 import org.apache.ode.scheduler.simple.JdbcDelegate;
 import org.apache.ode.scheduler.simple.SimpleScheduler;
-import org.apache.ode.store.ProcessStoreImpl;
 import org.apache.ode.store.ClusterProcessStoreImpl;
+import org.apache.ode.store.ProcessStoreImpl;
 import org.apache.ode.utils.GUID;
 import org.apache.ode.utils.fs.TempFileManager;
 
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.sql.DataSource;
+import javax.transaction.*;
+import javax.transaction.xa.XAResource;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+
 /**
  * Server class called by our Axis hooks to handle all ODE lifecycle management.
  *
@@ -136,7 +118,7 @@ public class ODEServer {
     
     public Runnable txMgrCreatedCallback;
 
-    private boolean isClusteringEnabled;
+    private boolean isClusteringEnabled = false;
 
     public void init(ServletConfig config, ConfigurationContext configContext) throws ServletException
{
         init(config.getServletContext().getRealPath("/WEB-INF"), configContext);
@@ -213,7 +195,7 @@ public class ODEServer {
         registerExternalVariableModules();
 
         _store.loadAll();
-        _clusterManager.registerClusterProcessStoreMessageListener();
+        if (_clusterManager != null) _clusterManager.registerClusterProcessStoreMessageListener();
 
         try {
             _bpelServer.start();

http://git-wip-us.apache.org/repos/asf/ode/blob/9ffe0c77/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastInstanceLock.java
----------------------------------------------------------------------
diff --git a/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastInstanceLock.java
b/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastInstanceLock.java
index aa6c086..1729bac 100644
--- a/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastInstanceLock.java
+++ b/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastInstanceLock.java
@@ -46,26 +46,23 @@ public class HazelcastInstanceLock implements ClusterLock<Long>
{
 
     public void lock(Long iid, int time, TimeUnit tu) throws InterruptedException,TimeoutException
{
         if (iid == null) {
-            if (__log.isDebugEnabled()) {
+            if (__log.isDebugEnabled())
                 __log.debug(" Instance Id null at lock[]");
-            }
             return;
         }
 
         String thrd = Thread.currentThread().toString();
 
-        if (__log.isDebugEnabled()) {
+        if (__log.isDebugEnabled())
             __log.debug(thrd + ": lock(iid=" + iid + ", time=" + time + tu + ")");
-        }
 
         putIfAbsent(iid, iid);
 
         if (!_lock_map.tryLock(iid, time, tu)) {
 
-            if (__log.isDebugEnabled()) {
+            if (__log.isDebugEnabled())
                 __log.debug(thrd + ": lock(iid=" + iid + ", " +
                         "time=" + time + tu + ")-->TIMEOUT");
-            }
             throw new TimeoutException();
         }
 
@@ -73,9 +70,8 @@ public class HazelcastInstanceLock implements ClusterLock<Long> {
 
     public void unlock(Long iid) {
         if (iid == null) {
-            if (__log.isDebugEnabled()) {
+            if (__log.isDebugEnabled())
                 __log.debug(" unlock, instance id is null");
-            }
             return;
         }
 
@@ -83,9 +79,8 @@ public class HazelcastInstanceLock implements ClusterLock<Long> {
 
         _lock_map.unlock(iid);
 
-        if (__log.isDebugEnabled()) {
+        if (__log.isDebugEnabled())
             __log.debug(thrd + " unlock(iid=" + iid + ")");
-        }
     }
 
     public boolean tryLock(Long key) {


Mime
View raw message