LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   tomcat5 + java.io.Serialization (https://www.linuxquestions.org/questions/linux-enterprise-47/tomcat5-java-io-serialization-371635/)

shadow11 10-10-2005 03:55 PM

tomcat5 + java.io.Serialization
 
Hi, everyone.

I have a problem find info about java.io.Serialization

I'm trying to setup clustering/session replication with Tomcat 5 + Apache2 +Susse 9.3 + mod_jk + java 1.4.2

According to the official document, I need to:
1. All your session attributes must implement java.io.Serializable
2. Uncomment the Cluster element in server.xml
3. Uncomment the Valve(ReplicationValve) element in server.xml
4. If your Tomcat instances are running on the same machine, make sure the tcpListenPort attribute is unique for each instance.
5. Make sure your web.xml has the <distributable/> element

I done with step 2-5, but not step 1. I cannot find any info about java.io.Serialization? What is it and how to implement it? (a link to the document would be good)

Can anyone successfully implement clustering with Tomcat 5 and Apache2 offer me some help please?

Thank you very much,

mhiggins 10-28-2005 07:26 PM

In many cases no work needs to be done for 1. Do you or your developers control the source code? If so You just must make sure that the objects placed in the users session HttpSession are all serializable. By serializable they mean the object can be written to an arbitrary output stream and not lose state. The objects must implement the java.io.Serializable interface. This is a code specific item not an administrative on.

See

http://java.sun.com/j2se/1.5.0/docs/...ializable.html

Note many standard objects impliment Serilaizable see:

http://java.sun.com/j2se/1.5.0/docs/...ng/String.html

Not this section in the above link
public final class String
extends Object
implements Serializable, Comparable<String>, CharSequence

-Matt


All times are GMT -5. The time now is 12:02 PM.