Monitoring JBoss's EJB Container
In this short article we will show how easily you can write an Interceptor class which is added in the chain of Stateless interceptors. The purpose of this Interceptor is adding debugging information to your Stateless Bean Pool.
JBoss 5 EJB container is based on the concept of interceptors. These are simple classed based on the Proxy pattern, which allow to execute all the required steps before method invocation (security checks, instance creation, transaction propagation etc.).
The great benefit of interceptors is that they are a seamless way to add Aspect Oriented Programming to your business methods.
EJB 3 Interceptors are defined in the file server/<your server>/deploy/ejb3-interceptors.xml.
JBoss 5 EJB container is based on the concept of interceptors. These are simple classed based on the Proxy pattern, which allow to execute all the required steps before method invocation (security checks, instance creation, transaction propagation etc.).
The great benefit of interceptors is that they are a seamless way to add Aspect Oriented Programming to your business methods.
EJB 3 Interceptors are defined in the file server/<your server>/deploy/ejb3-interceptors.xml.
Here's the section we want to operate on:
#2 Update jboss-ejb3-core.jar
Compile the interceptor and add the class to the jboss-ejb3-core.jar

That's all! restart the server and verify that your SLSB now debugs information about the current/max size of instances.

