cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <>
Subject Either my new JMS sample is confused or I am ...
Date Wed, 15 Sep 2010 18:33:47 GMT
This is from the java_first_jms sample that I cleaned up. Why is the URL in
the server factory trivial? Why doesn't it need to state the host and the
port? Is 61616 some sort of a default?

Also, how would this look using the JAX-WS Endpoint class?

 boolean amqBroker = args.length > 0 && "-activemqbroker".equals(args[0]);
        if (amqBroker) {
             * The following make it easier to run this against something
other than ActiveMQ. You will have
             * to get a JMS broker onto the right port of localhost.
            Class<?> brokerClass = ServerJMS.class.getClassLoader()
            if (brokerClass == null) {
                System.err.println("ActiveMQ is not in the classpath, cannot
launch broker.");
            Object broker = brokerClass.newInstance();
            Method addConnectorMethod =
brokerClass.getMethod("addConnector", String.class);
            addConnectorMethod.invoke(broker, "tcp://localhost:61616");
            Method startMethod = brokerClass.getMethod("start");

        Object implementor = new HelloWorldImpl();
        JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();

        System.out.println("Server ready... Press any key to exit");;
        System.out.println("Server exiting");

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message