Does EAP6 allow server-side non EE specific interceptors for EJBs ?
Issue
- For Standalone EJB Client while using the following mechanism one can register the Client side interceptor (on the standalone client side). But the same "registerInterceptor" method is not working when the Interceptor is used inside a code which is running inside a JBoss EAP6 instance.
EJBClientContext.getCurrent().registerInterceptor(1, new TestClientInterceptor());
- The
"TestClientInterceptor.java"
extends"org.jboss.ejb.client.EJBClientInterceptor"
as following.
package client.interceptor;
import java.util.Map;
import org.jboss.ejb.client.EJBClientInterceptor;
import org.jboss.ejb.client.EJBClientInvocationContext;
public class TestClientInterceptor implements EJBClientInterceptor {
public void handleInvocation(EJBClientInvocationContext clientInvocationContext) throws Exception {
System.out.println("\n\t****** client-side interceptor");
Map<String, Object> contextData = clientInvocationContext.getContextData();
contextData.put("TestData", "AAAAAAAAA");
clientInvocationContext.sendRequest();
}
public Object handleInvocationResult(EJBClientInvocationContext context) throws Exception {
return context.getResult();
}
}
- Can the Non-EE specific (JBoss Specific) interceptors work inside the JBoss EAP6 based EJBs?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.0.x
- 6.1.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.