users@glassfish.java.net

Re: JCA adapter and load balancing

From: <glassfish_at_javadesktop.org>
Date: Thu, 17 Apr 2008 01:47:16 PDT

hi guys!

long time since last post was written here, but unfortunately i ran into the same problem..
jca which holds tcp connection in clustered environment.. 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);
    }
}

the class cannot get from cache states added by another instacnes and only
java.lang.ClassNotFoundException: procon.adapter.cluster.CachedData

is printed..
i know that during joing the group this synchronization is performed, but how to ensure that class will be found??

thanks in avance for your replies!
[Message sent by forum member 'bidibidi' (bidibidi)]

http://forums.java.net/jive/thread.jspa?messageID=269717