Skip Navigation Links | |
Exit Print View | |
Oracle GlassFish Server Message Queue 4.5 Developer's Guide for Java Clients |
3. Message Queue Clients: Design and Features
4. Using the Metrics Monitoring API
6. Embedding a Message Queue Broker in a Java Client
Creating, Initializing and Starting an Embedded Broker
Creating a Broker Event Listener
Arguments to Specify When Initializing an Embedded Broker
Creating a Direct Connection to an Embedded Broker
Stopping and Shutting Down an Embedded Broker
Once an embedded broker has been started, clients other than the one in which it is embedded can connect to it as though it were an ordinary standalone broker. For example:
com.sun.messaging.ConnectionFactory cf = new com.sun.messaging.ConnectionFactory(); cf.setProperty(ConnectionConfiguration.imqAddressList, "mq://myhost.example.com:7676"); Connection connection = cf.createConnection();