|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OjbFactory
Interface featuring methods for OJB PersistenceBroker handling, allowing for reuse of PersistenceBroker instances within transactions. Note : inspired from the Spring framework.
Method Summary | |
---|---|
org.apache.ojb.broker.PersistenceBroker |
getPersistenceBroker(org.apache.ojb.broker.PBKey pbKey,
boolean allowCreate)
Get an OJB PersistenceBroker for the given PBKey. |
org.apache.ojb.broker.PersistenceBroker |
getPersistenceBroker(org.apache.ojb.broker.PBKey pbKey,
boolean allowCreate,
boolean allowSynchronization)
Get an OJB PersistenceBroker for the given PBKey. |
Method Detail |
---|
org.apache.ojb.broker.PersistenceBroker getPersistenceBroker(org.apache.ojb.broker.PBKey pbKey, boolean allowCreate)
pbKey
- PBKey to create the PersistenceBroker forallowCreate
- if a new PersistenceBroker should be created if no thread-bound found
java.lang.IllegalStateException
- if no thread-bound PersistenceBroker found and allowCreate falseorg.apache.ojb.broker.PersistenceBroker getPersistenceBroker(org.apache.ojb.broker.PBKey pbKey, boolean allowCreate, boolean allowSynchronization)
pbKey
- PBKey to create the PersistenceBroker forallowCreate
- if a new PersistenceBroker should be created if no thread-bound foundallowSynchronization
- if a new OJB PersistenceBroker is supposed to be
registered with transaction synchronization (if synchronization is active).
This will always be true for typical data access code.
java.lang.IllegalStateException
- if no thread-bound PersistenceBroker found and allowCreate false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |