Patches item #510969, was opened at 2002-01-30 15:28
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=510969&group_id=22866

Category: JBossServer
Group: v2.4 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Victor Langelo (vlangelo)
Assigned to: Nobody/Anonymous (nobody)
Summary: Lost app exceptions in BMP home methods

Initial Comment:
Application exceptions declared on create and finder
methods of BMP entity beans are embedded in a
UndeclaredThrowableException by BMPPersistenceManger.
This causes EntityContainer to treat them as runtime
exceptions.

The UndeclaredThrowableException was added in the
1.22.4.1 to 1.22.4.2 revision to avoid a class cast
exception. The following patch retains the else case
with a UndeclaredThrowableException eventhough I cannot
think of any other throwable other than error that
might occur here.


diff -u -r1.22.4.2 BMPPersistenceManager.java
--- ./jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java   2001/10/27 
23:00:38     1.22.4.2
+++ ./jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java   2002/01/30 
+23:15:23
@@ -162,6 +162,10 @@
             // Wrap runtime exceptions
             throw new EJBException((Exception)e);
          }
+         else if (e instanceof Exception)
+         {
+            throw (Exception)e;
+         }
          else
          {
             throw new UndeclaredThrowableException(e);
@@ -216,6 +220,11 @@
             // Wrap runtime exceptions
             throw new EJBException((Exception)e);
          }
+         else if (e instanceof Exception)
+         {
+            // Rethrow exception
+            throw (Exception)e;
+         }
          else
          {
             Exception ex = new
UndeclaredThrowableException(e);
@@ -527,6 +536,11 @@
          {
             // Wrap runtime exceptions
             throw new EJBException((Exception)e);
+         }
+         else if (e instanceof Exception)
+         {
+            // Rethrow exception
+            throw (Exception)e;
          }
          else
          {


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=510969&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to