|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Factory for PersistenceBroker
instances.
Each implementation have to provide a default constructor.
Method Summary | |
int |
activePersistenceBroker()
Returns the total number of active PersistenceBroker
instances. |
PersistenceBrokerInternal |
createPersistenceBroker(PBKey key)
Return PersistenceBroker instance for the given
PBKey . |
PersistenceBrokerInternal |
createPersistenceBroker(java.lang.String jcdAlias,
java.lang.String user,
java.lang.String password)
Return a ready for action PersistenceBroker instance. |
PersistenceBrokerInternal |
defaultPersistenceBroker()
Return a default broker instance, specified in configuration or set using setDefaultKey(org.apache.ojb.broker.PBKey) . |
PBKey |
getDefaultKey()
Get the default PBKey . |
void |
releaseAllInstances()
release all broker instances pooled by the factory. |
void |
setDefaultKey(PBKey key)
Set the PBKey used for convinience PersistenceBroker
lookup method defaultPersistenceBroker() . |
void |
shutdown()
Shutdown method for OJB, kills all running processes within OJB - after shutdown OJB can no longer be used. |
Methods inherited from interface org.apache.ojb.broker.util.configuration.Configurable |
configure |
Method Detail |
public void setDefaultKey(PBKey key)
PBKey
used for convinience PersistenceBroker
lookup method defaultPersistenceBroker()
.
PBKey
once.
All further calls will cause an exception.
If a default JdbcConnectionDescriptor
was declared in configuration file, OJB will set the declared PBKey as default.
MetadataManager.setDefaultPBKey(org.apache.ojb.broker.PBKey)
.
public PBKey getDefaultKey()
PBKey
.
This method is convenience for
MetadataManager.getDefaultPBKey()
.
setDefaultKey(org.apache.ojb.broker.PBKey)
public PersistenceBrokerInternal createPersistenceBroker(PBKey key) throws PBFactoryException
PersistenceBroker
instance for the given
PBKey
.
key
-
PBFactoryException
public PersistenceBrokerInternal createPersistenceBroker(java.lang.String jcdAlias, java.lang.String user, java.lang.String password) throws PBFactoryException
PersistenceBroker
instance.
jcdAlias
- An jcdAlias name specified in a jdbc-connection-descriptoruser
- user name specified in a jdbc-connection-descriptorpassword
- valid password specified in a jdbc-connection-descriptor
PBFactoryException
public PersistenceBrokerInternal defaultPersistenceBroker() throws PBFactoryException
setDefaultKey(org.apache.ojb.broker.PBKey)
.
PBFactoryException
public void releaseAllInstances()
public int activePersistenceBroker()
PersistenceBroker
instances.
public void shutdown()
ThreadLocal
instances in OJB source and the reuse of threads
by the container (e.g. servlet- or ejb-container).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |