Re: persistence with sessions distributable attribute

2005-08-22 Thread Nishant Deshpande
Christoph - you exactly summarize my situation - i.e. there are objects with hashmaps and so i really don't know what can be serialized at the time of serialization. As regards to 'people', others also work on this webapp, and more others will work on it in the future... so i want to try to

Re: persistence with sessions distributable attribute

2005-08-20 Thread Christoph Kutzinski
Nishant Deshpande wrote: The SessionListener can check if the attribute implements Serializable, not if it actually is serializable. i.e. Nothing to stop people from storing objects which implement serializable but will barf when actually are serialized. That is not exactly true. Look at my

Re: persistence with sessions distributable attribute

2005-08-19 Thread Nishant Deshpande
The SessionListener can check if the attribute implements Serializable, not if it actually is serializable. i.e. Nothing to stop people from storing objects which implement serializable but will barf when actually are serialized. So - I want to catch each time there is a serialization exception

Re: persistence with sessions distributable attribute

2005-08-18 Thread Nishant Deshpande
Thanks for the input. Any idea how I can *catch* errors during serialization? I am guessing I will have to create my own PersistanceManager and override some functions.. Has anyone done this (or any other method of doing this)? On 8/17/05, Christoph Kutzinski [EMAIL PROTECTED] wrote: I didn't

Re: persistence with sessions distributable attribute

2005-08-18 Thread Christoph Kutzinski
Question: why do you want to catch errors during serialization. If you want to check that your attributes are serializable, you can use a SessionListener as I have shown. I can not think of any other reason why one would want to catch serialization exceptions. Nishant Deshpande wrote:

Re: persistence with sessions distributable attribute

2005-08-17 Thread Christoph Kutzinski
Hi Nishant, where did you read that distributable will *enforce* serializability? AFAIK distributable only means that your sessions can be distributed to different tomcat nodes (i.e. a cluster). It doesn't enforce anything, you have to make sure that your session attributes are serializable by

Re: persistence with sessions distributable attribute

2005-08-17 Thread Lintang JP
I'm referring to this document on : http://www.onjava.com/pub/a/onjava/2004/04/14/clustering.html?page=2 The words Serializable here would mean for session replication, right ? CMIIW. On 8/17/05, Christoph Kutzinski [EMAIL PROTECTED] wrote: Hi Nishant, where did you read that

Re: persistence with sessions distributable attribute

2005-08-17 Thread Christoph Kutzinski
I didn't say that distributables don't have to implement java.io.Serializable. In fact they have to. I just had the impression (from your first post) that you thought by putting an non-serializable Attribute into a HashMap, the attribute would become serializable, too. Example: If you want to

Re: persistence with sessions distributable attribute

2005-08-16 Thread Nishant Deshpande
Apologies - I omitted the tomcat version: 5.0.28 On 8/16/05, Nishant Deshpande [EMAIL PROTECTED] wrote: Hoping for some help from the tomcat experts on this list. I want to ensure all objects stored in sessions are serializable. I read that I can put the distributable/ tag in my web.xml

Re: persistence with sessions distributable attribute

2005-08-16 Thread Lintang JP
hi Nishant, You might want to put all your session variable inside HashMap or other datatypes that implements Serializable, rather than put it just in a single variable. Refer to the javadocs, what are those Serializable data types are. Or maybe you can build your own class with something like