This content has been marked as final.
Show 2 replies
-
1. Re: How to intercept EJBs residing in another jar-file?
jaikiran Apr 23, 2008 11:17 AM (in response to raoul.schmidiger)I haven't tried using the interceptors with ejb-jar.xml files. I have tried them with annotations. Why don't you use annotations for this? Something like:
Bean1 in app1.jar containing this:@Stateless @Interceptors (GlobalInterceptor.class) public class Bean1 implements MyBean1 {
And a similar one in
Bean2 in mylib.jar@Stateless @Interceptors (GlobalInterceptor.class) public class Bean2 implements MyBean2 {
-
2. Re: How to intercept EJBs residing in another jar-file?
jaikiran Apr 24, 2008 3:13 AM (in response to raoul.schmidiger)"raoul.schmidiger" wrote:
This works fine for all EJBs that are in the same jar like the ejb-jar.xml file (app1.jar). However, any method call to an EJB in mylib.jar is not intercepted at all.
What do I have to change in order the have also the method calls with the EJBs in the mylib.jar file intercepted? An extensive search on google and in the jBoss forum did not reveal any solution for my problem. Either nobody has ever tried to do this, or I am just missing something!
An ejb-jar.xml represents on single ejb deployment unit. So, in your case, you will have to create another ejb-jar.xml file with similar contents for mylib.jar.