On Mar 19, 2007, at 5:26 AM, t.maus wrote:
Hi there ...
I am trying to use EJB3 Initerceptors for a poc project.
I was properly able to add and execute a @PostConstruct annotation
to my
Stateless Session Bean.
Adding a @AroundInvoke or a manually create Annotation like
@SpringBean
however failed to work.
Is the complete Interceptor framework already implemented and
available for
M3 or should I stop playing around within for now ??
I'm pretty sure the interceptor support is in trunk (openejb3 +
geronimo) but not yet implemented in g 2.0M3. The Openejb developers
have been quite good at pushing snapshots so if you build geronimo
trunk online you should get something with interceptor support.
thanks
david jencks
Please find my used impl. below
--- used class ---
@Stateless
@Interceptors(SpringBeanInterceptor.class)
public class Calculator implements CalculatorLocal {
private EchoBean echoBean;
private static Log log = LogFactory.getLog(Calculator.class);
@PostConstruct public void init()
{
System.out.println("PostConstruct is properly working !!!");
}
@AroundInvoke
public Object invoke(InvocationContext ctx) throws Exception
{
System.out.println("***invoked");
return ctx.proceed();
}
public int sum(int add1, int add2) {
return add1+add2;
}
public int multiply(int mul1, int mul2) {
return mul1*mul2;
}
@SpringBean
public void setEchoBean(EchoBean bean) {
log.debug("entered setEchoBean");
System.out.println("entering setEchoBean");
this.echoBean = bean;
}
}
thanks for your help
--
View this message in context: http://www.nabble.com/Geronimo-2.0-M3-
Interceptors-tf3425894s134.html#a9548679
Sent from the Apache Geronimo - Users mailing list archive at
Nabble.com.