Contained Within
Find More Documentation
Featured Support Resources
| Descargar este libro en PDF (2394 KB)
create-jms-resource(1)
NAME
| Synopsis
| Description
| Options
| Operands
| Examples
| Exit Status
| See Also
NAME
create-jms-resource – creates a JMS resource
Synopsis
create-jms-resource
[--terse={true|false}][ --echo={true|false} ]
[ --interactive={true|false} ] [ --host host]
[--port port] [--secure| -s ] [ --user admin_user]
[--passwordfile filename] [--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
-
-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 --host
-
The machine name where the domain administration server is running. The default value is localhost.
-
-p --port
-
The HTTP/S port for administration. This is the port to which you should point your browser in order to manage the domain. For example, http://localhost:4848.
The default port number is 4848.
-
-s --secure
-
If set to true, uses SSL/TLS to communicate with the domain administration server.
-
-u --user
-
The authorized domain administration server administrative username.
If you have authenticated to a domain using the asadmin login command, then you need not specify the --user option on subsequent operations to this particular domain.
-
--passwordfile
-
The --passwordfile option specifies the name, including the full path, of a file containing the password entries in a specific format. The entry for the password must have the AS_ADMIN_ prefix followed by the password
name in uppercase letters.
For example, to specify the domain administration 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, and AS_ADMIN_ALIASPASSWORD.
All remote commands must specify the admin password to authenticate to the domain administration server, either through --passwordfile or asadmin login, or interactively on the command prompt. The asadmin login command
can be used only to specify the admin password. For other passwords, that must be specified for remote commands, use the --passwordfile or enter them at the command prompt.
If you have authenticated to a domain using the asadmin login command, then you need not specify the admin password through the --passwordfile option on subsequent operations to this particular domain. However, this is applicable only
to AS_ADMIN_PASSWORD option. You will still need to provide the other passwords, for example, AS_ADMIN_USERPASSWORD, as and when required by individual commands, such as update-file-user.
For security reasons, passwords specified as an environment variable will not be read by asadmin.
The default value for AS_ADMIN_MASTERPASSWORD is changeit.
-
--help
-
Displays the help text for the command.
-
--target
-
This option helps specify the target for which you
are creating the JMS resource. Valid values are:
-
server, which creates the resource
for the default server instance. This 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 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
-
Text providing details 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:
- ClientId
-
Specifies a client ID for a connection factory that
will be used by a durable subscriber.
- AddressList
-
This is a comma-separated list of message queue addresses.
It 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: An address list composed from the jms-hosts defined
in the target's jms-service configuration. The default for PE is local
host and the default port number is 7676. The client will attempt
a connection to a broker on port 7676 of the local host.
- MessageServiceAddressList
-
Same as AddressList. This property
name is deprecated. Use AddressList instead.
- UserName
-
The user name for the connection factory. Default: guest.
- Password
-
The password for the connection factory. Default: guest.
- ReconnectEnabled
-
If enabled (value = true), it indicates
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 to 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:
The AddressListBehavior value of the target's jms-service
configuration.
- 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:
- 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.
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/MyQueue. 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
Java EE 5 Last Revised 30 Jan 2007
NAME
| Synopsis
| Description
| Options
| Operands
| Examples
| Exit Status
| See Also
|