Package com.sun.messaging.jmq.io

Examples of com.sun.messaging.jmq.io.PortMapperTable


            } catch (IOException e) {
                // This can sometimes fail if the server already wrote
                // the port table and closed the connection
            }

            portMapperTable = new PortMapperTable();
            portMapperTable.read(is);

            is.close();
            socket.close();
View Full Code Here


            } catch (IOException e) {
                // This can sometimes fail if the server already wrote
                // the port table and closed the connection
            }

            portMapperTable = new PortMapperTable();
            portMapperTable.read(is);

            is.close();
            socket.close();
View Full Code Here

                // we need to vaidate that there isnt a misconfiguration
                // somewhere
            try {
                String version = String.valueOf(PortMapperTable.PORTMAPPER_VERSION)
                         + "\n";
                PortMapperTable pt = new PortMapperTable();

                Socket s = new Socket(mqa.getHostName(), mqa.getPort());
                InputStream is = s.getInputStream();
                OutputStream os = s.getOutputStream();

                try {
                        os.write(version.getBytes());
                        os.flush();
                } catch (IOException e) {
                        // This can sometimes fail if the server already wrote
                        // the port table and closed the connection
                        // Ignore...
                }
                pt.read(is);

                is.close();
                os.close();
                s.close();
                PortMapperEntry pme = pt.get(PortMapper.SERVICE_NAME);

                String remotebrokerid = pme.getProperty("brokerid");

                if (mybrokerid.equals(remotebrokerid)) {
                        logger.log(Logger.ERROR, BrokerResources.E_BID_CONFLICT,
View Full Code Here

    running = true;
    bc = Globals.getConfig();
    if (!bc.getBooleanProperty("imq.portmapper.reuseAddress", true)) {
      ssf.setReuseAddress(false);
    }
    portMapTable = new PortMapperTable();
    portMapTable.setBrokerInstanceName(instance);
    portMapTable.setBrokerVersion(Globals.getVersion().getProductVersion());
    logger = Globals.getLogger();
    rb = Globals.getBrokerResources();
View Full Code Here

            os.write(version.getBytes());
            os.flush();
        } catch (IOException e) {
        }

        PortMapperTable table = new PortMapperTable();
        table.read(is);

        return table.getBrokerInstanceName();
    }
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.io.PortMapperTable

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.