tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul <>
Subject Is Connector/J Serializable?
Date Thu, 03 Feb 2005 18:24:48 GMT
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 {
     } catch(SQLException e) { }
  public Connection getConn() { 
     return con;    // return the connection

Thanks in advance,


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message