Hi,

I've been looking at this change for a while and trying to work out what 
you were trying to achieve as at the moment as I really don't like 
catching a (RuntimeException).
At the very least we should log the exception that was caught.  The best 
solution would be to catch the actual exception that was thrown.  Even so 
- as you said, we probably have a problem with the InMemory transaction 
model and we are now simply hiding this.  This leads me onto another 
question.  What was the exception thrown ? 

Andrew Gatford
Technical Project Lead 
Websphere ESB Foundation Technologies 
Hursley MP211
IBM United Kingdom Laboratories, Hursley Park, Winchester, SO21 2JN
Telephone : 
Internal (7) 245743 
External 01962 815743
Internet : [email protected]
----- Forwarded by Andrew K Gatford/UK/IBM on 03/03/2009 11:26 -----

From:
[email protected]
To:
[email protected]
Date:
24/02/2009 15:39
Subject:
svn commit: r747405 - 
/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryTransaction.java



Author: amilas
Date: Tue Feb 24 15:38:33 2009
New Revision: 747405

URL: http://svn.apache.org/viewvc?rev=747405&view=rev
Log:
when handling duplicate messages. i.e if the services blocks the thread 
for 60 seconds, then there is a possiblity
that RMS sends duplicate messages. these duplcate messages are locked in 
the GloblaInHander util first message clear 
the service. Then when after processing these messages they going to 
commit. At this commit release locks method 
throws a Runtime Exception which causes a soap fault message. this can be 
avoided by catching this exception at this 
level. But how ever there may be an error with the InMemory Transaction 
model.

Modified:
 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryTransaction.java

Modified: 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryTransaction.java
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryTransaction.java?rev=747405&r1=747404&r2=747405&view=diff

==============================================================================
--- 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryTransaction.java
 
(original)
+++ 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryTransaction.java
 
Tue Feb 24 15:38:33 2009
@@ -81,12 +81,15 @@
                                 this.useSerialization = useSerialization;
                                 if(LoggingControl.isAnyTracingEnabled() 
&& log.isDebugEnabled()) log.debug("Exit: InMemoryTransaction::<init>, " + 
this);
                 }
- 
-                public void commit() {
-                                releaseLocks();
-                                if(sentMessages && useSerialization) 
manager.getSender().wakeThread();
-                                active = false;
-                }
+
+    public void commit() {
+        try {
+            releaseLocks();
+        } catch (RuntimeException e) {
+        }
+        if (sentMessages && useSerialization) 
manager.getSender().wakeThread();
+        active = false;
+    }
 
                 public void rollback() {
                                 releaseLocks();



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]








Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU





Reply via email to