I need to execute a logic before every call in a stateless bean method.
Example:
class MyStatelessBean
{
void myPreExecutionLogic()
{
System.out.println("pre method execution logic");
}
void method1()
{
System.out.println("method 1");
}
void method2()
{
System.out.println("method 2");
}
}
There is a way of doing this using EJB? Registering some kind of listener or annotating the myPreExecutionLogic like @PreConstruct?
{ System.out.println("pre method execution logic");
} void method1() { System.out.println("method 1"); } }' There is a way of doing this in a abstract super class? I need that all the subclasses methods to be intercepted. – Wagner Paz Feb 23 '12 at 16:56