Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] how to capture method joinpoints in EJB3 session bean interface?

Hi all,

 i am new to aspectj and i am trying to write aspect to capture the method
of all a session bean (EJB 3.0 syntax).

  the methods i want to captures are the 'business method' in the session
bean.
As EJB 3.0 session bean can be created in the following form:

--------------------------------------------------------------
//interface defining the session bean method
public interface SessionBeanInterface {
   public void advicedMethod();
} 
--------------------------------------------------------------

@Stateless(name="MySessionBean")
@Remote(SessionBeanInterface.class) //indicate SesionBeanInterface is the
remote bussinesss interface
public class SessionBean implements SessionBeanInterface {

   public void advicedMethod(){
        //this method to be captured by before execution(...) pointcut

   }

   public void nonAdvicedMethod() {
    //this method is NOT to be captured
   }
}
-------------------------------------------------------------------

in this situation, is this possible to write pointcut to capture only the
methods declared
in the SessionBeanInterface interface??

*** i CANNOT HARDCODE the interface type in the aspect as i am now writing a 
*** generic tool aims to capture all the method execution.

thank you.

ppkluk
-- 
View this message in context: http://www.nabble.com/how-to-capture-method-joinpoints-in-EJB3-session-bean-interface--tp24703854p24703854.html
Sent from the AspectJ - users mailing list archive at Nabble.com.



Back to the top