|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.toplink.threetier.ConnectionPolicy
public class ConnectionPolicy
Purpose: Used to specify how a client session's should be allocated.
Constructor Summary | |
---|---|
ConnectionPolicy()
A connection policy is used to define how the client session connection should be acquired. |
|
ConnectionPolicy(Login login)
A connection policy is used to define how the client session connection should be acquired. |
|
ConnectionPolicy(java.lang.String poolName)
A connection policy is used to define how the client session connection should be acquired. |
Method Summary | |
---|---|
void |
dontUseLazyConnection()
A lazy connection only acquires a physical connection when a transaction is started and releases the connection when the transaction completes. |
Login |
getLogin()
Return the login to use for this connection. |
java.lang.String |
getPoolName()
Return the pool name or null if not part of a pool. |
java.util.Map |
getProperties()
ADVANCED: This method will return the collection of custom properties set on the Connection policy. |
java.lang.Object |
getProperty(java.lang.Object object)
Returns the property associated with the corresponding key. |
boolean |
hasLogin()
Return if a login is used, only one of login and pool can be used. |
boolean |
hasProperties()
Returns true if properties are available on the Connection Policy |
boolean |
isLazy()
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. |
java.lang.Object |
removeProperty(java.lang.Object key)
This method is used to remove a custom property from the Connection Policy. |
void |
setIsLazy(boolean isLazy)
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(Login login)
Set the login to use for this connection. |
void |
setPoolName(java.lang.String poolName)
Set the pool name or null if not part of a pool. |
void |
setProperty(java.lang.Object key,
java.lang.Object property)
Use this method to set custom properties on the Connection Policy. |
void |
setShouldUseExclusiveConnection(boolean useExclusiveConnection)
If set to true the acquired client session should acquire an exclusive connection for all database interaction. |
boolean |
shouldUseExclusiveConnection()
Returns true if the acquired client session should acquire an exclusive connection for all database interaction. |
void |
useLazyConnection()
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 |
---|
public ConnectionPolicy()
public ConnectionPolicy(java.lang.String poolName)
public ConnectionPolicy(Login login)
Method Detail |
---|
public void dontUseLazyConnection()
public Login getLogin()
public java.lang.String getPoolName()
public java.util.Map getProperties()
public java.lang.Object getProperty(java.lang.Object object)
public boolean hasLogin()
public boolean hasProperties()
public boolean isLazy()
public java.lang.Object removeProperty(java.lang.Object key)
public void setIsLazy(boolean isLazy)
public void setLogin(Login login)
public void setPoolName(java.lang.String poolName)
public void setProperty(java.lang.Object key, java.lang.Object property)
public void setShouldUseExclusiveConnection(boolean useExclusiveConnection)
public boolean shouldUseExclusiveConnection()
public void useLazyConnection()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |