Package com.atomikos.icatch

Examples of com.atomikos.icatch.SysException


            if ( LOGGER.isInfoEnabled() ) LOGGER.logInfo ( "Bridge: error during message processing", e );
            if ( LOGGER.isInfoEnabled() ) LOGGER.logInfo ( "Bridge: linked exception is " + e.getLinkedException() );
            Stack errors = new Stack ();
            errors.push ( e );
            // throw runtime to rollback
            throw new SysException ( "Error during message processing", errors );
        }
    }
View Full Code Here


        } catch ( RollbackException rb ) {
            // impossible since this happens for 1PC only,
            // and 1PC txs are not in the log?!
            Stack errors = new Stack ();
            errors.push ( rb );
            throw new SysException ( "Error in forced commit: "
                    + rb.getMessage (), errors );
        }
    }
View Full Code Here

                throw hm;
            } catch ( SysException se ) {
                throw se;
            } catch ( Exception e ) {
                errors.push ( e );
                throw new SysException (
                        "Unexpected error: " + e.getMessage (), errors );
            }
        }

    }
View Full Code Here

        if ( transaction_.isRoot () )
            try {
                coordinator_.terminate ( false );
            } catch ( Exception e ) {
                errors.push ( e );
                throw new SysException ( "Unexpected error in rollback: "
                        + e.getMessage (), errors );
            }
    }
View Full Code Here

                    // swapped out coordinator already, OR NONEXISTENT!
                    try {
                        cc = (CoordinatorImp) recoverymanager_.recover ( root );
                    } catch ( LogException le ) {
                        errors.push ( le );
                        throw new SysException (
                                "Error in getting coordinator: "
                                        + le.getMessage (), errors );
                    }
                    if ( cc != null ) {
                        startlistening ( cc );
View Full Code Here

                // for swapping out after indoubt resolved.
            }
        } catch ( Exception e ) {
            Configuration.logWarning ( "Error in recoverCoordinators", e );
            errors.push ( e );
            throw new SysException ( "Error in recoverCoordinators: "
                    + e.getMessage (), errors );
        }

    }
View Full Code Here

                Configuration.logWarning ( "Error in recover: "
                        + e.getClass ().getName () + e.getMessage (), e );

                Stack errors = new Stack ();
                errors.push ( e );
                throw new SysException ( "Error in recovering: "
                        + e.getMessage (), errors );
            }

        }// end synchronized
View Full Code Here

       
        try {
            recoverymanager_.init ();
        } catch ( LogException le ) {
            errors.push ( le );
            throw new SysException ( "Error in init: " + le.getMessage (),
                    errors );
        }
        recoverCoordinators ();
       
        //initialized is now set in recover()
View Full Code Here

        try {
            String tid = tidmgr_.get ();
            boolean serial = context.isSerial ();
            Stack lineage = context.getLineage ();
            if ( lineage.empty () )
                throw new SysException (
                        "Empty lineage in propagation: empty lineage" );
            Stack tmp = new Stack ();

            while ( !lineage.empty () ) {
                tmp.push ( lineage.pop () );
            }

            CompositeTransaction root = (CompositeTransaction) tmp.peek ();

            while ( !tmp.empty () ) {
                lineage.push ( tmp.pop () );
            }

            CompositeTransaction parent = (CompositeTransaction) lineage
                    .peek ();
            synchronized ( shutdownWaiter_ ) {
                synchronized ( getLatch ( root.getTid () ) ) {
                    cc = getCoordinatorImp ( root.getTid () );
                    if ( cc == null ) {
                        RecoveryCoordinator coord = parent
                                .getCompositeCoordinator ()
                                .getRecoveryCoordinator ();
                        cc = createCC ( coord, root.getTid (), orphancheck,
                                heur_commit, context.getTimeOut () );
                    }
                    cc.incLocalSiblingCount (); // for detection of orphans
                }
            }
            ct = createCT ( tid, cc, lineage, serial );

        } catch ( Exception e ) {
            errors.push ( e );
            e.printStackTrace ();
            throw new SysException ( "Error in recreate.", errors );
        }

        return ct;
    }
View Full Code Here

                    }
                    //contine the loop: if not empty then wait again
                   
                } catch ( InterruptedException inter ) {
                    errors.push ( inter );
                    throw new SysException ( "Error in shutdown: "
                            + inter.getMessage (), errors );
                }
            }
            // System.err.println ( "Transaction Service: Check Done." );
            notifyListeners ( false, true );
            initialized_ = false;
            if ( !wasShuttingDown ) {
                // If we were already shutting down, then the FIRST thread
                // to enter this method will do the following. Don't do
                // it twice.

                try {
                    // System.err.println ( "Transaction Service: Closing
                    // logs..." );
                    recoverymanager_.close ();
                    // System.err.println ( "Transaction Service: Logs Closed."
                    // );
                } catch ( LogException le ) {
                    errors.push ( le );
                    le.printStackTrace();
                    throw new SysException ( "Error in shutdown: "
                            + le.getMessage (), errors );
                }
                // recoverymanager_ = null;
                // removed because repeated start/shutdown will fail cause of
                // this.
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.