[jboss-user] [JBoss Cache: Core Edition] - Using Jboss Cache Core 3 or 2 in Jboss 4.3

yousuf.raza do-not-reply at jboss.com
Fri Mar 6 02:12:32 EST 2009


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:

org.jboss.util.stream.MarshalledValueInputStream
org.jboss.util.stream.MarshalledValueOutputStream
org.jboss.util.id.GUID

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.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215592#4215592

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215592



More information about the jboss-user mailing list