Interface SessionOpenRequest

All Superinterfaces:
Request

public interface SessionOpenRequest extends Request
An Enterprise Bean session-open request.
Author:
David M. Lloyd
  • Method Details

    • hasTransaction

      boolean hasTransaction()
      Determine if the request has a transaction.
      Returns:
      true if there is a transaction context with this request
    • getTransaction

      jakarta.transaction.Transaction getTransaction() throws jakarta.transaction.SystemException, IllegalStateException
      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, use hasTransaction() 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 SystemException is 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 null if there is none for the request
      Throws:
      jakarta.transaction.SystemException - if inflowing the transaction failed
      IllegalStateException - if this method is called more than one time