Hello there,
I've a problem getting Interceptors to work in our EJB3-Application.
I looked over the samples given in the EJB3Trail as well as in the tutorials 
available at jboss.com and implemented it accordingly, BUT it does not work, 
although the examples do work. I investigated this a little further and found 
that Interceptors only seem to work in certain context.
I have a class A which is derived from an abstract class B. A implements an 
interface C which defines the business-methods for A. This interface is derived 
from interface D which defines business-methods implemented by B.


  | public abstract class B{
  | private static Logger logger = Logger.getLogger(B.class);
  | @AroundInvoke
  | public testAroundInvoke(InvocationContext ctx) throws Exception{
  | logger.info("B.testAroundInvoke");
  | return ctx.proceed();
  | }
  | }
  | 
  | @Local public interface D{
  | }
  | 
  | @Local public interface C extends D{
  | }
  | 
  | @Stateless
  | @Interceptor(TestInterceptor.class)
  | public class A extends B implements C{
  | ...
  | }
  | 

This way all business-methods of B, as defined by D, are intercepted by both, 
the external Interceptor and the internal of class B. Business-methods of A are 
not intercepted.
If I remove the AroundInvoke method in B no interceptors at all are called 
anymore. Why is that? Am I doing something wrong or is this a bug?
How do I get JBoss to intercept business-methods of A?

Please help.

Milan Wölke

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3912110#3912110

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912110


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to