com.pega.pegarules.pub.context
Class PRSessionContext
java.lang.Object
com.pega.pegarules.pub.context.PRSessionContext
public class PRSessionContext
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- See Also:
- Constant Field Values
VERSION
public static final java.lang.String VERSION
PRSessionContext
public PRSessionContext(javax.ejb.SessionContext aCtx)
setAttributesForInvocation
public void setAttributesForInvocation(PRSessionContext.TransactionAttribute transAttribute,
PRSessionContext.LockAttribute lockAttribute,
PRSessionContext.ConclusionCacheAttribute conclusionCacheAttribute,
PRSessionContext.UniqueIDAttribute uniqueIdAttribute)
isContainerProvidingOurTransaction
public boolean isContainerProvidingOurTransaction()
isContainerManagedButNoTransaction
public boolean isContainerManagedButNoTransaction()
IsBeanManaged
public boolean IsBeanManaged()
isUsingConclusionCacheBean
public boolean isUsingConclusionCacheBean()
isLockingWithLockBean
public boolean isLockingWithLockBean()
isGettingUniqueIDFromBean
public boolean isGettingUniqueIDFromBean()
getCallerPrincipal
public java.security.Principal getCallerPrincipal()
getUserTransaction
public javax.transaction.UserTransaction getUserTransaction()
setRollbackOnly
public void setRollbackOnly()
setRollbackOnly
public void setRollbackOnly(java.lang.Exception ex)
getRollbackOnly
public boolean getRollbackOnly()
setRollbackException
public void setRollbackException(java.lang.Exception ex)
getRollbackException
public java.lang.Exception getRollbackException()
setTransactionType
public void setTransactionType(PRSessionContext.TransactionType aType)
- Sets the current transaction type. Value is held until
endTransaction
is used to clear it.
- Parameters:
aType
-
setTransactionTypeUsingTransactionAttribute
public void setTransactionTypeUsingTransactionAttribute()
- Sets the current transaction type based on the transaction attribute.
This is valid for container managed transaction only.
endTransaction
public void endTransaction()
- Clear the current transaction marker.
getTransactionType
public PRSessionContext.TransactionType getTransactionType()
- Tells you what kind of transaction we are in (if any)
- Returns:
- a PRSessionContext.TransactionType enum constant with the current transaction type (may be NONE)
canWeCommitOurConnections
public boolean canWeCommitOurConnections()
- Tells you if you are allowed to call commit or rollback on a connection
JTA does not allow you to do this (whether container managed or bean managed)
The decision is based on a flag we keep that is maintained from
ThreadConnectionStore
- Returns:
- true iff and a call to connection.setAutoCommit is allowed
Copyright © 2012 Pegasystems Inc. All Rights Reserved.