lumis.portal.transaction
Class PortalTransactionFactory

Package class diagram package PortalTransactionFactory
java.lang.Object
  extended by lumis.portal.transaction.PortalTransactionFactory
Direct Known Subclasses:
PortalTransactionFactory

@StableMinor(version="6.2",
             sinceVersion="4.0")
public class PortalTransactionFactory
extends Object

Factory for obtaining ITransaction instances.

Since:
4.0.8
See Also:
lumis.portal.transaction, ITransaction

Constructor Summary
PortalTransactionFactory()
           
 
Method Summary
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 by createTransaction() and getCurrentTransaction(). Current implementation behaves as createTransaction().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalTransactionFactory

public PortalTransactionFactory()
Method Detail

getTransaction

@Deprecated
public static ITransaction getTransaction()
                                   throws PortalException
Deprecated. Since 4.2.0, replaced by createTransaction() and getCurrentTransaction(). Current implementation behaves as createTransaction().

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.dispose() method of the returned transaction must be called after it is used. See code example in lumis.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.dispose() method of the returned transaction must be called after it is used. See code example in lumis.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()


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.