Package com.atomikos.icatch

Examples of com.atomikos.icatch.HeurHazardException


    protected HeuristicMessage[] rollback () throws HeurCommitException,
            HeurMixedException, SysException, HeurHazardException,
            java.lang.IllegalStateException
    {

        throw new HeurHazardException ( getHeuristicMessages () );
    }
View Full Code Here


            // here, participant might be indoubt!
            StringHeuristicMessage shm = new StringHeuristicMessage (
                    "Possibly heuristic participant: " + part.toString () );
            HeuristicMessage[] msgs = new HeuristicMessage[1];
            msgs[0] = shm;
            HeurHazardException heurh = new HeurHazardException ( msgs );
            throw new PropagationException ( heurh, false );

        }
        return result;
    }
View Full Code Here

            // only retry if might be indoubt. Otherwise ignore.
            if ( indoubt_ ) {
                // here, participant might be indoubt!
                // fill in exact heuristic msgs by using buffered effect
                // of proxies
                HeurHazardException heurh = new HeurHazardException ( part
                        .getHeuristicMessages () );
                throw new PropagationException ( heurh, true );
            }
        }
        return msgs;
View Full Code Here

                    addMessages ( hc.getHeuristicMessages () );
                    heurmixed = (heurmixed || heurhazards);
                } else if ( err instanceof HeurHazardException ) {
                    heurhazards = true;
                    heurmixed = (heurmixed || heurcommits);
                    HeurHazardException hr = (HeurHazardException) err;
                    indoubts_.put ( reply.getParticipant (),
                            new Boolean ( true ) );
                    // REMEMBER: might be indoubt, so HAS to be notified
                    // during rollback!
                    addMessages ( hr.getHeuristicMessages () );
                }

            }// if failed

            else {
View Full Code Here

            // heuristic hazard or not, participant might be indoubt.
            // fill in exact heuristic messages by using buffer effect
            // of participant proxies.
            String msg = "Unexpected error in commit";
            Configuration.logWarning ( msg, e );
            HeurHazardException heurh = new HeurHazardException ( part
                    .getHeuristicMessages () );
            throw new PropagationException ( heurh, true );
        }
    }
View Full Code Here

        // therefore, this prepare call is NOT allowed to return anything else
        // then a
        // heuristic hazard exception.
        // thus, no matter what the heuristic really is, report it as hazard.

        throw new HeurHazardException ( getHeuristicMessages () );
    }
View Full Code Here

                            addToHeuristicMap ( p, TxState.TERMINATED );
                    }
                    nextStateHandler = new HeurHazardStateHandler ( this,
                            hazards );
                    coordinator_.setStateHandler ( nextStateHandler );
                    throw new HeurHazardException ( getHeuristicMessages () );
                }

            } else {
                // all OK
                if ( heuristic ) {
View Full Code Here

                        }
                    }
                    nextStateHandler = new HeurHazardStateHandler ( this,
                            hazards );
                    coordinator_.setStateHandler ( nextStateHandler );
                    throw new HeurHazardException ( getHeuristicMessages () );
                }
            }

            else {
                // all answers OK
View Full Code Here

        try {
            connection.transactionTerminated ( true );
        } catch ( Exception e ) {
            LOGGER.logWarning ( "Error in non-XA commit", e );
            throw new HeurHazardException ( getHeuristicMessages () );
        }

        return getHeuristicMessages ();
    }
View Full Code Here

        if ( !recovered ) {
            try {
                connection.transactionTerminated ( false );
            } catch ( Exception e ) {
                LOGGER.logWarning ( "Error in non-XA rollback", e );
                throw new HeurHazardException ( getHeuristicMessages () );
            }
        }
        return getHeuristicMessages ();
    }
View Full Code Here

TOP

Related Classes of com.atomikos.icatch.HeurHazardException

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.