Package lumis.portal.transaction
Class PortalTransactionFactory
- java.lang.Object
-
- lumis.portal.transaction.PortalTransactionFactory
-
- Direct Known Subclasses:
PortalTransactionFactory
@StableMinor(version="17.0", sinceVersion="4.0") public class PortalTransactionFactory extends java.lang.Object
Factory for obtainingITransaction
instances.- Since:
- 4.0.8
- Version:
- $Revision$ $Date$
- See Also:
lumis.portal.transaction
,ITransaction
-
-
Constructor Summary
Constructors Constructor Description PortalTransactionFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ITransaction
createTransaction()
Creates a new transaction object, associating it to the current thread.static ITransaction
createTransaction(boolean associateToThread)
Creates a new transaction object, optionally associating it to the current thread.static ITransaction
getCurrentTransaction()
Returns the transaction associated with the current thread.static ITransaction
getTransaction()
Deprecated.Since 4.2.0, replaced bycreateTransaction()
andgetCurrentTransaction()
.
-
-
-
Method Detail
-
getTransaction
@Deprecated public static ITransaction getTransaction() throws PortalException
Deprecated.Since 4.2.0, replaced bycreateTransaction()
andgetCurrentTransaction()
. Current implementation behaves ascreateTransaction()
.Returns a new transaction.- Returns:
- the transaction.
- Throws:
PortalException
- Since:
- 4.0.0
-
createTransaction
public static ITransaction createTransaction()
Creates a new transaction object, associating it to the current thread. After the created transaction is disposed, the previously active transaction will become active.The
ITransaction.close()
method of the returned transaction must be called after it is used. See code example inlumis.portal.transaction
.- Returns:
- the created transaction.
- Since:
- 4.2.0
- See Also:
createTransaction(boolean)
,getCurrentTransaction()
-
createTransaction
public static ITransaction createTransaction(boolean associateToThread)
Creates a new transaction object, optionally associating it to the current thread.The
ITransaction.close()
method of the returned transaction must be called after it is used. See code example inlumis.portal.transaction
.- Parameters:
associateToThread
- if true, the created transaction will become the active transaction for the current thread. After the created transaction is disposed, the previously active transaction will become active.- Returns:
- the created transaction.
- Since:
- 4.2.0
- See Also:
createTransaction()
,getCurrentTransaction()
-
getCurrentTransaction
public static ITransaction getCurrentTransaction() throws TransactionRequiredException
Returns the transaction associated with the current thread.- Returns:
- the transaction.
- Throws:
TransactionRequiredException
- if there is no transaction associated with the current thread.- Since:
- 4.2.0
- See Also:
createTransaction()
-
-