Package overit.geocall.da
Class PoolKit.Transaction
java.lang.Object
overit.geocall.da.PoolKit.Transaction
- Enclosing class:
PoolKit
-
Method Summary
Modifier and TypeMethodDescriptionadvance()Get the connection currently used by this transactionExtract a newPooledConnectionfrom the specified Pool.Extract a newPooledConnectionfrom the specified Pool.startOrAdvance(String pool, boolean service, String description) Get the connection currently used by this transaction or extract a newPooledConnectionfrom the specified Pool if it is not extracted yet.startOrAdvance(String pool, String description) Get the connection currently used by this transaction or extract a newPooledConnectionfrom the specified Pool if it is not extracted yet.
-
Method Details
-
start
Extract a newPooledConnectionfrom the specified Pool. This method must be used only the first time you want to extract a connection from the pool; if you wnat to reuse it use theadvance()orstartOrAdvance(String, String)methods- Parameters:
pool- the pool's namedescription- the operation description- Returns:
- the connection extracted from the pool
- Throws:
DAException- in case of database error
-
start
Extract a newPooledConnectionfrom the specified Pool. This method must be used only the first time you want to extract a connection from the pool; if you wnat to reuse it use theadvance()orstartOrAdvance(String, String)methods- Parameters:
pool- the pool's nameservice-trueto extract the connection from the service's pooldescription- the operation description- Returns:
- the connection extracted from the pool
- Throws:
DAException- in case of database error
-
advance
Get the connection currently used by this transaction- Returns:
- the connection currently used by this transaction
- Throws:
DAException- in case of database error
-
startOrAdvance
Get the connection currently used by this transaction or extract a newPooledConnectionfrom the specified Pool if it is not extracted yet.- Parameters:
pool- the pool's namedescription- the operation description- Returns:
- the connection extracted from the pool
- Throws:
DAException- in case of database error
-
startOrAdvance
public PooledConnection startOrAdvance(String pool, boolean service, String description) throws DAException Get the connection currently used by this transaction or extract a newPooledConnectionfrom the specified Pool if it is not extracted yet.- Parameters:
pool- the pool's nameservice-trueto extract the connection from the service's pooldescription- the operation description- Returns:
- the connection extracted from the pool
- Throws:
DAException- in case of database error
-