users@glassfish.java.net

Re: [Shoal-Users] Re: storing custom serialized class in DistributedStateCache using SHOAL ?

From: Shreedhar Ganapathy <Shreedhar.Ganapathy_at_Sun.COM>
Date: Sat, 19 Apr 2008 00:12:15 -0700

Can you check whether this class is included in the classpath of each of
the member processes ? In order for your classloader in one instance to
deserialize the serialized object that another instance saved into the
cache you need to have the class in your classpath.

I wrote a small test to include your CachedData class as the object to
be stored and it works well with instances on two different machines.


Shreedhar Ganapathy wrote:
> 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
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_shoal.dev.java.net
> For additional commands, e-mail: users-help_at_shoal.dev.java.net
>