users@shoal.java.net

Re: storing custom serialized class in DistributedStateCache using SHOAL ?

From: Shreedhar Ganapathy <Shreedhar.Ganapathy_at_Sun.COM>
Date: Thu, 17 Apr 2008 11:06:25 -0700

cc'd shoal users mailing list .

Could you tell us the API you are using to store this object in the DSC
? Can you also post any log messages you are seeing with ShoalLogger ?

Thanks
Shreedhar

glassfish_at_javadesktop.org wrote:
> hi guys!
>
> i'm trying to implemet jca which holds tcp connection in clustered environment.. to do this i'm using shoal framework to share state of active resource adapter.
> fortunately everything looks fine except one detail - in Shoal i'm using DistributedStateCache to store the state of active RA. i get an exception when trying to get from cache serialized class (my own!) which was put there by another instance.. everything works fine when i use String to store state, but with my custom, even very simple class:
>
> public class CachedData implements Serializable {
> String value;
> private static final long serialVersionUID = 7526471155622776147L;
>
> public void setValue(String value) {
> this.value = value;
> }
>
> public String getValue() {
> return value;
> }
> public CachedData() {
> this("empty");
> }
> public CachedData(String val) {
> this.setValue(val);
> }
> }
>
> instances cannot access data added by other instances...
> only
> java.lang.ClassNotFoundException: procon.adapter.cluster.CachedData
>
> is printed..
> i know that during joinig the group the synchronization in DSC is performed, but how to ensure that class will be found??
>
> thanks in advance for your replies!
> [Message sent by forum member 'bidibidi' (bidibidi)]
>
> http://forums.java.net/jive/thread.jspa?messageID=269718
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>