Version 11

    This page presents the test made to check how JBoss Cache 2.x runs within an application (EAR or WAR) in JBoss App Server 4.x.

     

    NOTE that while this has not been tested with JBoss Cache 3.x, it should work in principle.

     

    Background

     

    • JBoss AS 4.x ships with JBoss Cache 1.4.x and relies on 1.4.x APIs for clustering HTTP and EJB3 sessions.

    • Users may still want to use the new JBoss Cache 2.x APIs on JBoss AS 1.4.x.

    • This pattern does NOT refer to upgrading the jars within the JBoss AS 4.x distribution, but including the newer binaries within applications deployed on the server.

     

    How it works

     

    The class loader isolation for each app ensures that user code can use JBC 2.x while the app server still uses 1.4.x for its own clustering.

     

    Testing if this works for you

     

    This page includes a test which you can deploy in a JBoss AS 4.x server running in clustered (or even non-clustered) mode.

     

    What does this test do?

    • in a JSP, create a (2.x) cache instance configured with replSync-service.xml

    • store the cache instance in the servlet's application context, (so that it does not get replicated if the application is marked as distributable).

    • add an int to the cache, which is incremented on each new access to the page

    • verify the following: the increments are propagated through the cluster correctly and there were no class loading conflicts.

     

    Results

     

    When we ran these tests, they all passed. Following configurations were tested.

     

    1. The web application deployed on a single server, started in clustered mode(jboss -c all). The server was the only member in the cluster.

    2. The web application (non distributable) deployed the two nodes of the clustered server

    3. The web applications deployed twice (different app context) on the single node of the server (started in clustered mode)

    4. The web application, this time distributable, deployed on the two nodes of a clustered server.

     

     

    If you are doing any additional tests or find any issues please update this wiki. For convenience, the web application used in the tests is attached at the bottom of this page.

     

    Conclusion:

     

    You can safely and easily use JBoss Cache 2.x in your application running in JBoss AS 4.x.

     

    Note:Red Hat does not offer formal support for this combination of products.  This combination is only supported by the JBoss Cache and

    JBoss AS communities