-
1. Re: Client-Side EJB Interceptor in AS7
michael_gronau Jul 10, 2012 2:28 AM (in response to wesjanik)Hi Wes,
It is pretty easy as far as you have a connection established to the server. After this you can try to get the current EJBClientContext with EJBClientContext().getCurrent(). On this context object you can register your own ClientInterceptor ( a class that implements EJBClientInterceptor). with EJBClientContext.registerInterceptor.
Thats all, very easy ;-)
Greets,
Michael
-
2. Re: Client-Side EJB Interceptor in AS7
wesjanik Jul 10, 2012 12:37 PM (in response to michael_gronau)That is easy, thank you!
What is the scope of the registration? In other words, if I want to register a single interceptor for all calls on every thread, do I need to keep re-registering? The JavaDocs seem to leave vague (I'm assuming on purpose) the scope of both the registration and the EJBClientContext.
-
3. Re: Client-Side EJB Interceptor in AS7
jaikiran Jul 10, 2012 10:37 PM (in response to wesjanik)Wesley Janik wrote:
That is easy, thank you!
What is the scope of the registration? In other words, if I want to register a single interceptor for all calls on every thread, do I need to keep re-registering? The JavaDocs seem to leave vague (I'm assuming on purpose) the scope of both the registration and the EJBClientContext.
The interceptors will be applicable for all invocations using that context (which typically spans the lifetime of the application). So registering those interceptors is a one time thing and you can just keep invoking on the EJBs without having to re-register the interceptors.
-
4. Re: Client-Side EJB Interceptor in AS7
jaikiran Jul 10, 2012 10:38 PM (in response to wesjanik)Wesley Janik wrote:
The JavaDocs seem to leave vague (I'm assuming on purpose) the scope of both the registration and the EJBClientContext.
It wasn't on purpose. No one provided review comments on those, so it just didn't get added. I'll include this scope part in the javadoc upstream.
-
5. Re: Client-Side EJB Interceptor in AS7
wesjanik Jul 11, 2012 9:44 AM (in response to jaikiran)Perfect - thanks much, guys!