com.caucho.quercus.env
Class ConnectionEntry

java.lang.Object
  extended by com.caucho.quercus.env.ConnectionEntry
All Implemented Interfaces:
EnvCleanup

public class ConnectionEntry
extends java.lang.Object
implements EnvCleanup


Constructor Summary
ConnectionEntry(Env env)
           
 
Method Summary
 void cleanup()
           
 void connect(boolean isReuse)
           
 boolean equals(java.lang.Object o)
           
 java.sql.Connection getConnection()
           
 int hashCode()
           
 void init(javax.sql.DataSource ds, java.lang.String user, java.lang.String password)
           
 boolean isReusable()
           
 void markForPoolRemoval()
          Notify that the connection should not be reused, e.g.
 void phpClose()
          Called from php code to close the connection.
 void setCatalog(java.lang.String catalog)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionEntry

public ConnectionEntry(Env env)
Method Detail

init

public void init(javax.sql.DataSource ds,
                 java.lang.String user,
                 java.lang.String password)

connect

public void connect(boolean isReuse)
             throws java.sql.SQLException
Throws:
java.sql.SQLException

isReusable

public boolean isReusable()

getConnection

public java.sql.Connection getConnection()

setCatalog

public void setCatalog(java.lang.String catalog)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

markForPoolRemoval

public void markForPoolRemoval()
Notify that the connection should not be reused, e.g. with stateful mysql commands like the temp tables


phpClose

public void phpClose()
Called from php code to close the connection. Reusable entries are not actually closed until the cleanup phase.


cleanup

public void cleanup()
             throws java.sql.SQLException
Specified by:
cleanup in interface EnvCleanup
Throws:
java.sql.SQLException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object