Package net.jini.core.transaction
Class TransactionFactory
java.lang.Object
net.jini.core.transaction.TransactionFactory
Factory methods for creating top-level transactions.
- Since:
- 1.0
- Author:
- Sun Microsystems, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic NestableTransaction.Createdcreate(NestableTransactionManager mgr, long leaseTime) Create a new top-level transaction, under which nested transactions can be created.static Transaction.Createdcreate(TransactionManager mgr, long leaseTime) Create a new top-level transaction.
-
Method Details
-
create
public static Transaction.Created create(TransactionManager mgr, long leaseTime) throws LeaseDeniedException, RemoteException Create a new top-level transaction. If the specified transaction manager supports nested transactions, then the returned transaction can be cast to aNestableTransaction.- Parameters:
mgr- the transaction manager to use for this transactionleaseTime- the requested lease time for the transaction- Returns:
- the created transaction and the lease granted
- Throws:
LeaseDeniedException- if this manager is unwilling to grant the requested lease timeRemoteException- if a communication error occurs.
-
create
public static NestableTransaction.Created create(NestableTransactionManager mgr, long leaseTime) throws LeaseDeniedException, RemoteException Create a new top-level transaction, under which nested transactions can be created.- Parameters:
mgr- the transaction manager to use for this transactionleaseTime- the requested lease time for the transaction- Returns:
- the created transaction and the lease granted
- Throws:
LeaseDeniedException- if this manager is unwilling to grant the requested lease timeRemoteException- if a communication error occurs.
-