You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by mc...@apache.org on 2008/08/05 16:28:49 UTC
svn commit: r682724 - in
/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2:
storage/SandeshaStorageTransientException.java workers/InvokerWorker.java
Author: mckierna
Date: Tue Aug 5 07:28:49 2008
New Revision: 682724
URL: http://svn.apache.org/viewvc?rev=682724&view=rev
Log:
See https://issues.apache.org/jira/browse/SANDESHA2-174, SandeshaTransientStorageException, thx Dave
Added:
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/SandeshaStorageTransientException.java
Modified:
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java
Added: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/SandeshaStorageTransientException.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/SandeshaStorageTransientException.java?rev=682724&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/SandeshaStorageTransientException.java (added)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/SandeshaStorageTransientException.java Tue Aug 5 07:28:49 2008
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.sandesha2.storage;
+
+/**
+ * To track transient exceptions happening in the storage area
+ */
+
+public class SandeshaStorageTransientException extends SandeshaStorageException {
+
+ static final long serialVersionUID = -7617170115412851911L;
+
+ public SandeshaStorageTransientException (String message) {
+ super (message);
+ }
+
+ public SandeshaStorageTransientException (Exception e) {
+ super (e);
+ }
+
+ public SandeshaStorageTransientException (String m,Exception e) {
+ super (m,e);
+ }
+}
Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java?rev=682724&r1=682723&r2=682724&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java Tue Aug 5 07:28:49 2008
@@ -38,6 +38,7 @@
import org.apache.sandesha2.SandeshaException;
import org.apache.sandesha2.context.ContextManager;
import org.apache.sandesha2.storage.SandeshaStorageException;
+import org.apache.sandesha2.storage.SandeshaStorageTransientException;
import org.apache.sandesha2.storage.StorageManager;
import org.apache.sandesha2.storage.Transaction;
import org.apache.sandesha2.storage.beanmanagers.InvokerBeanMgr;
@@ -338,6 +339,14 @@
return messageInvoked;
}
+ } catch (SandeshaStorageTransientException e){
+ if (log.isDebugEnabled())
+ log.debug("SandeshaStorageTransientException :", e);
+
+ if (transaction != null && transaction.isActive())
+ transaction.rollback();
+ messageInvoked = false;
+
} catch (Exception e) {
if (log.isDebugEnabled())
log.debug("Exception :", e);
@@ -345,8 +354,9 @@
if (transaction != null && transaction.isActive())
transaction.rollback();
messageInvoked = false;
-
+
handleFault(rmMsg, e);
+
}
if(transaction != null && transaction.isActive()) transaction.commit();
transaction = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org