Package com.sun.messaging.jmq.util

Examples of com.sun.messaging.jmq.util.UID


                 throw new IllegalAccessException(
                 "Can not update entry " + " for broker " + brokerid);
             }

             Store store = Globals.getStore();
             UID ssid = store.updateBrokerInfo(brokerid, updateType, oldValue, newValue);
             try {
                 heartbeat = store.getBrokerHeartbeat(brokerid);
             } catch (Exception ex) {
                 logger.logStack(logger.WARNING, ex.getMessage()+"["+brokerid+"]", ex);
             }
View Full Code Here


   
    public UID getMessageStoreSessionUID() {
        assert ( pkt != null );
        Long ssid = (Long)pkt.getProp("messageStoreSession");
        if (ssid == null) return null;
        return new UID(ssid.longValue());
    }
View Full Code Here

    public UID getMessageBrokerSessionUID() {
        assert ( pkt != null );
        Long bsid = (Long)pkt.getProp("messageBrokerSession");
        if (bsid == null) return null;
        return new UID(bsid.longValue());
    }
View Full Code Here

    }

    public BrokerAddress getCurrentBrokerAddress() {
        if (!Globals.getHAEnabled()) return getBrokerAddress();
        String brokerid = null;
        UID ss = broker.getStoreSessionUID();
        if (ss == null) return null;
        brokerid = Globals.getClusterManager().lookupStoreSessionOwner(ss);
        if (brokerid == null) return null;
        if (brokerid.equals(Globals.getMyAddress().getBrokerID())) {
            return Globals.getMyAddress();
View Full Code Here

        return Globals.getClusterBroadcast().lookupBrokerAddress(brokerid);
    }

    public boolean isSame(UID ssid) {
        if (!Globals.getHAEnabled()) return false;
        UID ss = broker.getStoreSessionUID();
        if (ss.equals(ssid)) return true;
        return false;
    }
View Full Code Here

       synchronized (allBrokers) {
           Iterator itr = allBrokers.values().iterator();
           while (itr.hasNext()) {
           
               ClusteredBroker cb = (ClusteredBroker)itr.next();
               UID buid = cb.getBrokerSessionUID();
               if (buid.equals(uid))
                   return cb.getBrokerName();
           }
       }
       return null;
   }
View Full Code Here

            logger.logStack(Logger.ERROR, Globals.getBrokerResources().getKString(
                BrokerResources.X_BAD_ADDRESS_BROKER_LIST, ex.toString()), ex);
            throw new BrokerException(ex.getMessage(), ex);
        }
       
        localBroker =  addBroker(address, true, s.remove(address), new UID() );
        getLocalBroker().setStatus(BrokerStatus.ACTIVATE_BROKER, null);

        // handle broker list

View Full Code Here

         * @see ConfigListener
         */
        public void setStatus(int newstatus, Object userData)
        {
            Integer oldstatus = null;
            UID uid = null;

            // ok - for standalone case, adjust so that LINK_DOWN=DOWN
            if (BrokerStatus.getBrokerIsDown(newstatus))
                newstatus = BrokerStatus.setBrokerLinkIsDown(newstatus);
            else if (BrokerStatus.getBrokerLinkIsDown(newstatus))
View Full Code Here

         * @param up setting for the bit flag (true/false)
         */
        public void setBrokerIsUp(boolean up, UID brokerSession, Object userData)
        {
       
            UID uid = brokerSession;
            Integer oldstatus = null;
            Integer newstatus = null;
            synchronized (this) {
                if (!up && !uid.equals(getBrokerSessionUID())) {
                    logger.log(logger.INFO, br.getKString(
                        BrokerResources.I_DOWN_STATUS_ON_BROKER_SESSION,
                        "[BrokerSession:"+uid+"]", this.toString()));
                    oldstatus = new Integer(BrokerStatus.BROKER_INDOUBT);
                    newstatus = BrokerStatus.setBrokerIsDown(oldstatus);
View Full Code Here

        {
            // on non-HA clusters status should always be set to UP if
            // LINK_UP
       
            Integer oldstatus = null;
            UID uid = null;
            synchronized (this) {
                oldstatus = this.status;
                uid = getBrokerSessionUID();

                int newStatus = 0;
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.util.UID

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.