Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.threetier
Class ConnectionPolicy

java.lang.Object
  extended byoracle.toplink.threetier.ConnectionPolicy

All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class ConnectionPolicy
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Purpose: Used to specify how a client session's should be allocated.

See Also:
ServerSession, Serialized Form

Constructor Summary
ConnectionPolicy()
PUBLIC: A connection policy is used to define how the client session connection should be acquired.
ConnectionPolicy(DatabaseLogin login)
PUBLIC: A connection policy is used to define how the client session connection should be acquired.
ConnectionPolicy(java.lang.String poolName)
PUBLIC: A connection policy is used to define how the client session connection should be acquired.

Method Summary
void dontUseLazyConnection()
PUBLIC: A lazy connection only acquires a physical connection when a transaction is started and releases the connection when the transaction completes.
DatabaseLogin getLogin()
PUBLIC: Return the login to use for this connection.
java.lang.String getPoolName()
PUBLIC: Return the pool name or null if not part of a pool.
boolean hasLogin()
PUBLIC: Return if a login is used, only one of login and pool can be used.
boolean isLazy()
PUBLIC: Return if a lazy connection should be used, a lazy connection only acquire a physical connection when a transaction is started and releases the connection when the transaction completes.
void setIsLazy(boolean isLazy)
PUBLIC: Set if a lazy connection should be used, a lazy connection only acquire a physical connection when a transaction is started and releases the connection when the transaction completes.
void setLogin(DatabaseLogin login)
PUBLIC: Set the login to use for this connection.
void setPoolName(java.lang.String poolName)
PUBLIC: Set the pool name or null if not part of a pool.
void useLazyConnection()
PUBLIC: A lazy connection only acquires a physical connection when a transaction is started and releases the connection when the transaction completes.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ConnectionPolicy

public ConnectionPolicy()
PUBLIC: A connection policy is used to define how the client session connection should be acquired.

ConnectionPolicy

public ConnectionPolicy(java.lang.String poolName)
PUBLIC: A connection policy is used to define how the client session connection should be acquired.

ConnectionPolicy

public ConnectionPolicy(DatabaseLogin login)
PUBLIC: A connection policy is used to define how the client session connection should be acquired.

Method Detail

dontUseLazyConnection

public void dontUseLazyConnection()
PUBLIC: A lazy connection only acquires a physical connection when a transaction is started and releases the connection when the transaction completes.

getLogin

public DatabaseLogin getLogin()
PUBLIC: Return the login to use for this connection. Client sessions support using a seperate user login for database modification.

getPoolName

public java.lang.String getPoolName()
PUBLIC: Return the pool name or null if not part of a pool.

hasLogin

public boolean hasLogin()
PUBLIC: Return if a login is used, only one of login and pool can be used.

isLazy

public boolean isLazy()
PUBLIC: Return if a lazy connection should be used, a lazy connection only acquire a physical connection when a transaction is started and releases the connection when the transaction completes.

setIsLazy

public void setIsLazy(boolean isLazy)
PUBLIC: Set if a lazy connection should be used, a lazy connection only acquire a physical connection when a transaction is started and releases the connection when the transaction completes.

setLogin

public void setLogin(DatabaseLogin login)
PUBLIC: Set the login to use for this connection. Client sessions support using a seperate user login for database modification. Pooled connections must use the pool's login and cannot define their own.

setPoolName

public void setPoolName(java.lang.String poolName)
PUBLIC: Set the pool name or null if not part of a pool.

useLazyConnection

public void useLazyConnection()
PUBLIC: A lazy connection only acquires a physical connection when a transaction is started and releases the connection when the transaction completes.

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.