[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-2262) When throwing an application exception in a method that is annotated with NOT_SUPPORTED it should not wrap the application Exception.

Carlo de Wolf (JIRA) jira-events at lists.jboss.org
Tue Sep 13 10:50:26 EDT 2011


    [ https://issues.jboss.org/browse/EJBTHREE-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628166#comment-12628166 ] 

Carlo de Wolf commented on EJBTHREE-2262:
-----------------------------------------

{noformat}
diff --git a/src/org/jboss/tutorial/stateless/bean/MyException.java b/src/org/jboss/tutorial/stateless/bean/MyException.java
index 5b4ef35..2883819 100644
--- a/src/org/jboss/tutorial/stateless/bean/MyException.java
+++ b/src/org/jboss/tutorial/stateless/bean/MyException.java
@@ -23,7 +23,7 @@ package org.jboss.tutorial.stateless.bean;
 
 import javax.ejb.ApplicationException;
 
-//@ApplicationException                                                        
+ at ApplicationException                                                          
 
 public class MyException extends java.lang.Exception
 {
{noformat}

{noformat}
16:45:52,055 ERROR [STDERR] org.jboss.tutorial.stateless.bean.MyException: Alert! Alert!
{noformat}

So instead of relying on the throws clause and setting @ApplicationException the code works as expected.

> When throwing an application exception in a method that is annotated with NOT_SUPPORTED it should not wrap the application Exception.
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: EJBTHREE-2262
>                 URL: https://issues.jboss.org/browse/EJBTHREE-2262
>             Project: EJB 3.0
>          Issue Type: Bug
>            Reporter: Shaun Appleton
>         Attachments: stateless_00500318.zip
>
>
> When throwing an application exception in a method that is annotated with NOT_SUPPORTED it should not wrap the application Exception.
> What currently happen is that it is wrapped in an EJBException instead of being thrown un-wrapped.
> See Table 14 p361. of jsr-220 spec
> This has been tested on EAP 5.1.0

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list