Slimming and Tuning JBoss 4.0.5 at Customer

The following document presents the services that were slimmed and the tuning improvements that were made to JBoss 4.0.5 at Customer site. These are the sections:

  1. Services that were slimmed from JBoss

  2. Tuning improvements in JBoss

  3. Services that (theoretically) can be removed but are being used by the application

  4. Services that can be removed and were removed before I got to customer site.

Performance improvements

the following results were achieved on the getafix linux machine:

for constant throughput (TP), the average response time (AVG) was reduced in 15% (from 134 to 116).

for maximal TP, the AVG was reduced in 33% (from 167 to 125), and the TP increased in 32% (from 41.6 to 55.2).

In the slimmed version, as time goes by (after 20000 samples), the TP starts to increase and the AVG starts to decrease. On the other hand, the un-slimmed version shows no change in either TP and AVG, not even after 50000 samples.

So – in order to see the improvements made by the slimmed version, the tests should include at least 50000 samples.

Notes before starting

  • At the application, there are 3 server platforms: Windows, Solaris and Linux. This document is relevant to all of them. According to JBoss documentation, there’s no difference between these platforms regarding the slimming & tuning issues.

  • In each section, along with the service name, there’s an explanation on how to remove it.

  • All paths mentioned in this document are assumed to start with server/xxx/.


Slimmed services

  1. Mail Service (J2EE standard JavaMail client)

  • deploy/mail-service.xml

  • lib/mail* (mail-plugin.jar, mail.jar)

  • lib/activation.jar (Java Activation Framework is used by JavaMail)

  • MailService attribute under the LocalJBossServerDomain MBean (in the conf/jboss-service.xml)


  1. Cache Invalidation Service

  • deploy/cache-invalidation-service.xml


  1. J2EE Client Deployer Service

  • deploy/client-deployer-service.xml


  1. JBoss SNMP Agent

  • lib/snmp-support.jar


  1. Persistency of MBean Attributes

  • AttributePersistenceService MBean (in the conf/jboss-service.xml)



  • CorbaORB attribute under the LocalJBossServerDomain MBean (in the conf/jboss-service.xml)


  1. Web-Console or JSR-77 Extensions

  • deploy/management directory


  1. Console/Email Monitor Alerts

  • deploy/monitoring-service.xml

  • lib/jboss-monitoring.jar


  1. EJB 2.1 Timer Service

  • The EJB 2.1 TimerService is used to crate EJB Timer Beans. This will asynchronously launch beans at defined times.

  • MBeans under the 'J2EE Timer Service' block in the deploy/ejb-deployer.xml

Note: on linux machine (getafix) this service couldn't be removed (because it's used there), but could ne removed on windows and solaris (terminator machine)


  1. JBoss Scheduler Manager

  • Allows scheduling invocations against MBeans.

  • deploy/schedule-manager-service.xml

  • deploy/scheduler-service.xml

  • lib/scheduler-plugin* (scheduler-plugin.jar, scheduler-plugin-example.jar)


  1. Hot Deployment

  • Hot deployment of files into the deploy directory without restarting JBoss.

  • in the URLDeploymentScanner mbean (under conf/jboss-service.xml), change the ScanEnabled attribute from 'true' to 'false'


  1. BeanShell Deployer

  • deploy/bsh-deployer.xml

  • lib/bsh* (bsh-deployer.jar, bsh-1.3.0.jar)


  1. JBoss UUID Key Generation

  • Often used with CMP primary keys.

  • deploy/uuid-key-generator.sar (wasn’t found in the installation)

  • lib/autonumber-plugin.jar


  1. Deploy JMS Queues

  • if it's removed on windows, then in the login process an exception is thrown. On the other hand, If it's removed on linux (getafix), then the login process doesn't throw exceptions.

  • DestinationManager attribute under the LocalJBossServerDomain MBean (in the conf/jboss-service.xml)

    Note: on windows machine (yorammi), when this service was removed, an exception was thrown during the login process. On linux machine (getafix), removing this service went OK, without exceptions.


  1. RMI class-loading

  • loading codebases from the client using classes on the server)

  • remove the SystemPropertyClassValue and WebService Mbeans from conf/jboss-service.xml.

  • Remove the following line:

      <depends optional-attribute-name="WebServiceName">jboss:service=WebService</depends> 


  1. JNDI-view

  • shows the JNDI naming tree from the JMX console

  • remove the JNDIView Mbean from conf/jboss-service.xml.


  1. Apache-Tomcat connector

  • It should be removed if users directly connect to Tomcat via HTTP and do not pass through Apache/mod_jk.

  • Some of the clients use Apache and some aren't, so this connector should be removed only at clients that don't have Apache.

  • open the deploy/jbossweb-tomcat55.sar/server.xml and remove the AJP 1.3 Connector on port 8009

Tuning Improvements

  1. Use Pooled Invoker instead of JRMP

  • By default, JBoss creates a new thread for every RMI request that comes in.

  • Switch to pooled invoker instead of jrmp:

In conf/standardjboss.xml, replace all



<invoker-mbean>jboss:service=invoker,type=pooled</invoker- mbean>


  1. Turn off the Connection Close Checking

  • In production you don't need this check (assuming all connection leaks were found during development).

  • In deploy/jbossjca-service.xml, change the Debug entry to false in the CachedConnectionManager service


  1. Optional tunings that can be done

      1) Pre-compile JSPs – JSP pages in the UI can be pre-compiled.

      2) Apache-Tomcat connector: when Apache is installed before Tomcat, it can be used to serve static content. According to Tomcat Wiki: Historically, Apache has always been much faster than Tomcat at serving static content. The idea is to let Apache serve the static content when possible, then proxy the request back to Tomcat for Tomcat related content.

Services being used (so they can't be removed)

  1. JMX-Console

  • deploy/jmx-console.war


  1. Integrated HAR deployer and Hibernate session management services

  • deploy/hibernate-deployer-service.xml (HAR support)

  • lib/jboss-hibernate.jar (HAR support)

  • lib/hibernate3.jar (Hibernate itself)

  • lib/cglib.jar (used by Hibernate to create proxies of POJOs)


  1. JBossSX

  • JBossSX is the JBoss security framework which is used by the DB login module.

  • SecurityConfig MBean from conf/jboss-service.xml


  1. HTTPInvoker

  • Tunnels RMI over HTTP

  • deploy/http-invoker.sar directory


  1. Vendor-Specific SQL Exception Handing

  • deploy/sqlexception-service.xml


  1. Loading properties using JMX

  • JMX can load properties into the system properties via the Properties Service.

  • deploy/properties-service.xml

  • lib/properties-plugin.jar


  1. Client-Side Transaction Management

  • If it's removed, then the SpringFactoryGC class can't be loaded:

    java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext-j2ee.xml]: Initialization of bean failed; nested exception is org.springframework.transaction.TransactionSystemException: JTA UserTransaction is not available at JNDI location [UserTransaction]; nested exception is javax.naming.NameNotFoundException: UserTransaction not bound

  • ClientUserTransactionService MBean from conf/jboss-service.xml

  • conf/xmdesc/ClientUserTransaction-xmbean.xml


  1. Make JMX calls over RMI

  • The script uses this, so it can’t be removed

  • deploy/jmx-invoker-adaptor-server.sar

  • deploy/jmx-adaptor-plugin.jar







Services that can be removed but don't exist in the application’ JBoss 4.0.5 deployment

  1. Distributed (clustered) web sessions

  2. Farm service (replicated deployments)

  3. EJB3

  4. XA data-sources (Distributed and/or recoverable transactions)

  5. web-console

  6. If you are using neither client-side transaction management nor cached connections

  7. J2EE client deployer service

  8. Clustering Service




Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at