##### 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 HTTPS connector enables OpenJMS clients to connect to the OpenJMS server using secure HTTP.

This is typically used when firewall restrictions prevent the use of the RMI, TCP, and TCPS connectors.

## Using the HTTPS connector

Clients connect to the OpenJMS server via a webserver. To connect to OpenJMS via a webserver running on the local host, using the default HTTPS configuration, 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, "https://localhost:443/");
        properties.put("org.exolab.jms.net.https.keyStore", "<keystore>");
        properties.put("org.exolab.jms.net.https.keyStorePassword", "<password>");
        properties.put("org.exolab.jms.net.https.trustStore", "<keystore>");
        Context context = new InitialContext(properties);

Where:

- keystore specifies the path to the client certificate keystore.
- password specifies the password of the client certificate keystore.

The Context.PROVIDER_URL property has the format:

    "http://<webserver-host>:<webserver-port>/"

Where:

- webserver-host specifies the host of the webserver running the OpenJMS servlet.
- webserver-port specifies the port that the OpenJMS servlet is listening on.

### Connection properties

The HTTPS connector supports the following connection properties:

Name | Description
--- | ---
"org.exolab.jms.net.https.keyStore" | The path of the keystore to use. If not specified, indicates to use the default keystore. Synonymous with the "javax.net.ssl.keyStore" System property.
"org.exolab.jms.net.https.keyStorePassword" | The keystore password. If not specified, indicates to use the default password. Synonymous with the "javax.net.ssl.keyStorePassword" System property.
"org.exolab.jms.net.https.keyStoreType" | The keystore type. If not specified, defaults to "JKS". Synonymous with the "javax.net.ssl.keyStoreType" System property.
"org.exolab.jms.net.https.trustStore" | The path of the truststore to use. If not specified, indicates to use the default truststore. Synonymous with the "javax.net.ssl.trustStore" System property.
"org.exolab.jms.net.https.trustStorePassword" | The truststore password. If not specified, indicates to use the default password. Synonymous with the "javax.net.ssl.trustStorePassword" System property.
"org.exolab.jms.net.https.trustStoreType" | The truststore type. If not specified, defaults to "JKS". Synonymous with the "javax.net.ssl.trustStoreType" System property.
"org.exolab.jms.net.https.proxyHost" | Indicates the proxy server to use. Synonymous with the "https.proxyHost" System property.
"org.exolab.jms.net.https.proxyPort" | Indicates the port of the proxy server. Synonymous with the "https.proxyPort" System property.
"org.exolab.jms.net.https.proxyUser" | Indicates the user to log in to the proxy server with.
"org.exolab.jms.net.https.proxyPassword" | Indicates the password to log in to the proxy server with.

## Administration using the HTTPS connector

To administer an OpenJMS server via the webserver running on the local host, using the default HTTPS configuration, construct a JmsAdminServerIfc as follows:

        String url = "https://localhost:443/";
        JmsAdminServerIfc admin = AdminConnectionFactory.create(url);

The URL argument has the same format as the Context.PROVIDER_URL described in Using the HTTPS connector