Package com.atomikos.icatch

Examples of com.atomikos.icatch.SysException


                coordinator_.setStateHandler ( nextStateHandler );
            }
        } catch ( RuntimeException runerr ) {
            errors.push ( runerr );
            throw new SysException (
                    "Error in commit: " + runerr.getMessage (), errors );
        }

        catch ( InterruptedException intr ) {
            errors.push ( intr );
            throw new SysException ( "Error in commit" + intr.getMessage (),
                    errors );
        }

        return getHeuristicMessages ();
View Full Code Here


        }

        catch ( RuntimeException runerr ) {
            errors.push ( runerr );
            throw new SysException ( "Error in rollback: "
                    + runerr.getMessage (), errors );
        }

        catch ( InterruptedException e ) {
            errors.push ( e );
            throw new SysException ( "Error in rollback: " + e.getMessage (),
                    errors );
        } finally {
            // System.err.println ( "Exiting CoordinatorStateHandler.rollback"
            // );
        }
View Full Code Here

        msg = tag;
        try {
            propagation = Configuration.getExportingTransactionManager ()
                    .getPropagation ();
        } catch ( RollbackException e ) {
            throw new SysException ( "Transaction already rolled back" );
        }
        myWaiter = w;
        myWaiter.incActives ();
        myCode = code;
        myException = null;
View Full Code Here

                    // this is impossible since it assumes that ALL
                    // participants voted YES in the first place,
                    // which contradicts the fact that we are dealing with
                    // !voteOK
                    errors.push ( hc );
                    throw new SysException ( "Unexpected heuristic: "
                            + hc.getMessage (), errors );
                }
                throw new RollbackException ( "Prepare: " + "NO vote" );

                // } //else
            } // if (!voteOK)
        } catch ( RuntimeException runerr ) {
            errors.push ( runerr );
            throw new SysException ( "Error in prepare: "
                    + runerr.getMessage (), errors );
        } catch ( InterruptedException err ) {
            errors.push ( err );
            throw new SysException ( "Error in prepare: " + err.getMessage (),
                    errors );
        }
        // here we are if all yes.
        if ( allReadOnly ) {
            nextStateHandler = new TerminatedStateHandler ( this );
View Full Code Here

         // rollback coordinator outside SYNCH block to avoid deadlocks
         try {
             ct_.getCoordinatorImp ().rollback ();
         } catch ( HeurCommitException e ) {
             errors.push ( e );
             throw new SysException ( "Unexpected error in rollback", errors );
         } catch ( HeurMixedException e ) {
             errors.push ( e );
             throw new SysException ( "Unexpected error in rollback", errors );
         } catch ( HeurHazardException e ) {
             errors.push ( e );
             throw new SysException ( "Unexpected error in rollback", errors );
         }
    }
View Full Code Here

    public Extent terminated ( boolean commit ) throws SysException,
            RollbackException

    {
        throw new SysException ( "Not implemented" );
    }
View Full Code Here

        service_.shutdown ( force );
    }

    public void addExtent ( Extent extent ) throws SysException
    {
        throw new SysException ( "Not implemented" );
    }
View Full Code Here

    }

    public Extent terminated ( boolean commit ) throws SysException,
            RollbackException
    {
        throw new SysException ( "Not implemented" );
    }
View Full Code Here

     * @see ExportingTransactionManager
     */

    public void addExtent ( Extent extent ) throws SysException
    {
        throw new SysException ( "Not implemented" );
    }
View Full Code Here

        // duplicate prepares can happen for siblings in serial subtxs!!!
        // in that case, the second prepare just returns READONLY
        if ( state_.equals ( TxState.IN_DOUBT ) )
            return Participant.READ_ONLY;
        else if ( !state_.equals ( TxState.LOCALLY_DONE ) )
            throw new SysException ( "Wrong state for prepare: " + state_ );
        try {
            // refresh xaresource for MQSeries: seems to close XAResource after
            // suspend???
            testOrRefreshXAResourceFor2PC ();
            printMsg ( "About to call prepare on XAResource instance: "
                    + xaresource_, Console.DEBUG );
            ret = xaresource_.prepare ( xid_ );

        } catch ( XAException xaerr ) {
              String msg = interpretErrorCode ( resourcename_ , "prepare" , xid_ , xaerr.errorCode );
            Configuration.logDebug ( msg , xaerr );
            if ( (XAException.XA_RBBASE <= xaerr.errorCode)
                    && (xaerr.errorCode <= XAException.XA_RBEND) ) {
                throw new RollbackException ( msg );
            } else {
                errors.push ( xaerr );
                throw new SysException ( msg , errors );
            }
        }
        state_ = TxState.IN_DOUBT;
        if ( ret == XAResource.XA_RDONLY ) {
            printMsg ( "XAResource.prepare ( " + xidToHexString (xid_)
View Full Code Here

TOP

Related Classes of com.atomikos.icatch.SysException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.