Methods Summary |
---|
public oracle.toplink.essentials.threetier.ClientSession | acquireClientSession()PUBLIC:
Return a client session for this server session.
Each user/client connected to this server session must acquire there own client session
to communicate to the server through.
This method allows for a client session to be acquired sharing the same login as the server session.
|
public oracle.toplink.essentials.threetier.ClientSession | acquireClientSession(java.lang.String poolName)PUBLIC:
Return a client session for this server session.
Each user/client connected to this server session must acquire there own client session
to communicate to the server through.
This method allows for a client session to be acquired sharing its connection from a pool
of connection allocated on the server session.
By default this uses a lazy connection policy.
|
public oracle.toplink.essentials.threetier.ClientSession | acquireClientSession(oracle.toplink.essentials.sessions.Login login)PUBLIC:
Return a client session for this server session.
Each user/client connected to this server session must acquire there own client session
to communicate to the server through.
The client must provide its own login to use, and the client session returned
will have its own exclusive database connection. This connection will be used to perform
all database modification for all units of work acquired from the client session.
By default this does not use a lazy connection policy.
|
public oracle.toplink.essentials.threetier.ClientSession | acquireClientSession(oracle.toplink.essentials.threetier.ConnectionPolicy connectionPolicy)PUBLIC:
Return a client session for this server session.
The connection policy specifies how the client session's connection will be acquired.
|
public void | addConnectionPool(java.lang.String poolName, oracle.toplink.essentials.sessions.Login login, int minNumberOfConnections, int maxNumberOfConnections)PUBLIC:
Add the connection pool.
Connections are pooled to share and restrict the number of database connections.
|
public void | addConnectionPool(oracle.toplink.essentials.threetier.ConnectionPool pool)PUBLIC:
Connection are pooled to share and restrict the number of database connections.
|
public oracle.toplink.essentials.threetier.ConnectionPool | getConnectionPool(java.lang.String poolName)PUBLIC:
Return the pool by name.
|
public oracle.toplink.essentials.threetier.ConnectionPolicy | getDefaultConnectionPolicy()PUBLIC:
The default connection policy is used by default by the acquireClientConnection() protocol.
By default it is a connection pool with min 5 and max 10 lazy pooled connections.
|
public oracle.toplink.essentials.threetier.ConnectionPool | getDefaultConnectionPool()PUBLIC:
Return the default connection pool.
|
public int | getMaxNumberOfNonPooledConnections()PUBLIC:
Return the number of non-pooled database connections allowed.
This can be enforced to make up for the resource limitation of most JDBC drivers and database clients.
By default this is 50.
|
public oracle.toplink.essentials.threetier.ConnectionPool | getReadConnectionPool()PUBLIC:
Handles allocating connections for read queries.
By default a read connection pool is created and configured automatically in the
constructor. A default read connection pool is one with two connections, and
does not support concurrent reads.
The read connection pool is not used while in transaction.
|
public void | setDatasourceLogin(oracle.toplink.essentials.sessions.Login login)PUBLIC:
Set the login.
|
public void | setDefaultConnectionPolicy(oracle.toplink.essentials.threetier.ConnectionPolicy defaultConnectionPolicy)PUBLIC:
The default connection policy is used by default by the acquireClientConnection() protocol.
By default it is a connection pool with min 5 and max 10 lazy pooled connections.
|
public void | setMaxNumberOfNonPooledConnections(int maxNumberOfNonPooledConnections)PUBLIC:
Set the number of non-pooled database connections allowed.
This can be enforced to make up for the resource limitation of most JDBC drivers and database clients.
By default this is 50.
|
public void | setReadConnectionPool(oracle.toplink.essentials.threetier.ConnectionPool readConnectionPool)PUBLIC:
Sets the read connection pool directly.
Either {@link #useExclusiveReadConnectionPool} or {@link #useExternalReadConnectionPool} is
called in the constructor. For a connection pool using concurrent reading
{@link #useReadConnectionPool} should be called on a new instance of this .
|
public void | useExclusiveReadConnectionPool(int minNumberOfConnections, int maxNumberOfConnections)PUBLIC:
Sets the read connection pool to be a standard ConnectionPool .
Minimum and maximum number of connections is determined from the ConnectionPolicy. The defaults are 2 for both.
Since the same type of connection pool is used as for writing, no
two users will use the same connection for reading at the same time.
This read connection pool is the default as some JDBC drivers do not support
concurrent reading.
Unless this {@link oracle.toplink.essentials.sessions.Session#hasExternalTransactionController hasExternalTransactionController()}
a read connection pool of this type will be setup in the constructor.
|
public void | useExternalReadConnectionPool()PUBLIC:
Sets the read connection pool to be an ExternalConnectionPool .
This type of connection pool will be created and configured automatically if
an external transaction controller is used.
|
public void | useReadConnectionPool(int minNumberOfConnections, int maxNumberOfConnections)PUBLIC:
Sets the read connection pool to be a ReadConnectionPool .
Since read connections are not used for writing, multiple users can
theoretically use the same connection at the same time. Most JDBC drivers
have concurrent reading which supports this.
Use this read connection pool to take advantage of concurrent reading.
|