The JMSSampleAdmin application

The JMSSampleAdmin application provides a sample tool for creating Eclipse Amlen administered objects for JMS. It demonstrates how to use ImaJmsFactory to create objects, and how to use ImaProperties to configure objects.

The JMSSampleAdmin application is in the com.ibm.ima.samples.jms package. You can use the JMSSampleAdmin application to create, configure, and store JMS administered objects for Eclipse Amlen. The application reads Eclipse Amlen JMS administered object configurations from an input file and populates a JNDI repository. This application can populate either LDAP or file-based JNDI repositories.

You can run the JMSSampleAdmin application by using the following command:
java com.ibm.ima.samples.jms.JMSSampleAdmin [options] [configfile]
Where:
options
are any combination of the following command-line options:
-c
The JNDI provider URL.
The JMSSampleAdmin application supports file system JNDI by using the file: scheme and also supports LDAP JNDI by using the ldap: scheme.

In the following example, administered objects are created in a file system JNDI repository by using input from AdminObjects.config. The subdirectory or folder that is named MyJndi must exist.
java com.ibm.ima.samples.jms.JMSSampleAdmin -c file:///c:/test/MyJndi c:\test\AdminObjects.config

In the following example, the objects from an existing LDAP JNDI repository on host myldaphost are printed to the console.

java com.ibm.ima.samples.jms.ImaJmsAdmin -c ldap://myldaphost.mycompany.com/cn=Manager,o=jndiTest -l
-h or -?
Print usage output.
-l
List Eclipse Amlen JMS objects in the JNDI repository. These objects are printed to the console.
-u
The JNDI provider userid.
-p
The JNDI provider password.
-n
Name prefix for creating and looking up objects.
-v
Verbose output.
-w
Do not show warnings.
configfile
The configfile argument is an input file that contains the required configuration data for the administered objects to be created. The configfile argument is required for all cases except when the -h, -?, or -l options are used.

The following example configfile content shows content that can be used to create or update a connection factory administered object and a topic destination administered object. The JNDI name for each object appears as the second parameter inside the square brackets. This JNDI name is the name that is used to look up the object when the object is to be used (or updated).

# Sample config
[connection connFactory1]
Server = 127.0.0.1
Port = 1883

[topic topic1]
Name = topic1