##### OpenJMS

- Overview
- Downloads
- Release Notes
- Getting Started
- User Guide
  - Using OpenJMS
  - Examples
  - Client JARS
  - Connectors
    - TCP
    - TCPS
    - RMI
    - HTTP
    - HTTPS
    - Embedded
  - Administration API
- Administrator Guide
- Developer Guide
- FAQ

##### Search OpenJMS

##### Project Documentation

- About
- Project Info
- Project Reports
- Development Process

##### Legend

- External Link
- Opens in a new window

## Overview

The Embedded connector enables OpenJMS clients to connect to an embedded OpenJMS server, i.e. a server running in the same JVM as the clients.

This avoids the overhead of network serialization.

## Using the Embedded Connector

To connect to an embedded OpenJMS server, construct an InitialContext as follows:

        Hashtable properties = new Hashtable();
        properties.put(Context.INITIAL_CONTEXT_FACTORY,
                       "org.exolab.jms.jndi.InitialContextFactory");
        properties.put(Context.PROVIDER_URL, "embedded://");
        Context context = new InitialContext(properties);

## Administration using the Embedded connector

To administer an embedded OpenJMS server, construct a JmsAdminServerIfc as follows:

        String url = "embedded://";
        JmsAdminServerIfc admin = AdminConnectionFactory.create(url);