クラス org.objectweb.cjdbc.controller.connection.SimpleConnectionManager

org.objectweb.cjdbc.controller.connection.SimpleConnectionManagerに対する継承グラフ

Inheritance graph
[凡例]
org.objectweb.cjdbc.controller.connection.SimpleConnectionManagerのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

説明

This connection manager creates a new Connection every time the getConnectionmethod is called.

作者:
Emmanuel Cecchet

Nicolas Modrzyk

バージョン:
1.0

SimpleConnectionManager.java42 行で定義されています。

Public メソッド

 SimpleConnectionManager (String backendUrl, String backendName, String login, String password, String driverPath, String driverClassName)
void initializeConnections () throws SQLException
void finalizeConnections () throws SQLException
Connection getConnection () throws UnreachableBackendException
void releaseConnection (Connection connection)
void deleteConnection (Connection c)
int getCurrentNumberOfConnections ()
String getXmlImpl ()

Protected メソッド

Object clone () throws CloneNotSupportedException

Private メソッド

synchronized void addConnection ()
synchronized void removeConnection ()

Private 変数

int nbOfConnections = 0


コンストラクタとデストラクタ

org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.SimpleConnectionManager String  backendUrl,
String  backendName,
String  login,
String  password,
String  driverPath,
String  driverClassName
 

Creates a new SimpleConnectionManager instance.

引数:
backendUrl URL of the DatabaseBackend owning this connection manager.
backendName name of the DatabaseBackend owning this connection manager.
login backend connection login to be used by this connection manager.
password backend connection password to be used by this connection manager.
driverPath path for driver
driverClassName class name for driver
SimpleConnectionManager.java62 行で定義されています。

参照元 org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.clone().

00064 { 00065 super(backendUrl, backendName, login, password, driverPath, driverClassName); 00066 }


メソッド

synchronized void org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.addConnection  )  [private]
 

SimpleConnectionManager.java160 行で定義されています。

参照先 org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.nbOfConnections.

参照元 org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.getConnection().

00161 { 00162 nbOfConnections++; 00163 }

Object org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.clone  )  throws CloneNotSupportedException [protected, virtual]
 

参照:
java.lang.Object#clone()

org.objectweb.cjdbc.controller.connection.AbstractConnectionManagerを実装しています.

SimpleConnectionManager.java71 行で定義されています。

参照先 org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.SimpleConnectionManager().

00072 { 00073 return new SimpleConnectionManager(backendUrl, backendName, rLogin, 00074 rPassword, driverPath, driverClassName); 00075 }

void org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.deleteConnection Connection  c  )  [virtual]
 

参照:
org.objectweb.cjdbc.controller.connection.AbstractConnectionManager.deleteConnection(Connection)

org.objectweb.cjdbc.controller.connection.AbstractConnectionManagerを実装しています.

SimpleConnectionManager.java148 行で定義されています。

00149 { 00150 }

void org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.finalizeConnections  )  throws SQLException [virtual]
 

Does nothing.

参照:
org.objectweb.cjdbc.controller.connection.AbstractConnectionManager.finalizeConnections()

org.objectweb.cjdbc.controller.connection.AbstractConnectionManagerを実装しています.

SimpleConnectionManager.java92 行で定義されています。

00093 { 00094 initialized = false; 00095 }

Connection org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.getConnection  )  throws UnreachableBackendException [virtual]
 

Gets a new connection from the underlying driver.

参照:
org.objectweb.cjdbc.controller.connection.AbstractConnectionManager.getConnection()

org.objectweb.cjdbc.controller.connection.AbstractConnectionManagerを実装しています.

SimpleConnectionManager.java102 行で定義されています。

参照先 org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.addConnection(), org.objectweb.cjdbc.common.log.Trace.error(), org.objectweb.cjdbc.controller.connection.AbstractConnectionManager.getConnectionFromDriver(), org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.nbOfConnections, と org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.removeConnection().

00103 { 00104 if (!initialized) 00105 { 00106 logger 00107 .error("Requesting a connection from a non-initialized connection manager"); 00108 return null; 00109 } 00110 00111 addConnection(); 00112 Connection c = getConnectionFromDriver(); 00113 if (c == null) 00114 { 00115 removeConnection(); 00116 logger.error("Unable to get connection from " + backendUrl); 00117 if (nbOfConnections == 0) 00118 { 00119 logger.error("Backend '" + backendUrl + "' is considered unreachable. " 00120 + "(No active connection and none can be opened)"); 00121 throw new UnreachableBackendException(); 00122 } 00123 } 00124 return c; 00125 }

int org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.getCurrentNumberOfConnections  )  [virtual]
 

参照:
org.objectweb.cjdbc.controller.connection.AbstractConnectionManager.getCurrentNumberOfConnections()

org.objectweb.cjdbc.controller.connection.AbstractConnectionManagerを実装しています.

SimpleConnectionManager.java155 行で定義されています。

参照先 org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.nbOfConnections.

00156 { 00157 return nbOfConnections; 00158 }

String org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.getXmlImpl  )  [virtual]
 

参照:
org.objectweb.cjdbc.controller.connection.AbstractConnectionManager.getXmlImpl()

org.objectweb.cjdbc.controller.connection.AbstractConnectionManagerを実装しています.

SimpleConnectionManager.java173 行で定義されています。

00174 { 00175 return "<" + DatabasesXmlTags.ELT_SimpleConnectionManager + "/>"; 00176 }

void org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.initializeConnections  )  throws SQLException [virtual]
 

Does nothing.

参照:
org.objectweb.cjdbc.controller.connection.AbstractConnectionManager.initializeConnections()

org.objectweb.cjdbc.controller.connection.AbstractConnectionManagerを実装しています.

SimpleConnectionManager.java82 行で定義されています。

00083 { 00084 initialized = true; 00085 }

void org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.releaseConnection Connection  connection  )  [virtual]
 

Closes the connection.

参照:
org.objectweb.cjdbc.controller.connection.AbstractConnectionManager.releaseConnection(Connection)

org.objectweb.cjdbc.controller.connection.AbstractConnectionManagerを実装しています.

SimpleConnectionManager.java132 行で定義されています。

参照先 org.objectweb.cjdbc.common.log.Trace.error(), と org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.removeConnection().

00133 { 00134 removeConnection(); 00135 try 00136 { 00137 connection.close(); 00138 } 00139 catch (SQLException e) 00140 { 00141 logger.error("Failed to close connection for '" + backendUrl + "'", e); 00142 } 00143 }

synchronized void org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.removeConnection  )  [private]
 

SimpleConnectionManager.java165 行で定義されています。

参照先 org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.nbOfConnections.

参照元 org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.getConnection(), と org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.releaseConnection().

00166 { 00167 nbOfConnections--; 00168 }


変数

int org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.nbOfConnections = 0 [private]
 

SimpleConnectionManager.java46 行で定義されています。

参照元 org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.addConnection(), org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.getConnection(), org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.getCurrentNumberOfConnections(), と org.objectweb.cjdbc.controller.connection.SimpleConnectionManager.removeConnection().


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:40 2004に生成されました。 doxygen 1.3.8