The TCP connector enables OpenJMS clients to connect to the OpenJMS server using TCP/IP sockets.
To connect to an OpenJMS server running on the local host, using the default TCP 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, "tcp://localhost:3035/"); Context context = new InitialContext(properties);
The Context.PROVIDER_URL property has the format:
"tcp://<server-host>:<jndi-port>/"
Where:
To administer an OpenJMS server running on the local host, using the default TCP configuration, construct a JmsAdminServerIfc as follows:
String url = "tcp://localhost:3035/"; JmsAdminServerIfc admin = AdminConnectionFactory.create(url);
The URL argument has the format:
"tcp://<server-host>:<server-port>/"
Where: