Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 13 Using the EMS Implementation of JNDI : Creating and Modifying Administered Objects in EMS

Creating and Modifying Administered Objects in EMS
You can create administered objects for storage in EMS using either the administration tool or the administration APIs, or directly in the configuration files. This section describes how to create administered objects using the administration tool.
To create a connection factory, use the create factory command in the EMS Administration Tool. For example, to create a generic connection factory, named myFactory, that establishes a TCP connection to port 7344 on server1, start the EMS Administration Tool and enter:
   create factory myFactory generic URL=tcp://server1:7344
The connection factory data stored on the EMS server is located in the factories.conf file. You can use the show factories command to list all of the connection factories on your EMS server and the show factory command to show the configuration details of a specific connection factory.
A connection factory may include optional properties for balancing server load and establishing thresholds for attempted connections, as described in Connection Factory Parameters. These properties can be specified when creating the factory or modified for an existing factory using the addprop factory, setprop factory, and removeprop factory commands.
For example, to set the maximum number of connection attempts for the connection factory, myFactory, from the default value of 2 to 5, start the EMS Administration Tool and enter:
   addprop factory myFactory connect_attempt_count=5
And to reset the value back to 2, enter:
   setprop factory myFactory connect_attempt_count=2
Creating Connection Factories for Secure Connections
This section describes how to create a static connection factory for establishing an SSL connection. Similar SSL parameters must be used when looking up the connection factory, as described in Performing Secure Lookups.
Connections that are to be secured using SSL identify the transport protocol as ’ssl’ and may include any number of the SSL configuration parameters listed in SSL Server Parameters.
For example, to create a generic connection factory, named mySecureFactory, that establishes a SSL connection to port 7243 on server1, start the EMS Administration Tool and enter:
create factory mySecureFactory generic URL=ssl://server1:7243
To create a factory to set up a generic connection and check the server's certificate to confirm the name of the server is myServer, enter (all one line):
create factory MySSLFactory generic url=ssl://7243 ssl_verify_host=enabled ssl_expected_hostname=myServer ssl_trusted=certs/server_root.cert.pem
To create a factory to set up a topic connection, check the server's certificate (but not the name inside the certificate), and to set the ssl_auth_only parameter so that SSL is only used by the client when creating the connection, enter (all one line):
create factory AnotherSSLFactory topic url=ssl://7243 ssl_verify_host=enabled ssl_verify_hostname=disabled ssl_trusted=certs/server_root.cert.pem ssl_auth_only=enabled
These samples assume that the certificate server_root.cert.pem is located in "certs" subdirectory of the directory where the server is running.
See Chapter 19, Using the SSL Protocol for details.
Creating Connection Factories for Fault-Tolerant Connections
When connecting a fault-tolerant client to EMS, you must specify two or more EMS servers in your connection factory. When creating a connection factory for a fault-tolerant client, specify multiple server URLs in the url argument of the create factory command.
For example, to create a generic connection factory, named myFtFactory, that establishes TCP connections to port 7545 on the primary server, server0, and port 7344 on the secondary server, server1, start the EMS Administration Tool and enter (on one line):
   create factory myFtFactory generic url=tcp://server0:7545,    tcp://server1:7344
Should server0 become unavailable, the client will connect to server1. See Chapter 20, Fault Tolerance for details.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved