I have discovered this problem recently. If you have a "scoped" application (jar, ear, 
or war), that implies different context class loaders. In this case, you will need to 
use the jboss utility class wrapper org.jboss.invocation.MarshalledValue to wrap your 
serializable object first before putting it into the cache.

Here is a snippet:

MyPOJO pojo = new MyPOJO();
MarshalledValue mv = new MarshalledValue(pojo);
cache.put("/ben", mv);

Then to retrieve:
MasahlledValue mv = (MarshalledValue)cache.get("/ben");
MyPOJO pojo = (MyPOJO)mv.get();

Let me know if this doesn't work for you.

-Ben


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

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


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to