Configure Servlets with CachedConnectionManager
3.1 CachedConnectionManager The CachedConnectionManager was introduced back in JBoss AS 3.2 and serves two purposes – debugging possible connection leaks and provide support for lazy enlistment of database connections in a transaction. That leads us to the configuration. By default, the CachedConnectionManager is configured to be in the servlet container and it is set to be in debug mode in the default and all configurations. The default and all server configurations are better suited for development environments, and not a production environment. With JBoss EAP, there is a production configuration which still contains the CachedConnectionManager but turns the debug mode off. This reduces the overhead some but the CachedConnectionManager is still configured in its various containers of which the servlet container is one. There are two options here. You can use the production configuration as is or we go the extra step of removing it getting rid of the overhead completely. If you use bean managed transactions then do not remove this setting. To remove the setting, first edit the configuration in the server.xml file in the following directory: jboss-eap-5.1/jboss-as/server/ /deploy/jbossweb.sar where is either production, all, or default, or your own custom configuration. Comment out the following near the end of the server.xml: /deploy/jbossweb.sar transactionManagerObjectName="jboss:service=TransactionManager" /> The second change you will need to make is to the jboss-beans.xml file located at jboss-eap-5.1/jboss-as/server//deploy/jbossweb.sar/META-INF At the top of the file you will see the CachedConnectionValve defined. Remove this dependency by commenting it out. You should end up with the following: Illustration 2: CachedConnectionManager in jboss-beans.xml located at jboss-eap-5.1/jboss-as/server//deploy/jbossweb.sar/META-INF Now when you restart your JBoss EAP instance, you will no longer have the overhead associated with the CachedConnectionManager.