[jboss-user] [JBossCache] - Regional classloaders and state transfer

FredrikJ do-not-reply at jboss.com
Sat Apr 28 13:57:31 EDT 2007


We are currently using the 2.0 beta 2 release, and have some problem with the state transfer. 

We are using regional based classloaders with an example cache like:

/a/ -> ClassLoader A
/b/ -> ClassLoader B

The startup sequence of the cache looks like:

1. Create cache
2. Register classloaders
3. Start the cache

Now, we startup Cache #1 and everything is working well. We add some ClassLoader A specific objects under /a/... and can read and write them correctly. Placing ClassLoader B specific objects under /b/... also works fine.

Then we start Cache #2 using the same start sequence as above, but then we run into problems. Cache #1 has objects in it's cache so a state transfer is initialized. The regions have been initialized in Cache #2 with proper classloaders so that should be fine. However, the state transfer from Cache #1 is triggered on the root '/'. 

When Cache #2 gets the initial state transfer it goes a little like this:

1. Do I have regional based classloaders? yes.
2. Do I have a classloader defined for region '/'? no.
3. Use default classloader.
4. ClassNotFoundException

The class not found is of course due to the fact that objects under /a/... will require ClassLoader A. The steps are of course my interpretation from stepping the code in a debugger, I might be wrong. 

Any feedback regarding this would be much appreciated, I am not really sure yet on how to solve the problem if the state transfer is for the whole cache with the root node as reference. 

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

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



More information about the jboss-user mailing list