users@glassfish.java.net

ApplicationException annotation ignored if exception in lib dir

From: <glassfish_at_javadesktop.org>
Date: Wed, 02 May 2007 02:30:19 PDT

Hi,

I have the following situation:

An ear file that consists of three jar files:
[b]* lib/Cursus-session-intf.jar[/b]
This contains all my interfaces of my ejbs, package nl.service

[b]* lib/Cursus-entity.jar[/b]
This contains all my entities

[b]* Cursus-session-impl.jar[/b]
This contains the ejb-implementation classes, package nl.service.impl

I defined a runtime exception X and annotated that with @ApplicationException.
If i put my exception in the interface jar (package nl.service), the ApplicationException annotation is ignored and the (remote) client gets a wrapped exception (EJBException).

If I move the exception to the ejb jar (package nl.service.impl) than the ApplicationException annotation is picked up and the client gets the unwrapped exception.

I am using version: "Sun Java System Application Server Platform Edition 9.0_01 (build b02-p01)".

Any suggestions why it behaves like this? Is it a bug or my misunderstanding of ...(?)

Thanks
[Message sent by forum member 'blankema' (blankema)]

http://forums.java.net/jive/thread.jspa?messageID=215142