JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server Message Queue 4.5 Developer's Guide for Java Clients
search filter icon
search icon

Document Information

Preface

1.  Overview

2.  Using the Java API

3.  Message Queue Clients: Design and Features

4.  Using the Metrics Monitoring API

5.  Working with SOAP Messages

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

Creating a TCP Connection to an Embedded Broker

Stopping and Shutting Down an Embedded Broker

Embedded Broker Example

A.  Warning Messages and Client Error Codes

Index

Chapter 6

Embedding a Message Queue Broker in a Java Client

Message Queue supports running a broker from within a Java client. Such a broker, called an embedded broker, runs in the same JVM as the Java client that creates and starts it.

Beyond operating like a normal standalone broker, an embedded broker offers the application in which it is embedded access to a special kind of connection called a direct mode connection. Direct mode connections are used just like ordinary connections, but they are much higher performing because they use in-memory transport instead of TCP. To specify a direct mode connection, the client specifies mq://localhost/direct as the broker address in the connection factory from which it subsequently creates the connection.

The following sections provide more information about creating and managing embedded brokers: