Forgot to mention, this is on FC3 x86_64 and I'm using the Connector/J connector from MySQL.

This is from the catalina.out log,
SEVERE: ReplicatedSession: Cannot serialize session attribute connect for session EE7F84D18E7225BEDFFF1CC80FFAEBC6
java.io.NotSerializableException: org.gjt.mm.mysql.Connection


This is from my server.xml
<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.SimpleTcpReplicationManager"
expireSessionsOnShutdown="false"
useDirtyFlag="false">


I've tried, the DeltaManager and tried setting useDirty to true as well.


Paul wrote:

I'm setting up Tomcat 5.0.28 in a vertical two node cluster and want to use the in-memory session replication. The application I'm trying to run on the cluster requires the db connection to be stored in a session object. But I'm getting an error message that says it's not serializable. I'm wondering if that is just how it is, or maybe I'm just doing something wrong. Here is a snip of the code in question.

class ConnHolder implements Serializable, HttpSessionBindingListener {
private transient Connection con = null; // i've tried with and without transient
public ConnHolder(Connection con) {
this.con = con;
try {
con.setAutoCommit(false);
} catch(SQLException e) { }
}
public Connection getConn() { return con; // return the connection
}
...
}


Thanks in advance,

-Paul


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to