You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ja...@apache.org on 2005/07/02 08:06:32 UTC
cvs commit: ws-sandesha/src/org/apache/sandesha/server RMInvokerWorker.java
jaliya 2005/07/01 23:06:32
Modified: src/org/apache/sandesha/server RMInvokerWorker.java
Log:
Changed a synchronization block in the RMInvokerWorker
Revision Changes Path
1.5 +10 -1 ws-sandesha/src/org/apache/sandesha/server/RMInvokerWorker.java
Index: RMInvokerWorker.java
===================================================================
RCS file: /home/cvs/ws-sandesha/src/org/apache/sandesha/server/RMInvokerWorker.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RMInvokerWorker.java 2 Jul 2005 04:59:54 -0000 1.4
+++ RMInvokerWorker.java 2 Jul 2005 06:06:32 -0000 1.5
@@ -40,6 +40,7 @@
private IStorageManager storageManager;
private static final Log log = LogFactory.getLog(RMInvokerWorker.class.getName());
private static final UUIDGen uuidGen = UUIDGenFactory.getUUIDGen();
+ private static Object lock = new Object();
public RMInvokerWorker() {
setStorageManager(new ServerStorageManager());
@@ -55,10 +56,17 @@
}
- public synchronized void run() {
+ public void run() {
while (true) {
try {
Thread.sleep(Constants.RMINVOKER_SLEEP_TIME);
+ } catch (InterruptedException e) {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+
+ synchronized(lock){
+ try {
+
RMMessageContext rmMessageContext = getStorageManager().getNextMessageToProcess();
if (rmMessageContext != null) {
@@ -120,6 +128,7 @@
RMInvokerWorker.log.error(error);
}
}
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org