org.springframework.dao
exception hierarchy. The central method is execute
, supporting OJB code implementing the PersistenceBrokerCallback interface. It provides PersistenceBroker handling such that neither the PersistenceBrokerCallback implementation nor the calling code needs to explicitly care about retrieving/closing PersistenceBrokers, or handling OJB lifecycle exceptions.
Typically used to implement data access or business logic services that use OJB within their implementation but are OJB-agnostic in their interface. The latter or code calling the latter only have to deal with business objects, query objects, and org.springframework.dao
exceptions.
Note that operations that return an Iterator (that is, getIteratorByQuery
and getReportQueryIteratorByQuery
) are supposed to be used within Spring-managed transactions (with PersistenceBrokerTransactionManager or JtaTransactionManager). Else, the Iterator won't be able to read results from its ResultSet anymore, as the underlying PersistenceBroker will already have been closed.
@author Juergen Hoeller
@since 1.1
@see #setPbKey
@see PersistenceBrokerCallback
@see org.apache.ojb.broker.PersistenceBroker
@see #getIteratorByQuery
@see #getReportQueryIteratorByQuery
@see PersistenceBrokerTransactionManager
@see org.springframework.transaction.jta.JtaTransactionManager
|
|
|
|