Both client-side and server-side request logging is supported and includes various invocation times aimed at helping to identify where time is going in a request.


On the client requests/responses are logged on java.util.logging FINEST level in category OpenEJB.client. The code is similar to the following:

final long time = System.nanoTime() - start;
final String message = String.format("Invocation %sns - %s - Request(%s) - Response(%s)", time, conn.getURI(), req, res);
logger.log(Level.FINEST, message);

Note that the check to see if FINEST is enabled is cached for performance reasons, so it must be set at VM startup.


On the server requests/responses are logged in java.util.logging FINE in category"OpenEJB.server.remote.ejb. The code for that is similar to this:

logger.fine("EJB REQUEST: " + req + " -- RESPONSE: " + res);

Request times

Three times are tracked per request and logged in the above statements as part of the formatting of the EJB Response. They're best understood in reverse:

The container time and server time are written in the EJB response and visible to the client. The client will log all three times, the server will log the first two. All log statements are on a single line.

Bean-time and JMX Statistics

The above information applies purely to remote EJB calls made over a network. Calls on @Remote or @Local interfaces between two components in the same server are not logged.

However, all EJB invocations to business methods or callbacks like @PostConstruct are tracked for statistical analysis. By default a floating window of 2000 samples are kept. The time tracked is purely bean time which includes interceptors, decorators and the bean itself, but does not include other container services like transactions or security.

This information is available in JMX. A sample JMX ObjectName for a CounterBean will look like this:,J2EEApplication=null,EJBModule=StatsModule,StatelessSessionBean=CounterBean,j2eeType=Invocations,name=CounterBean

All beans have the following MBean attributes, listed here in shorthand:

Then for every method there will be these attributes and operations: