Examples of BrokerInfo


Examples of com.sun.messaging.jmq.jmsserver.multibroker.BrokerInfo

            conn.close();
            return;
        }

        BrokerInfo bi = (BrokerInfo)parent.receivePacket(remote, p, getRealRemoteString(), this);
        if (bi == null) {
            logger.log(logger.DEBUG, "Link = " + this + ", BROKER_INFO rejected");
            throw new IOException("BrokerInfo rejected");
        }

        expectBrokerInfoPkt = false;

        Integer v = bi.getClusterProtocolVersion();
        if (v != null && v.intValue() >= ProtocolGlobals.VERSION_400) {
            com.sun.messaging.jmq.jmsserver.core.BrokerAddress configServer = null;
            try {
                configServer = parent.getConfigServer();
            } catch (Exception e) {
                conn.close();
                logger.log(logger.DEBUG,
                "Exception in getConfigServer: "+e.getMessage()+", link "+this);
                return;
            }
            if (parent.waitForConfigSync() &&
                !configServer.equals(bi.getBrokerAddr())) {
                if (ClusterManagerImpl.DEBUG_CLUSTER_CONN || ClusterManagerImpl.DEBUG_CLUSTER_PACKET || DEBUG) {
                logger.log(logger.INFO, "Waiting for sync with master broker "+configServer+", Please retry  "+this);
                }
                conn.close();
                return;
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.multibroker.BrokerInfo

                res.brokerRemoved(broker);
            }
        }

        if (brokerInfoEx == null) return;
        BrokerInfo brokerInfo = brokerInfoEx.getBrokerInfo();

        try {

        if (brokerInfoEx.getBrokerInfo().getBrokerAddr().getHAEnabled()) {
           Globals.getClusterManager().deactivateBroker(
                   brokerInfo.getBrokerAddr().getBrokerID(),
                   brokerInfo.getBrokerAddr().getBrokerSessionUID());
        } else {
           Globals.getClusterManager().deactivateBroker(
                   brokerInfo.getBrokerAddr().getMQAddress(),
                   brokerInfo.getBrokerAddr().getBrokerSessionUID());
        }
        logger.log(Logger.INFO, br.getKString(br.I_CLUSTER_DEACTIVATED_BROKER, brokerInfo));

        } catch (NoSuchElementException e) { /* Ignore */
        if (DEBUG) {
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.multibroker.BrokerInfo

    /**
     * Construct the Packet.BROKER_INFO packet.
     */
    protected Packet getBrokerInfoPkt() {
        // Get the BrokerInfo object from MessageBus...
        BrokerInfo selfInfo = cb.getBrokerInfo();

        ByteArrayOutputStream bos = new ByteArrayOutputStream();

        try {
            ObjectOutputStream oos = new ObjectOutputStream(bos);
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.multibroker.BrokerInfo

    /**
     * Receive and process the BROKER_INFO packet.
     */
    private BrokerInfo receiveBrokerInfo(BrokerAddressImpl sender, byte[] pkt, String realRemote, BrokerLink l) {
        ByteArrayInputStream bis = new ByteArrayInputStream(pkt);
        BrokerInfo info = null;

        try {
            ObjectInputStream ois = new ObjectInputStream(bis);
            info = (BrokerInfo) ois.readObject();
            info.setRealRemoteString(realRemote);
        }
        catch (Exception e) {
            logger.log(Logger.WARNING, br.W_MBUS_SERIALIZATION, sender);

            if (l != null) l.shutdown();
            return null;
        }

        Integer v = info.getClusterProtocolVersion();
        if (v != null && v.intValue() >= ProtocolGlobals.VERSION_400) return info;

        if (l != null) l.handshakeSent();

        int status = cb.addBrokerInfo(info);
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.multibroker.BrokerInfo

        return null;

    }

    private void receiveBrokerInfoReply(BrokerAddressImpl sender, GPacket gp, String realRemote) {
        BrokerInfo info = null;
        try {
            ClusterBrokerInfoReply cbi = ClusterBrokerInfoReply.newInstance(gp);
            info = cbi.getBrokerInfo();
            info.setRealRemoteString(realRemote);
            if (DEBUG) {
            logger.log(Logger.DEBUG, "Received BROKER_INFO_REPLY from "+sender);
            }
            if (!info.getBrokerAddr().equals(sender)) {
                logger.log(Logger.ERROR, BrokerResources.E_INTERNAL_BROKER_ERROR,
                       "mismatched BROKER_INFO ("+info.getBrokerAddr()+") from "+sender);
                throw new BrokerException("mismatched BROKER_INFO");
            }
            if (Globals.getHAEnabled() && cbi.isTakingover()) {
                String msg = br.getKString(BrokerResources.E_CLUSTER_TAKINGOVER_NOTIFY_RESTART, sender);
                BrokerException ex = new BrokerException(msg);
View Full Code Here

Examples of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerInfo

     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataByteArrayInputStream dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

        BrokerInfo info = (BrokerInfo)o;
        info.setBrokerId((BrokerId)looseUnmarsalCachedObject(wireFormat, dataIn));
        info.setBrokerURL(looseUnmarshalString(dataIn));

        if (dataIn.readBoolean()) {
            short size = dataIn.readShort();
            BrokerInfo value[] = new BrokerInfo[size];
            for( int i=0; i < size; i++ ) {
                value[i] = (BrokerInfo)looseUnmarsalNestedObject(wireFormat,dataIn);
            }
            info.setPeerBrokerInfos(value);
        }
View Full Code Here

Examples of org.activemq.message.BrokerInfo

     * @param container
     * @param serverChannel
     */
    public BrokerConnectorImpl(BrokerContainer container, TransportServerChannel serverChannel) {
        assert container != null;
        this.brokerInfo = new BrokerInfo();
        this.brokerInfo.setBrokerName(container.getBroker().getBrokerName());
        this.brokerInfo.setClusterName(container.getBroker().getBrokerClusterName());
        this.log = LogFactory.getLog(getClass().getName());
        this.serverChannel = serverChannel;
        this.container = container;
View Full Code Here

Examples of org.activemq.message.BrokerInfo

        fac.setTurboBoost(true);
        remoteConnection = new ActiveMQConnection(fac, remoteUserName, remotePassword, channel);
        remoteConnection.setClientID("Boondocks:" + remoteClusterName + ":" + remoteBrokerName);
        remoteConnection.setQuickClose(true);
        remoteConnection.start();
        BrokerInfo info = new BrokerInfo();
        info.setBrokerName(brokerContainer.getBroker().getBrokerName());
        info.setClusterName(brokerContainer.getBroker().getBrokerClusterName());
        channel.asyncSend(info);
        remote = true;
    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.BrokerInfo

    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new BrokerInfo();
    }
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

    @SuppressWarnings("unchecked")
    public void purge(PortletRequest portletRequest, JMSDestinationInfo destinationInfo) throws JMSException {
        try {
            if (destinationInfo.getType().equals(DestinationType.Queue)) {
                BrokerInfo brokerInfo = getBrokerInfo(portletRequest, destinationInfo);
                if (brokerInfo == null || !isInLocalMBeanServer(brokerInfo)) {
                    throw new JMSException("Currently, only queue belong to local broker is supported");
                }
                MBeanServer server = getMBeanServer();
                ObjectName destinationObjectName = createDestinationObjectName(brokerInfo.getBrokerName(), destinationInfo.getType().name(), destinationInfo.getPhysicalName());
                QueueViewMBean proxy;
                if (!server.isRegistered(destinationObjectName)) {
                    // mbean is not yet registered.Adding the destination to activemq broker.
                    ObjectName brokerObjectName = createBrokerObjectName(brokerInfo.getBrokerName());
                    Set set = server.queryMBeans(brokerObjectName, null);
                    Iterator it = set.iterator();
                    if (it.hasNext()) {
                        ObjectInstance instance = (ObjectInstance) it.next();
                        brokerObjectName = instance.getObjectName();
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.