tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Throwing ApplicationException from Interceptor wraps with annotation, works with ejb-jar.xml
Date Sat, 12 Oct 2013 15:58:37 GMT
opened + fixed https://issues.apache.org/jira/browse/TOMEE-1057 but needs
to pass tck again to validate this behavior

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/10/12 Romain Manni-Bucau <rmannibucau@gmail.com>

> Not sure that's linked but we'll have a look.
>
> BTW did you see https://issues.apache.org/jira/browse/SHIRO-337 ?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/10/12 nialscorva <jason@tensorwrench.com>
>
>> I am writing a CDI interceptor that evaluates Apache Shiro annotations.
>>  If
>> it fails, it throws a subclass of AuthorizationException or
>> AuthenticationException (both RuntimeExceptions) that is marked as an
>> @ApplicationException.
>>
>> When testing with Tomee 1.5.2 under Arquillian, I've noticed that just if
>> the exception is annotated with @ApplicationException, it still wraps the
>> exception in an EJBException.  If I list the exceptions in
>> WEB-INF/ejb-jar.xml, it does not wrap it.
>>
>> To replicate it using the code at
>> https://github.com/TensorWrench/shiro-jee,
>> look at
>> src/test/java/com/tensorwrench/shiro/jee/SecuredInterceptorTest.java.  As
>> committed, the test runs.  If you remove the line:
>>               .addAsWebInfResource(new
>> StringAsset(ejbJar.exportAsString()),"ejb-jar.xml")
>> then all of the tests expecting an exception fail, since it will throw it
>> wrapped as an EJBException.
>>
>> Probably related to https://issues.apache.org/jira/browse/OPENEJB-1052
>>
>> Is this a bug or am I misunderstanding something?
>>
>>
>>
>> --
>> View this message in context:
>> http://openejb.979440.n4.nabble.com/Throwing-ApplicationException-from-Interceptor-wraps-with-annotation-works-with-ejb-jar-xml-tp4665562.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message