OverviewThe TCPS connector enables OpenJMS clients to connect to the OpenJMS server using SSL (Secure Socket Layer). Using the TCPS connectorBefore the TCPS connector can be used, the Secure Socket Layer (SSL) needs to be initialised: System.setProperty("javax.net.ssl.trustStore", "<client-keystore>"); System.setProperty("javax.net.ssl.keyStore", "<client.keystore>"); System.setProperty("javax.net.ssl.keyStoreType", "jks"); System.setProperty("javax.net.ssl.keyStorePassword", "<keystore-password>"); Where:
To connect to an OpenJMS server running on the local host, using the
default TCPS configuration, construct an
Hashtable properties = new Hashtable(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.exolab.jms.jndi.InitialContextFactory"); properties.put(Context.PROVIDER_URL, "tcps://localhost:3035/"); Context context = new InitialContext(properties);
The JNDI
"tcps://<server-host>:<jndi-port>/" Where:
Administration using the TCPS connector
To administer an OpenJMS server running on the local host, using
the default TCPS configuration, construct a
String url = "tcps://localhost:3031/"; JmsAdminServerIfc admin = AdminConnectionFactory.create(url); The URL argument has the format: "tcps://<server-host>:<server-port>/" Where:
See AlsoFor more information on the client certificate keystore, see Creating OpenJMS client certificate keystores |