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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org