Interface UserTransactionManagementMBean

    • Method Detail

      • startUserTransaction

        @SupportsUserTransactions
        void startUserTransaction()
                           throws NoAuthenticatedSubjectException,
                                  javax.transaction.NotSupportedException,
                                  ManagementException

        Start a client-demarcated transaction. The transaction is associated with the authenticated Subject that the invoking thread is currently associated with. A unique Subject exists for each authenticated user, even if the user has authenticated each time with the same username and password.

        A transaction started by a user remains active until explicitly committed or rolled back using the methods on this MBean.

        Transactions are local to individual Rhino nodes. It is not possible to start a user transaction on one Rhino node and invoke management commands within that transaction from another node.

        Throws:
        NoAuthenticatedSubjectException - if the current thread is not running with an authenticated Subject.
        javax.transaction.NotSupportedException - if the client has already started a user transaction. Nested transactions are not supported.
        ManagementException - if the user transaction cannot be started due to a system-level failure.
      • commitUserTransaction

        @SupportsUserTransactions
        void commitUserTransaction()
                            throws NoAuthenticatedSubjectException,
                                   InvalidStateException,
                                   ProfileVerificationException,
                                   javax.transaction.HeuristicMixedException,
                                   javax.transaction.HeuristicRollbackException,
                                   javax.transaction.RollbackException,
                                   ManagementException

        Commit a transaction started by the client.

        Throws:
        NoAuthenticatedSubjectException - if the current thread is not running with an authenticated Subject.
        InvalidStateException - if no user transaction is currently associated with the Subject.
        ProfileVerificationException - if a profile MBean was modified in the transaction and the ProfileManagement.profileVerify() callback method of the profile’s Profile Management Abstract Class throws this exception. This exception can also be thrown by the profile MBean if the deployment descriptor for the profile specification documents an indexed attribute as requiring unique values and a non-unique value has been supplied in the profile. If this exception is thrown, the user transaction remains active, allowing the client to resolve the profile verification error and attempt to commit the transaction again.
        javax.transaction.HeuristicMixedException - if a heuristic decision was made and that some relevant updates have been committed while others have been rolled back.
        javax.transaction.HeuristicRollbackException - if a heuristic decision was made and that all relevant updates have been rolled back
        javax.transaction.RollbackException - if the transaction has been rolled back instead of committed.
        ManagementException - if the user transaction could not be committed due to a system-level failure.
      • getHasUserTransaction

        @SupportsUserTransactions
        boolean getHasUserTransaction()
                               throws ManagementException

        Determine if a client-demaracted transaction currently exists for the user.

        Returns:
        true if a client-demaracted transaction currently exists for the user, false otherwise.
        Throws:
        ManagementException - if the transaction status could not be obtained due to a system-level failure.