Package com.atomikos.persistence

Examples of com.atomikos.persistence.LogException


            throw le;
        } catch ( Exception e ) {

            // bad exit condition
            errors.push ( e );
            throw new LogException ( e.getMessage (), errors );

        }// catch

        finally {
            initialized_ = true;
View Full Code Here


    {
        Stack errors = new Stack ();
        Vector hist = new Vector ();

        if ( !initialized_ )
            throw new LogException ( "Not initialized" );
        Enumeration enumm = logTable_.elements ();

        while ( enumm.hasMoreElements () ) {
            SystemLogImage next = (SystemLogImage) enumm.nextElement ();
View Full Code Here

        if ( img == null )
            return;

        // test if last checkpoint was written ok.
        if ( panic_ )
            throw new LogException ( "StreamObjectLog: PANIC" );

        try {

            try {
                logstream_.flushObject ( img , shouldSync );
                writeCheckpoint ();
                // fout_.flush();
            } catch ( LogException ioerr ) {
                ioerr.printStackTrace ();
                errors.push ( ioerr );
                // make sure that logfile remains in consistent state by
                // checkpointing
                try {
                    logstream_.writeCheckpoint ( logTable_.elements () );
                } catch ( Exception e ) {
                    errors.push ( e );
                }
                throw new LogException ( ioerr.getMessage (), errors );
            }

            // replace/add local tid status in logTable_.
            // for Checkpointing!

            if ( img.isForgettable () ) {
                if ( logTable_.containsKey ( img.getId () ) ) {
                    // to avoid that logTable_ keeps growing!
                    logTable_.remove ( img.getId () );
                    size_--;
                }

            } else {
                if ( !logTable_.containsKey ( img.getId () ) ) {
                    size_++;
                }
                logTable_.put ( img.getId (), img );

            }

        }// try
        catch ( LogException le ) {
            System.err.println ( "Error in StreamObjectLog.flush() "
                    + le.getMessage () );
            throw le;
        } catch ( Exception e ) {

            System.err.println ( "Error in StreamObjectLog.flush() "
                    + e.getMessage () );

            errors.push ( e );
            throw new LogException ( e.getMessage (), errors );
        }// catch
    }
View Full Code Here

        } catch ( LogException le ) {
            throw le;
        } catch ( Exception e ) {
          e.printStackTrace();
            errors.push ( e );
            throw new LogException ( e.getMessage (), errors );
        }
    }
View Full Code Here

TOP

Related Classes of com.atomikos.persistence.LogException

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.