org.openorb.ots
Interface SessionManagerOperations

All Known Subinterfaces:
SessionManager
All Known Implementing Classes:
SessionManager

public interface SessionManagerOperations

This local object manages connection to a database. The user must use it in order to propagate a transaction from the OTS to the database. To get access to this object, the user must apply the 'TransactionSessionManager' value to the resolve_initial_references operation.


Method Summary
 void freeConnections(Coordinator coordinator)
          This operation is automatically called by the openORB OTS to free all connections involved into a transaction when it completed.
 java.sql.Connection getConnection(java.lang.String user_name, java.lang.String user_password, java.lang.String profile_name)
          Return a connection to a database.
 void updateConnection(javax.sql.XAConnection connection, Coordinator coordinator)
          This operation is automatically called by the openORB OTS to change a connection state.
 

Method Detail

getConnection

java.sql.Connection getConnection(java.lang.String user_name,
                                  java.lang.String user_password,
                                  java.lang.String profile_name)
Return a connection to a database. This connection can be used to make SQL statements. The user must get one connection for one thread transaction. But several serialized transactions can shared the same connection. Thus, if you have concurrent access ( several transactions at the same time ), you must use a distint connection for each transaction.

Parameters:
user_name - the user name to get a connection to the database.
user_password - the user password to get a connection to the database.
profile_name - the database profile ( this profile name is used to get information from the openORB OTS configuration file, i.e. JDBC driver and so on... )
Returns:
a connection handle to access to the database

freeConnections

void freeConnections(Coordinator coordinator)
This operation is automatically called by the openORB OTS to free all connections involved into a transaction when it completed. In a normal usage, the user will not use this operation.


updateConnection

void updateConnection(javax.sql.XAConnection connection,
                      Coordinator coordinator)
This operation is automatically called by the openORB OTS to change a connection state. In a normal usage, the user will not use this operation.