Package org.jboss.ejb.server
Interface SessionOpenRequest
- All Superinterfaces:
Request
An Enterprise Bean session-open request.
- Author:
- David M. Lloyd
-
Method Summary
Modifier and TypeMethodDescriptionGet the inflowed transaction of the request.booleanDetermine if the request has a transaction.Methods inherited from interface org.jboss.ejb.server.Request
convertToStateful, getEJBIdentifier, getLocalAddress, getPeerAddress, getProtocol, getProviderInterface, getRequestExecutor, getSecurityIdentity, isBlockingCaller, updateStrongAffinity, updateWeakAffinity, writeCancelResponse, writeException, writeNoSuchEJB, writeNotStateful, writeWrongViewType
-
Method Details
-
hasTransaction
boolean hasTransaction()Determine if the request has a transaction.- Returns:
trueif there is a transaction context with this request
-
getTransaction
Get the inflowed transaction of the request. This should not be called unless it is desired to actually inflow the transaction; doing so without using the transaction will cause needless work for the transaction coordinator. To perform transaction checks, usehasTransaction()first. This method should only be called one time as it will inflow the transaction when called.If a transaction is present but transaction inflow has failed, a
SystemExceptionis thrown. In this case, the invocation should fail.It is the caller's responsibility to check the status of the returned transaction to ensure that it is in an active state; failure to do so can result in undesirable behavior.
- Returns:
- the transaction, or
nullif there is none for the request - Throws:
SystemException- if inflowing the transaction failedIllegalStateException- if this method is called more than one time
-