Package com.sun.messaging.jmq.jmsserver.data

Examples of com.sun.messaging.jmq.jmsserver.data.TransactionUID.longValue()


                        } else if (type == AutoRollbackType.ALL) {
                            // rollback
                            String args[] = {
                                 tracker.getBrokerID(),
                                 String.valueOf(tid.longValue()),
                                 ts.toString(ts.getState()) };
                            logger.log(Logger.INFO,
                                BrokerResources.I_TAKEOVER_TXN_A_ROLLBACK,
                                args);
                            ts.setState(TransactionState.ROLLEDBACK);
View Full Code Here


                             openTxns.add(tid);
                        } else if (ts.getType() == AutoRollbackType.NOT_PREPARED
                            &&  ts.getState() < TransactionState.PREPARED) {
                            String args[] = {
                                 tracker.getBrokerID(),
                                 String.valueOf(tid.longValue()),
                                 ts.toString(ts.getState()) };
                            logger.log(Logger.INFO,
                                BrokerResources.I_TAKEOVER_TXN_P_ROLLBACK,
                                args);
                            ts.setState(TransactionState.ROLLEDBACK);
View Full Code Here

                             // add to opentxn list
                             openTxns.add(tid);
                        } else {
                            String args[] = {
                                tracker.getBrokerID(),
                                String.valueOf(tid.longValue()),
                                 ts.toString(ts.getState()) };
                            logger.log(Logger.INFO,
                                BrokerResources.I_TAKEOVER_TXN, args);
                        }
                    }
View Full Code Here

        if (id == null) {
            return;
        }

        // Convert the old ID to the corresponding new ID
        p.setTransactionID(id.longValue());
    }


    /**
     * Method to handle Transaction Messages
View Full Code Here

            // If only Xid was specified need to lookup TransactionUID
            if (messagetid == 0 && xid != null) {
                id = translist.xidToUID(xid);

                if (id != null) {
                    messagetid = id.longValue();
                } else {
                    // Hmmm...haven't seen this Xid before.
                    // XXX I18N
                    logger.log(Logger.WARNING,
                        PacketType.getString(msg.getPacketType()) +
View Full Code Here

                          PacketType.ROLLBACK_TRANSACTION ||
                       msg.getPacketType() ==
                          PacketType.COMMIT_TRANSACTION  )) {
                    if (msg.getSendAcknowledge()) {
                        sendReply(con, msg, msg.getPacketType() + 1,
                            Status.OK, id.longValue(), reason);
                        return true;
                    } else {
                        if (fi.FAULT_INJECTION) {
                            checkFIAfterProcess(msg.getPacketType());
                            checkFIAfterReply(msg.getPacketType());
View Full Code Here

                    // Only send reply if A bit is set
                    if (msg.getSendAcknowledge()) {
                        reason = "Unknown transaction " + id;
                        sendReply(con, msg, msg.getPacketType() + 1,
                        Status.NOT_FOUND, id.longValue(), reason);
                    }
                    return true;
                }
            }
        }
View Full Code Here

                    if (ex instanceof BrokerException) {
                        status = ((BrokerException)ex).getStatusCode();
                    }
                }
                sendReply(con, msg, PacketType.START_TRANSACTION_REPLY,
                            status, id.longValue(), reason);
                break;
            }

            case PacketType.END_TRANSACTION:
                try {
View Full Code Here

                } catch (Exception ex) {
                    status = Status.ERROR;
                    reason = ex.getMessage();
                    if (ex instanceof BrokerException) status = ((BrokerException)ex).getStatusCode();
                }
                sendReply(con, msg,  msg.getPacketType() + 1, status, id.longValue(), reason);
                break;
            case PacketType.PREPARE_TRANSACTION:
                BrokerException bex = null;
                try {
                    doPrepare(id, xaFlags, ts, msg.getPacketType(), jmqonephase, null);
View Full Code Here

                        status = ((BrokerException)ex).getStatusCode();
                        bex = (BrokerException)ex;
                    }
                }
                sendReply(con, msg,  msg.getPacketType() + 1, status,
                          id.longValue(), reason, bex);
                break;
            case PacketType.RECOVER_TRANSACTION:

                Vector v = null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.