Package com.sun.messaging.bridge.service.jms.tx.log

Examples of com.sun.messaging.bridge.service.jms.tx.log.LogRecord


            throw e;
        }
        _recoveredLRs = _txlog.getAllLogRecords();
        _logger.log(Level.INFO, _jbr.getString(_jbr.I_TM_START_WITH, _tmName, String.valueOf(_recoveredLRs.size())));
        if (_logger.isLoggable(Level.FINE)) {
            LogRecord lr = null;
            Iterator<LogRecord> itr = _recoveredLRs.iterator();
            while (itr.hasNext()) {
                lr = itr.next();
                _logger.log(Level.INFO, "\t"+lr+"\n");
            }
View Full Code Here


                gxid.setFormatId(bxid.getFormatId());
                gxid.setGlobalTransactionId(gdata);
                _logger.log(Level.INFO,
                "Recovering branch "+bxid +" for global transaction "+gxid+" from RM ["+rmName+"("+rmn+")]"+xaRes);

                LogRecord lr = _txlog.getLogRecord(gxid);
                if (lr != null &&
                    (lr.getGlobalDecision() == GlobalXidDecision.COMMIT)) {
                    commit = true;
                }
                try {
                     if (lr != null && lr.isHeuristicBranch(bxid)) {
                         _logger.log(Level.WARNING,
                         "Branch "+bxid+" was heuristically completed in "+gxid+"["+commit+"]"); //XXX
                         rmNameKeepGxids.add(gxid.toString());
                         continue; //XXX
                     }
View Full Code Here

        }

        synchronized(_recoveredLRs) {

        gxid = null;
        LogRecord lr = null;
        BranchXidDecision[] bxidds = null;
        Iterator<LogRecord> itr = _recoveredLRs.iterator();
        while (itr.hasNext()) {
            lr =itr.next();
            gxid = lr.getGlobalXid().toString();
            bxidds = lr.getBranchXidDecisions();
            if (_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.INFO, "Check recovery completion for global xid "+gxid);
            }

            BranchXid bxid = null;
View Full Code Here

            rollback();
            throw new RollbackException(toString());
        }
        if (!onePhase) {
            try {
                LogRecord lr = new LogRecord(_gxid, _participants.values(),  GlobalXidDecision.COMMIT);
                _txlog.logGlobalDecision(lr);
            } catch (Throwable t) {
                setRollbackOnly();
                _logger.log(Level.SEVERE, "Unable to log commit decision "+this, t);
                rollback();
                RollbackException ex = new RollbackException(toString()+": "+t.getMessage());
                ex.initCause(t);
                throw ex;
            }
            _status = Status.STATUS_PREPARED;
       
        _status = Status.STATUS_COMMITTING;
        Exception ex = null;
        XAParticipant party = null;
        boolean committedOne = false;
        for (Map.Entry<XAResource, XAParticipant> pair: _participants.entrySet()) {
            party= pair.getValue();
            try {
                party.commit(onePhase);
                committedOne = true;
            } catch (IllegalStateException e) {
                if (!committedOne) throw e;
                ex = e;
                continue;
            } catch (RollbackException e) {
                if (!onePhase) {
                    _logger.log(Level.SEVERE,
                    "Unexpected RollbackException on 2-phase commit from "+party, e);
                    ex = new HeuristicMixedException(e.getMessage());
                    ex.initCause(e);
                    continue;
                } else {
                    throw e;
                }
            } catch (HeuristicCommitException e) {
                try {
                LogRecord lr = new LogRecord(_gxid, _participants.values(), GlobalXidDecision.COMMIT);
                BranchXid bxid = party.getBranchXid();
                lr.setBranchHeurCommit(bxid);
                _txlog.logHeuristicBranch(bxid, lr);
                } catch (Throwable t) {
                _logger.log(Level.WARNING, "Unable to log heuristic commit from "+party, t);
                }
                continue;
            } catch (HeuristicMixedException e) {
                ex = e;
                try {
                LogRecord lr = new LogRecord(_gxid, _participants.values(), GlobalXidDecision.COMMIT);
                BranchXid bxid = party.getBranchXid();
                lr.setBranchHeurMixed(bxid);
                _txlog.logHeuristicBranch(bxid, lr);
                } catch (Throwable t) {
                _logger.log(Level.WARNING, "Unable to log heuristic mixed from "+party, t);
                }
                continue;
            } catch (HeuristicRollbackException e) {
                ex = e;
                try {
                LogRecord lr = new LogRecord(_gxid, _participants.values(), GlobalXidDecision.COMMIT);
                BranchXid bxid = party.getBranchXid();
                lr.setBranchHeurRollback(bxid);
                _txlog.logHeuristicBranch(bxid, lr);
                } catch (Throwable t) {
                _logger.log(Level.WARNING, "Unable to log heuristic rollback from "+party, t);
                }
                continue;
View Full Code Here

                ex.initCause(e);
                continue;
            } catch (HeuristicCommitException e) {
                ex = e;
                try {
                LogRecord lr = new LogRecord(_gxid, _participants.values(), GlobalXidDecision.ROLLBACK);
                BranchXid bxid = party.getBranchXid();
                lr.setBranchHeurCommit(bxid);
                _txlog.logHeuristicBranch(bxid, lr);
                } catch (Throwable t) {
                _logger.log(Level.WARNING, "Unable to log heuristic commit from "+party, t);
                }
                continue;
            } catch (HeuristicRollbackException e) {
                try {
                LogRecord lr = new LogRecord(_gxid, _participants.values(), GlobalXidDecision.ROLLBACK);
                BranchXid bxid = party.getBranchXid();
                lr.setBranchHeurRollback(bxid);
                _txlog.logHeuristicBranch(bxid, lr);
                } catch (Throwable t) {
                _logger.log(Level.WARNING, "Unable to log heuristic rollback from "+party, t);
                }
                continue;
            } catch (HeuristicMixedException e) {
                ex = e;
                try {
                LogRecord lr = new LogRecord(_gxid, _participants.values(), GlobalXidDecision.ROLLBACK);
                BranchXid bxid = party.getBranchXid();
                lr.setBranchHeurMixed(bxid);
                _txlog.logHeuristicBranch(bxid, lr);
                } catch (Throwable t) {
                _logger.log(Level.WARNING, "Unable to log heuristic mixed from "+party, t);
                }
                continue;
View Full Code Here

TOP

Related Classes of com.sun.messaging.bridge.service.jms.tx.log.LogRecord

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.