Package org.fcrepo.http.commons.session
Class TransactionProvider
java.lang.Object
org.fcrepo.http.commons.session.TransactionProvider
- All Implemented Interfaces:
org.glassfish.hk2.api.Factory<org.fcrepo.kernel.api.Transaction>
public class TransactionProvider
extends Object
implements org.glassfish.hk2.api.Factory<org.fcrepo.kernel.api.Transaction>
Provide a fedora tranasction within the current request context
- Author:
- awoods
-
Constructor Summary
ConstructorsConstructorDescriptionTransactionProvider(org.fcrepo.kernel.api.TransactionManager txManager, javax.servlet.http.HttpServletRequest request, URI baseUri, String jmsBaseUrl) Create a new transaction provider for a request -
Method Summary
-
Constructor Details
-
TransactionProvider
public TransactionProvider(org.fcrepo.kernel.api.TransactionManager txManager, javax.servlet.http.HttpServletRequest request, URI baseUri, String jmsBaseUrl) Create a new transaction provider for a request- Parameters:
txManager- the transaction managerrequest- the requestbaseUri- base uri for the applicationjmsBaseUrl- base url to use for jms, optional
-
-
Method Details
-
provide
- Specified by:
providein interfaceorg.glassfish.hk2.api.Factory<org.fcrepo.kernel.api.Transaction>
-
dispose
- Specified by:
disposein interfaceorg.glassfish.hk2.api.Factory<org.fcrepo.kernel.api.Transaction>
-
getTransactionForRequest
Returns the transaction for the Request. If the request has ATOMIC_ID_HEADER header, the transaction corresponding to that ID is returned, otherwise, a new transaction is created.- Returns:
- the transaction for the request
-