Forums Register Login

Query rgd Base class interceptor

+Pie Number of slices to send: Send
Quoting from EJB spec:

If a bean class has superclasses, any AroundInvoke methods defined on those superclasses are invoked, most general superclass first.


To practically test this, I created a plain java class



And then made my session bean extend this class


But on caling any method in BSessionBean, there is no interceptor being invoked. Could somebody point me if I am missing somethig here? :roll:
+Pie Number of slices to send: Send
Hi Satya,

In order to test this point of the specification, you need to create an EJB:

@Stateless
public class BSessionBean extends Base implements BSessionRemote {
public void hello() {
System.out.println("Hello World!");
}
}

With his superclass wich have an @AroundInvoke method:

public class Base {
@AroundInvoke
public void message1(InvocationContext ctx){
System.out.println("Super");
}
}

In this case, the output is:
Super

It works !

Beno�t
Curse your sudden but inevitable betrayal! And this tiny ad too!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 537 times.
Similar Threads
Multiple @AroundInvokes
MDB and its strange inheritance
Business method interceptor methods (AroundInvoke methods) invocation order
Query rgd interceptor invocation order
EJBCore_Spec errata?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 20:27:26.