Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
 
User Commandscreate-jms-resource(1)


NAME

 create-jms-resource - creates a JMS resource

SYNOPSIS

 create-jms-resource --user admin_user [--passwordfile filename] [--host host_name] [--port port_number] [--secure|-s] [--terse=false] [--echo=false] [--interactive=true] [--help] [--target target] --restype type [--enabled=true] [--description text] [--property (name=value)[:name=value]*] jndi_name

DESCRIPTION

The create-jms-resource command creates a Java Message Service (JMS) connection factory resource or a JMS destination resource. This command is supported in remote mode only.

OPTIONS

-u --user

The authorized domain application server administrative username.

-w --password

The --password option is deprecated. Use --passwordfile instead.

--passwordfile

This option replaces the -- password option. Using the --password option on the command line or through the environment is deprecated. The --passwordfile option specifies the name of a file containing the password entries in a specified format. The entry for the password must have the AS_ADMIN_ prefix followed by the password name in capital letters. For example, to specify the domain application server password, use an entry with the following format: AS_ADMIN_PASSWORD=password, where password is the actual administrator password. Other passwords that can be specified include AS_ADMIN_MAPPEDPASSWORD, AS_ADMIN_USERPASSWORD, AS_ADMIN_SAVEDMASTERPASSWORD, AS_ADMIN_MQPASSWORD, AS_ADMIN_ALIASPASSWORD, and so on.

-H --host

The machine name where the domain application server is running. The default value is localhost.

-p --port

The port number of the domain application server listening for administration requests. The default port number for Platform Edition is 4848. The default port number for Enterprise Edition is 4849.

-s --secure

If set to true, uses SSL/TLS to communicate with the domain application server.

-t --terse

Indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-formatted data for consumption by a script. Default is false.

-e --echo

Setting to true will echo the command line statement on the standard output. Default is false.

-I --interactive

If set to true (default), only the required password options are prompted.

-h --help

Displays the help text for the command.

--target

In Enterprise Edition, specifies the target for which you are creating the JMS resource. Valid values are

  • server, which creates the resource for the default server instance server and is the default value

  • domain, which creates the resource for the domain

  • cluster_name, which creates the resource for every server instance in the cluster

  • instance_name, which creates the resource for a particular server instance

--restype

The JMS resource type, which can be either javax.jms.Topic, javax.jms.Queue, javax.jms.ConnectionFactory, javax.jms.TopicConnectionFactory, or javax.jms.QueueConnectionFactory.

--enabled

If set to true, the resource is enabled at runtime.

--description

A text description of the JMS resource.

--property

Optional attribute name/value pairs for configuring the JMS resource.

You can specify the following properties for a connection factory resource:

PropertyDefinition
ClientIdSpecifies a client ID for a connection factory that will be used by a durable subscriber.
AddressListSpecifies the names (and, optionally, port numbers) of a message broker instance or instances with which your application will communicate. Each address in the list specifies the host name (and, optionally, host port and connection service) for the connection. For example, the value could be earth or earth:7677. Specify the port number if the message broker is running on a port other than the default (7676). If you specify multiple hosts and ports in a clustered environment, the first available host on the list is used. Default: The local host and default port number (7676). The client will attempt a connection to a broker on port 7676 of the local host.
MessageServiceAddressListSame as AddressList. This property name is deprecated. Use AddressList instead.
UserNameThe user name for the connection factory. Default: guest.
PasswordThe password for the connection factory. Default: guest.
ReconnectEnabledIf enabled (value = true), specifies that the client runtime attempts to reconnect to a message server (or the list of addresses in the AddressList) when a connection is lost. Default: false.
ReconnectAttemptsSpecifies the number of attempts to connect (or reconnect) for each address in the AddressList before the client runtime tries the next address in the list. A value of -1 indicates that the number of reconnect attempts is unlimited (the client runtime attempts to connect to the first address until it succeeds). Default: 6.
ReconnectIntervalSpecifies the interval in milliseconds between reconnect attempts. This applies for attempts on each address in the AddressList and for successive addresses in the list. If the interval is too short, the broker does not have time to recover. If it is too long, the reconnect might represent an unacceptable delay. Default: 30,000 milliseconds.
AddressListBehaviorSpecifies whether connection attempts are in the order of addresses in the AddressList attribute (PRIORITY) or in a random order (RANDOM). PRIORITY means that the reconnect will always try to connect to the first server address in the AddressList and will use another one only if the first broker is not available. If you have many clients attempting a connection using the same connection factory, specify RANDOM to prevent them from all being connected to the same address. Default: PRIORITY.
AddressListIterationsSpecifies the number of times the client runtime iterates through the AddressList in an effort to establish (or re-establish) a connection). A value of -1 indicates that the number of attempts is unlimited. Default: -1.

You can specify the following properties for a destination resource:

PropertyDefinition
Name(Required) This property specifies the name of the physical destination to which the resource will refer. You create a physical destination with the create-jmsdest command.
DescriptionThis property provides a description of the physical destination.

OPERANDS

jndi_name

The JNDI name of the JMS resource to be created.

EXAMPLES

Example 1. Creating a JMS connection factory resource for durable subscriptions

The following command creates a connection factory resource of type javax.jms.TopicConnectionFactory whose JNDI name is jms/DurableTopicConnectionFactory. The ClientId property sets a client ID on the connection factory so that it can be used for durable subscriptions. The JNDI name for a JMS resource customarily includes the jms/ naming subcontext.

asadmin> create-jms-resource --user admin1 
--passwordfile passwords.txt --host pigeon --port 5001 
--restype javax.jms.TopicConnectionFactory --description 
"example of creating a JMS connection factory" 
--property ClientId=MyID jms/DurableTopicConnectionFactory
Command create-jms-resource executed successfully.
Example 2. Creating a JMS destination resource

The following command creates a destination resource whose JNDI name is jms/Queue. The Name property specifies the physical destination to which the resource refers.

asadmin> create-jms-resource --user admin1 
--passwordfile passwords.txt --host pigeon --port 5001 
--restype javax.jms.Queue --property Name=PhysicalQueue jms/MyQueue
Command create-jms-resource executed successfully.

EXIT STATUS

0

command executed successfully

1

error in executing the command

SEE ALSO

delete-jms-resource(1), list-jms-resources(1), create-jmsdest(1)


J2EE SDK 1.4Go To TopLast Changed 31 Jan 2005