1 Reply Latest reply on Mar 17, 2009 7:10 AM by Manik Surtani

    Using Jboss Cache Core 3 or 2  in Jboss 4.3

    Yousuf Haider Newbie

      We are trying to use Jboss Cache 3 in Jboss 4.3.

      We have packaged the jboss cache, jgroups and jboss-common-core jar in our application ear and we have scoped the classloading of the ear turned javaParent2Delegation off.

      As a result classes that are available in those jars are used by our application.

      However the problem arises because of conflicts between jboss-common-core 2.2.1 GA (which is required by jboss cache 3.0.3) and the jboss-common jar in the app server.

      The jboss-common-core 2.2.1 jar contains a lot of newer Jboss core classes which causes issues when our application wants to access our deployed xa data sources from the jndi.

      If I remove the org.jboss.util.naming packages from the jboss-common-core 2.2.1 jar our applications seems to be working fine. But I see there are a lot of classes in that jar that might cause issues in the future. (eg. org.jboss.util.loading, org.jboss.util.collection packages etc.)

      I cannot avoid using the jboss-common-core 2.2.1 jar since the following classes are not present in jboss 4.3:


      So basically using the jboss cache 2 or 3 inside Jboss 4.3 is not going to work.

      The only hacky solution seems to be to remove everything from jboss-common-core 2.2.1 jar except for the 3 classes above and see if that works.

      Again this might not work since these classes might depend on newer version of other core classes which I would have to add back.

      The documentation about using jboss cache 2 in jboss 4 uses a very simplistic sample webapp which has a servlet which puts an int in the cache on every access of the servlet.

      Since it does not use any other jboss services (like looking up a data source etc.) I am not really sure that you can really use jboss cache 2 or 3 in jboss 4.3 based on my experience.

      Any other suggestions are welcome ? Also if I hack the jboss-common-core jar to only contain the classes needed by jboss cache would that be ok ?

      I am not comfortable with the hacky solution but wanted more input from people who know the jboss cache better than I do.