Tuning jboss

There is a specially preconfigured jboss 4.2.2GA distribution for equanda available for download at http://progs.be/equandajboss-4.2.2.zip.
This equanda version is tuned for both speed and size and has some customizations which are needed for equanda.

The differences between the equanda version and the jboss distrubution are

  • there is only one server version "equanda" which is based on the jboss "default" configuration.
  • the "docs" directory has been removed as this is not needed for running jboss.
  • run.bat has been modified to have the following default options "-Xms256m -Xmx382m -XX:MaxPermSize=128m -Dsun.net.inetaddr.ttl=15 -Dfile.encoding=UTF-8". This reservers more memory and a bigger permspace, allows services with dynamic ip addresses to be used and forces the file encoding to be UTF-8 instead of the system default.
  • run.conf has also been modified to have better settings for deployment if the environment variable JAVA_OPTS has not been defined.
       JAVA_OPTS="-server -Xms382m -Xmx1024m -XX:MaxPermSize=200m"
    JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:CMSIncrementalDutyCycle=10"
    JAVA_OPTS="$JAVA_OPTS -Dsun.net.inetaddr.ttl=15 -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djaas.security.domain=equanda"
    JAVA_OPTS="$JAVA_OPTS -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:ThreadStackSize=128"
  • run.sh is modified to bind to all ip addresses.
  • exceptionsorter.java has been added. This catches exceptions for the firebird database, assuring that transaction retries are attempted when needed.
  • jaybird-2.1.1.jar has been added in server/equanda/lib to assure that firebird database support does not require extra downloads.
  • the following files have been removed from server/equanda/deploy, if they are needed for your application, you should add them again (from the full jboss distribution).
    • jms support has been removed as this is by default not used in equanda applications.
    • management (web-console) has been removed as this requires JSP. This distribution is tuned to have JSP removed.
    • mail-ra.rar
    • http-invoker.sar
    • jboss-web.deployer/ROOT.war
    • bsh-deployer.xml
    • cache-invalidation-service.xml
    • jsr88-service.xml
  • changes in the deploy directory
    • jmx-console is secured (in jmx-console.war/WEB-INF/ both web.xml and jboss-web.xml)
    • equanda-test-ds.xml is added as example (firebird) datasource
    • ejb3-entity-cache-service.xml added (local cache only, not clustered)
    • ejb3-interceptors-aop.xml modified to copy (equanda) state from client to server
    • jboss-web.deployer/META-INF/jboss-service.xml has "UseJBossWebLoader" configured to "true".
  • configuration changes
    • conf/jboss-log4j.conf has been modified for improved useability (to my taste at least), but you probably want to change this some more.
    • conf/jboss-service.xml has the JSR-77 support removed, RMIObjectPort modified (from 4444 to 14444) to allow co-habitation with Selenium.
    • conf/login-config.xml default does not uses configuration in "prop" subdirectory and example equanda specific login manager.

Other improvements which could be made

  • For deployment, the "client" directory can also be removed.
  • 1. Tuning jboss