[
https://issues.apache.org/jira/browse/OPENEJB-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659174#action_12659174
]
Jacek Laskowski commented on OPENEJB-980:
-----------------------------------------
Created a junit test to spur some discussion on how it should be implemented
(and invite more contributors). I don't know how to search for (sub)classes
that inherit from the one found (with
finder.findAnnotatedClasses(ApplicationException.class)) so I'll follow up on
it in d...@openejb mailing list. Everybody's invited.
jlaskow...@work /cygdrive/c/oss/openejb3
$ svn ci -m 'Test for OPENEJB-980 @ApplicationException is not being inherited'
.
Adding
container/openejb-core/src/test/java/org/apache/openejb/config/AnnotationDeployerTest.java
Transmitting file data .
Committed revision 729380.
> @ApplicationException is not being inherited
> --------------------------------------------
>
> Key: OPENEJB-980
> URL: https://issues.apache.org/jira/browse/OPENEJB-980
> Project: OpenEJB
> Issue Type: Bug
> Affects Versions: 3.1
> Reporter: Geoff Callender
>
> When @ApplicationException(rollback = true) is annotated on an exception
> thrown by a session bean then all is well - the client receives the exception.
> But if the annotation is moved up to a superclass of the exception then all
> is not well - the client receives EJBTransactionRolledbackException.
> In the app server I am porting from the following worked OK, and I believe it
> is the correct behaviour:
> public interface DogServiceRemote {
> void createDog(Dog dog) throws BusinessException;
> }
> @ApplicationException(rollback = true)
> abstract public class BusinessException extends Exception {
> ...
> }
> public class ValueRequiredException extends BusinessException {
> ...
> }
> where createDog(...) throws many different subclasses of BusinessException,
> none of which is annotated with @ApplicationException.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.