Examples of logToAll()


Examples of com.sun.messaging.jmq.util.log.Logger.logToAll()

                                     String fileName, boolean throwEx)
                                     throws BrokerException {

        Logger logger = Globals.getLogger();
        if (DEBUG) {
            logger.logToAll(Logger.INFO, "ChangeRecord.backup("+fileName+")");
        }

        BrokerResources br = Globals.getBrokerResources();
        int loglevel = (throwEx ? Logger.ERROR:Logger.WARNING);
View Full Code Here

Examples of com.sun.messaging.jmq.util.log.Logger.logToAll()

        try {
            // Make sure that the file does not exist.
            File f = new File(fileName);
            if (!f.createNewFile()) {
                String emsg = br.getKString(br.W_MBUS_CANCEL_BACKUP2, fileName);
                logger.logToAll(loglevel, emsg);
                if (throwEx) {
                    throw new BrokerException(emsg);
                }
                return;
            }
View Full Code Here

Examples of com.sun.messaging.jmq.util.log.Logger.logToAll()

            ChangeRecordInfo cri = makeResetRecord(true);
            byte[] rst = cri.getRecord();
            dos.writeInt(rst.length);
            dos.write(rst, 0, rst.length);
            if (DEBUG) {
                logger.logToAll(Logger.INFO, "ChangeRecord.backupRecords backup record "+cri);
            }

            ChangeRecord cr = null;
            for (int i = 0; i < recordList.size(); i++) {
                cr = recordList.get(i);
View Full Code Here

Examples of com.sun.messaging.jmq.util.log.Logger.logToAll()

                    byte[] rec = cr.getBytes();

                    dos.writeInt(rec.length);
                    dos.write(rec, 0, rec.length);
                    if (DEBUG) {
                        logger.logToAll(Logger.INFO, "ChangeRecord.backupRecords() backup record "+cr);
                    }
                }
            }
            dos.writeInt(0);
            logger.logToAll(Logger.INFO, br.I_CLUSTER_MB_BACKUP_SUCCESS, fileName);
View Full Code Here

Examples of com.sun.messaging.jmq.util.log.Logger.logToAll()

                        logger.logToAll(Logger.INFO, "ChangeRecord.backupRecords() backup record "+cr);
                    }
                }
            }
            dos.writeInt(0);
            logger.logToAll(Logger.INFO, br.I_CLUSTER_MB_BACKUP_SUCCESS, fileName);
        }
        catch (Exception e) {
            String emsg = br.getKString(br.W_MBUS_BACKUP_ERROR, e.getMessage());
            logger.logStack((throwEx ? Logger.ERROR:Logger.WARNING), emsg, e);
            if (throwEx) {
View Full Code Here

Examples of com.sun.messaging.jmq.util.log.Logger.logToAll()

                throw new BrokerException(emsg);
            }
        }

        if (DEBUG) {
            logger.logToAll(Logger.INFO, "ChanageRecord.backup complete");
        }
    }

    public static ArrayList<ChangeRecord> compressRecords(List<ChangeRecordInfo> records)
    throws Exception {
View Full Code Here

Examples of com.sun.messaging.jmq.util.log.Logger.logToAll()

        ArrayList<ChangeRecord> recordList = new ArrayList<ChangeRecord>();
        HashMap recordMap = new HashMap();

        Logger logger = Globals.getLogger();
        if (DEBUG) {
            logger.logToAll(Logger.INFO,
            "ChangeRecord.compressRecords: compress " + records.size() + " change records");
        }

        for (int i = 0; i < records.size(); i++) {
            byte[] rec = records.get(i).getRecord();
View Full Code Here

Examples of com.sun.messaging.jmq.util.log.Logger.logToAll()

        for (int i = 0; i < records.size(); i++) {
            byte[] rec = records.get(i).getRecord();
            ChangeRecord cr = makeChangeRecord(rec, records.get(i).getUUID());

            if (DEBUG) {
                logger.logToAll(Logger.INFO, "ChangeRecord.compressRecords: #"+ i+" "+
                                records.get(i)+" "+
                                ProtocolGlobals.getPacketTypeString(cr.getOperation()) +
                                " key=" + cr.getUniqueKey());
            }
View Full Code Here

Examples of com.sun.messaging.jmq.util.log.Logger.logToAll()

            ChangeRecord prev = (ChangeRecord)recordMap.get(cr.getUniqueKey());
            if (prev != null) {
                prev.setDiscard(true);

                if (DEBUG) {
                    logger.logToAll(Logger.INFO,
                        ">>>>ChangeRecord.compressRecords: discard previous record " +
                        ProtocolGlobals.getPacketTypeString(prev.getOperation()) +
                        " key=" + cr.getUniqueKey() );
                }
            }
View Full Code Here

Examples of com.sun.messaging.jmq.util.log.Logger.logToAll()

            // Keep only the last add operation.
            if (cr.isAddOp() != true) {
                cr.setDiscard(true);

                if (DEBUG) {
                    logger.logToAll(Logger.INFO,
                    ">>>>ChangeRecord.compressRecords: discard this non-add record ");
                }
            }
            recordMap.put(cr.getUniqueKey(), cr);
      }
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.