![](../graphics/a.gif) |
|
|
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
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.
- -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 MAPPEDPASSWORD, USERPASSWORD, SAVEDMASTERPASSWORD,
MQPASSWORD, 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
4949.
- -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.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:
Property | Definition |
ClientId | Specifies a client ID for a connection factory that will be used by a durable
subscriber. |
AddressList | Specifies 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. |
UserName | The user name for the connection factory. Default: guest. |
Password | The password for the connection factory. Default: guest. |
ReconnectEnabled | If 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. |
ReconnectAttempts | Specifies 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. |
ReconnectInterval | Specifies 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. |
AddressListBehavior | Specifies 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. |
AddressListIterations | Specifies 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:
Property | Definition |
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. |
Description | This property provides a description of the physical destination. |
-
jndi_name
-
The JNDI name of the JMS resource to be created.
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 isjms/DurableTopicConnectionFactory. The ClientId property sets a client ID on the
connection factory so that it can be used for durable subsciptions. 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
isjms/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.
- 0
-
command executed successfully
- 1
-
error in executing the command
delete-jms-resource(1), list-jms-resources(1), create-jmsdest(1)
J2EE SDK 1.4 | Go To Top | Last Changed 22 Dec 2004 |
Company Info
|
Contact
|
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
|