users@glassfish.java.net

storing custom serialized class in DistributedStateCache using SHOAL ?

From: <glassfish_at_javadesktop.org>
Date: Thu, 17 Apr 2008 01:54:10 PDT

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