Version 5

    Running JBoss Cache 2.x under Java 1.4.x

     

    This page details how to run JBoss Cache Habanero series (2.0.0 series) under Java 1.4.  Habanero is baselined on Java 5 and makes heavy use of Java 5 features, both language and API.  However, using JBossRetro, we are able to provide retroweaved binaries that does run under Java 1.4.

     

    It is important to note that, at least as of this writing, there is no commercial support for retroweaved binaries offered by Red Hat Inc. 

     

    What you will need

     

    Habanero source tree

     

    The source tree of JBoss Cache Habanero from CVS - see JBossCacheDevelopment for details of how to get this.

     

    A compatible version of JGroups.

     

    While Habanero ships with JGroups 2.5, JGroups 2.5 is also baselined on Java 5.  This means that the retroweaved binary of JBoss Cache will need to link against a version of JGroups that is both compatible with JBoss Cache as well as Java 1.4.  Here, you have 2 options:

     

    • An older version of JGroups.

     

    Habanero does not make any specific use of JGroups 2.5 APIs.  This means that Habanero should run just as happily with JGroups >= 2.3.  However, it is important to note that some protocols in the JGroups stack may not be present in older JGroups versions.  Visit http://www.jgroups.org for more details.

     

    • Retroweave JGroups as well.

     

    This is a fairly simple process.  You will need to download the JGroups 2.5 source distribution, and retroweave the resulting binaries yourself.  Please refer to the examples and (brief) documentation on the JBossRetro page.

     

    Whichever route you choose, make sure you replace the jgroups.jar file in the lib directory of the JBoss Cache source tree with the version of JGroups you wish to use.

     

    Retroweaving JBoss Cache

     

    This is a fairly straightforward process as well, especially since the build file that is in the JBoss Cache source tree contains an ANT target to do this for you.  Note that this target must be run with Java 5!

     

    
    ./build.sh clean jar-retro
    
    

     

    This will create a jar file called jbosscache-JDK140.jar in the dist/lib directory.

     

    Test your build

     

    Ensuring that your JAVA_HOME now points to a Java 1.4.x JVM, run:

     

    
    ./build.sh all-unittests-retro-cc reports
    

     

    HTML-ised reports will be in output/reports/html/

     

    Using the retroweaved binary

     

    Just like the standard distribution of JBoss Cache, the retroweaved version has runtime dependencies on the jars in the lib directory.  In addition though, it also has runtime dependencies on the jars in lib/retro so make sure these are made available to your application.

     

    What about PojoCache?

     

    Note that PojoCache does not get retroweaved.  There is no plan at this stage to provide a retroweaved binary for PojoCache.