For each JMS connection factory that you create, GlassFish Server creates a connector connection pool and connector resource. For each JMS destination that you create, GlassFish Server creates a connector admin object resource. If you delete a JMS resource, GlassFish Server automatically deletes the connector resources.
Use the create-jms-resource command in remote mode to create a JMS connection factory resource or a destination resource.
To specify the addresslist property (in the format host:mqport,host2:mqport,host3:mqport) for the asadmin create-jms-resource command, escape the : by using \\. For example, host1\\:mqport,host2\\:mqport,host3\\:mpqport. For more information about using escape characters, see the asadmin(1M) concepts page.
To update a JMS connection factory, use the set subcommand for the underlying connector connection pool, See To Update a Connector Connection Pool.
To update a destination, use the set subcommand for the admin object resource. See To Update an Administered Object.
Ensure that the server is running.
Remote subcommands require a running server.
Create a JMS resource by using the create-jms-resource(1) command.
Information about the properties for the subcommand is included in this help page.
(Optional) If needed, restart the server.
This example creates a connection factory resource of type javax.jms.ConnectionFactory whose JNDI name is jms/DurableConnectionFactory. 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 --restype javax.jms.ConnectionFactory --description "connection factory for durable subscriptions" --property ClientId=MyID jms/DurableConnectionFactory Command create-jms-resource executed successfully.
This example creates a destination resource whose JNDI name is jms/MyQueue.
asadmin> create-jms-resource --restype javax.jms.Queue --property Name=PhysicalQueue jms/MyQueue Command create-jms-resource executed successfully.
You can also view the full syntax and options of the subcommand by typing asadmin help create-jms-resource at the command line.