|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.common.connection.ManagedConnection
com.metamatrix.common.connection.SimpleManagedConnection
public final class SimpleManagedConnection
A trivial implementation of a ManagedConnection - all the abstract methods of ManagedConnection are simply implemented as no-ops here. This class is useful for testing or for use with a spi implementation involving a data source that doesn't support transactions, such as a file or file system.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.metamatrix.common.connection.ManagedConnection |
---|
ManagedConnection.ConnectionStatistics |
Field Summary |
---|
Fields inherited from class com.metamatrix.common.connection.ManagedConnection |
---|
DATABASE, DRIVER, PASSWORD, PROTOCOL, USERNAME |
Constructor Summary | |
---|---|
SimpleManagedConnection(java.util.Properties env)
Create a new instance of a connection. |
|
SimpleManagedConnection(java.util.Properties env,
java.lang.String userName)
|
Method Summary | |
---|---|
protected void |
closeConnection()
This method is invoked by the pool to notify the specialized class that the connection is to be terminated. |
protected void |
openConnection()
This method is invoked by the pool to notify the specialized class that the connection is to be established. |
protected void |
performCommit()
Make all changes made since the previous commit/rollback permanent, and release any data source locks currently held by the Connection. |
protected void |
performRollback()
Make all changes made since the previous commit/rollback permanent, and release any data source locks currently held by the Connection. |
protected void |
prepareForRead()
Prepare this connection for read-only transactions. |
protected void |
prepareForWrite()
Prepare this connection for write transactions. |
Methods inherited from class com.metamatrix.common.connection.ManagedConnection |
---|
close, commit, finalize, getEnvironment, getStats, getUserName, open, rollback, setForRead, setForWrite, setUserName |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleManagedConnection(java.util.Properties env)
env
- the environment properties for the new connection.public SimpleManagedConnection(java.util.Properties env, java.lang.String userName)
Method Detail |
---|
protected void openConnection()
openConnection
in class ManagedConnection
ManagedConnectionException
- if there is an error establishing the connection.protected void closeConnection()
closeConnection
in class ManagedConnection
ManagedConnectionException
- if there is an error terminating the connection.protected void prepareForRead()
prepareForRead
in class ManagedConnection
ManagedConnectionException
- if an error occurred within or during communication with this connection.protected void prepareForWrite()
prepareForWrite
in class ManagedConnection
ManagedConnectionException
- if an error occurred within or during communication with this connection.protected void performCommit()
performCommit
in class ManagedConnection
ManagedConnectionException
- if an error occurred within or during communication with this connection.protected void performRollback()
performRollback
in class ManagedConnection
ManagedConnectionException
- if an error occurred within or during communication with this connection.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |