[Jboss-cvs] JBossAS SVN: r56484 - trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Aug 31 14:53:59 EDT 2006
Author: weston.price at jboss.com
Date: 2006-08-31 14:53:59 -0400 (Thu, 31 Aug 2006)
New Revision: 56484
Added:
trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/DefaultRuntimeErrorHandler.java
trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/RuntimeErrorHandler.java
Log:
[JBAS-3183] Backport of new Session handling and transaction management primarily designed to integrate with WebSphereMQ.
Added: trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/DefaultRuntimeErrorHandler.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/DefaultRuntimeErrorHandler.java 2006-08-31 18:53:45 UTC (rev 56483)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/DefaultRuntimeErrorHandler.java 2006-08-31 18:53:59 UTC (rev 56484)
@@ -0,0 +1,19 @@
+package org.jboss.resource.adapter.jms.inflow;
+
+/**
+ * A DefaultRuntimeErrorHandler.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class DefaultRuntimeErrorHandler implements RuntimeErrorHandler
+{
+ public void handleRuntimeError(Throwable t)
+ {
+
+ if(t instanceof RuntimeException || t instanceof Error)
+ throw (RuntimeException)t;
+
+ }
+
+}
Added: trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/RuntimeErrorHandler.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/RuntimeErrorHandler.java 2006-08-31 18:53:45 UTC (rev 56483)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/RuntimeErrorHandler.java 2006-08-31 18:53:59 UTC (rev 56484)
@@ -0,0 +1,20 @@
+package org.jboss.resource.adapter.jms.inflow;
+
+/**
+ * A RuntimeErrorHandler used to propagate runtime errors from inflow listener. This is primarily used
+ * to support the non-standard behavior of redelivery of non XA messages that throw a runtime exception.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public interface RuntimeErrorHandler
+{
+
+ /**
+ * Determines if an exception is a runtime error. If it is, it simply rethrows the exception.
+ *
+ * @param t the exception
+ */
+ public void handleRuntimeError(Throwable t);
+
+}
More information about the jboss-cvs-commits
mailing list