Skip to content
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

113 lines (81 sloc) 3.06 KB

Global EJB Client Side Interceptors Configuration


The goal of this issue is to implement client side EJB interceptors that can be configured system-wide through ejb3 subsystem configuration.

Dev Contacts


QE Contacts

Testing By

[ ] Engineering

[x] QE

Affected Projects or Components



  • Interceptors are implemented and packed inside the custom modules

  • Interceptors should be configured in the subsystem configuration and not in deployments

  • Interceptors conform to jboss-ejb-client interceptor API

Solution draft

Subystem XML

EJB3 subsystem is extended with <client-interceptors> tag containing a number of <interceptor> children tags. <interceptor> tags contains attributes for the module and the class of the interceptor. Sample XML fragment:

	<interceptor module="org.abccorp:tracing-interceptors:1.0" class="org.abccorp.TracingInterceptor"/>
	<interceptor module="org.abccorp:timers-interceptors:1.1" class="org.abccorp.TimerInterceptors"/>

Management model

The management model is as follows: client interceptors are represented as object list attribute of ejb3 subystem. Each object in the list contains two fields:

  • module: the name of the module in which the interceptor is implemented

  • class: the interceptor class

DMR model:

[standalone@localhost:9990 subsystem=ejb3] :read-attribute(name=client-interceptors)
    "outcome" => "success",
    "result" => [
            "module" => "test",
            "class" => "org.testsuite.ejb.clientinterceptor.TestClientInterceptor"
            "module" => "my-interceptors",
            "class" => "org.mycompany.interceptors.CoolInterceptor"

Any change to client-interceptors attribute should move server to the reload-required state.

Interceptor class

  • Interceptors implement org.jboss.ejb.client.EJBClientInterceptor interface

Sample client-interceptor class:


import org.jboss.ejb.client.EJBClientInterceptor;
import org.jboss.ejb.client.EJBClientInvocationContext;

public class ClientInterceptor implements EJBClientInterceptor {

    public void handleInvocation(EJBClientInvocationContext context) throws Exception {

    public Object handleInvocationResult(EJBClientInvocationContext context) throws Exception {
        return context.getResult();

Interceptor module

Client interceptor classes should be located in a module and place in $JBOSS_HOME/modules directory.

Draft implementation

The draft implementation of client-interceptors is already done and works:

Test Plan

Community Documentation

Part of the PR.

You can’t perform that action at this time.