|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl
This is an base implementation of the PersistenceBrokerFactoryIF
interface. Each request (PersistenceBrokerFactoryIF.createPersistenceBroker(org.apache.ojb.broker.PBKey)
or
PersistenceBrokerFactoryIF.defaultPersistenceBroker()
call) creates a new
PersistenceBroker
instance. No pooling of broker instances is used.
PersistenceBrokerFactoryDefaultImpl
Constructor Summary | |
PersistenceBrokerFactoryBaseImpl()
|
Method Summary | |
int |
activePersistenceBroker()
Not implemented! |
void |
configure(org.apache.ojb.broker.util.configuration.Configuration config)
|
PersistenceBroker |
createPersistenceBroker(PBKey pbKey)
Always return a new created PersistenceBroker instance |
PersistenceBroker |
createPersistenceBroker(java.lang.String jcdAlias,
java.lang.String user,
java.lang.String password)
Return a ready for action PersistenceBroker instance. |
PersistenceBroker |
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() . |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PersistenceBrokerFactoryBaseImpl()
Method Detail |
public void setDefaultKey(PBKey key)
PersistenceBrokerFactoryIF
PBKey
used for convinience PersistenceBroker
lookup method PersistenceBrokerFactoryIF.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)
.
setDefaultKey
in interface PersistenceBrokerFactoryIF
PersistenceBrokerFactoryIF.setDefaultKey(org.apache.ojb.broker.PBKey)
public PBKey getDefaultKey()
PersistenceBrokerFactoryIF
PBKey
.
This method is convenience for
MetadataManager.getDefaultPBKey()
.
getDefaultKey
in interface PersistenceBrokerFactoryIF
PersistenceBrokerFactoryIF.getDefaultKey()
public PersistenceBroker createPersistenceBroker(PBKey pbKey) throws PBFactoryException
PersistenceBroker
instance
createPersistenceBroker
in interface PersistenceBrokerFactoryIF
pbKey
-
PBFactoryException
public PersistenceBroker createPersistenceBroker(java.lang.String jcdAlias, java.lang.String user, java.lang.String password) throws PBFactoryException
PersistenceBrokerFactoryIF
PersistenceBroker
instance.
createPersistenceBroker
in interface PersistenceBrokerFactoryIF
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
PersistenceBrokerFactoryIF.createPersistenceBroker(
String jcdAlias, String user, String password)
public PersistenceBroker defaultPersistenceBroker() throws PBFactoryException
PersistenceBrokerFactoryIF
PersistenceBrokerFactoryIF.setDefaultKey(org.apache.ojb.broker.PBKey)
.
defaultPersistenceBroker
in interface PersistenceBrokerFactoryIF
PBFactoryException
PersistenceBrokerFactoryIF.createPersistenceBroker(PBKey key)
public void configure(org.apache.ojb.broker.util.configuration.Configuration config) throws org.apache.ojb.broker.util.configuration.ConfigurationException
configure
in interface org.apache.ojb.broker.util.configuration.Configurable
org.apache.ojb.broker.util.configuration.ConfigurationException
public void releaseAllInstances()
PersistenceBrokerFactoryIF
releaseAllInstances
in interface PersistenceBrokerFactoryIF
PersistenceBrokerFactoryIF.releaseAllInstances()
public int activePersistenceBroker()
activePersistenceBroker
in interface PersistenceBrokerFactoryIF
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |