| Constructor and Description |
|---|
DBPool() |
| Modifier and Type | Method and Description |
|---|---|
IDB |
getDbForPersistenceUnit(String sPersistenceUnit)
return a new created/reseted or reused IDB instance from the pool
which is bound to a persistence unit matching the given name.
|
void |
registerPersistenceUnit(IPersistenceUnit aUnit)
register new persistence unit inside this pool.
|
void |
registerPersistenceUnit(String sName)
load the specified persistence unit from the persistence.xml file
and register those unit inside this pool.
|
public IDB getDbForPersistenceUnit(String sPersistenceUnit) throws Exception
IDBPoolgetDbForPersistenceUnit in interface IDBPoolsPersistenceUnit - [IN]
name of the persistence unit (configuration) where the searched
DB instance is bound to.Exceptionpublic void registerPersistenceUnit(String sName) throws Exception
IDBPoolregisterPersistenceUnit in interface IDBPoolsName - [IN]
the name of the persistence unit.Exception - if such persistence unit couldn't
be registered successfully.public void registerPersistenceUnit(IPersistenceUnit aUnit) throws Exception
IDBPoolregisterPersistenceUnit in interface IDBPoolaUnit - [IN]
the new persistence unit for this pool.Exception - if such persistence unit couldn't
be registered successfully.Copyright © 2016 as-development.net. All rights reserved.