Version 10

    JBossCache on WAS 6.x (WebSphere Application Server)

     

     

    Overview

     

    This is a first and quick shot on how to get JBossCache Jalapeno run  as second level cache for hibernate under Websphere 6.x.

     

    Since the hibernate Cache class that wraps the treeCache may need to interact with the Transaction Manager, one needs to switch from the WebsphereExtendedJTATransactionManager to the WebsphereTransactionManager in order to be able to suspend/resume transactions.

     

    -


    Getting it work

     

    On any Websphere cluster node, one needs to perform the following steps

    • Get the following required jboss libs copied to a folder (let's call it extra-libs) :

     

      • javassist.jar

      • jboss-common.jar

      • jboss-minimal.jar

      • jboss-system.jar

      • log4j.jar

      • concurrent.jar

      • jboss-cache.jar

      • jboss-jmx.jar

      • jboss-serialization.jar

      • jgroups.jar

      • trove.jar

     

    • Create a jar containing the treecache.xml file and copy it to the extra-libs folder. This will allow every node to have its own jgroups configuration through its own treecache.xml file.

    • Start your application server / nodeManager instance and get connected to the management console

    • Create a shared library -treeCachelib for example- using the console interface, listing the jar in the 'extra-libs' folder, and using a websphere variable for the 'extra-libs' folder path (usefull if nodes do not have the same  'extra-libs' path).

    • Using the console again, once you're application is deployed, add the treeCachelib dependency.

    • Restart your server instance.

    Author: 7uc0, thanks to Clemouch -