1. Overview of GlassFish Server Administration
Default Settings and Locations
Instructions for Administering GlassFish Server
4. Administering the Virtual Machine for the Java Platform
6. Administering Web Applications
7. Administering the Logging Service
8. Administering the Monitoring Service
9. Writing and Running JavaScript Clients to Monitor GlassFish Server
10. Administering Life Cycle Modules
11. Extending and Updating GlassFish Server
Part II Resources and Services Administration
12. Administering Database Connectivity
13. Administering EIS Connectivity
14. Administering Internet Connectivity
15. Administering the Object Request Broker (ORB)
16. Administering the JavaMail Service
17. Administering the Java Message Service (JMS)
Updating the JMS Service Configuration
Setting Message Queue Broker Properties in the JMS Service Configuration
Configuring Embedded and Local JMS Hosts
Administering JMS Connection Factories and Destinations
Administering JMS Physical Destinations
To Create a JMS Physical Destination
To List JMS Physical Destinations
To Purge Messages From a Physical Destination
To Delete a JMS Physical Destination
Special Situations When Using the JMS Service
Troubleshooting the JMS Service
Using the Generic Resource Adapter for JMS to Integrate Supported External JMS Providers
Configuring GenericJMSRA for Supported External JMS Providers
To Deploy and Configure GenericJMSRA
GenericJMSRA Configuration Properties
Using GenericJMSRA with WebLogic JMS
Deploy the WebLogic Thin T3 Client JAR in GlassFish Server
Configure WebLogic JMS Resources for Integration
Create a Resource Adapter Configuration for GenericJMSRA to Work With WebLogic JMS
Deploy the GenericJMSRA Resource Archive
Configuring an MDB to Receive Messages from WebLogic JMS
Accessing Connections and Destinations Directly
Limitations When Using GenericJMSRA with WebLogic JMS
Configuration Reference of GenericJMSRA Properties for WebLogic JMS
Using GenericJMSRA with IBM WebSphere MQ
Preliminary Setup Procedures for WebSphere MQ Integration
Configure the WebSphere MQ Administered Objects
Create a Resource Adapter Configuration for GenericJMSRA to Work With WebSphere MQ
Deploy the GenericJMSRA Archive
Create the Connection Factories and Administered Objects in GlassFish Server
Configuring an MDB to Receive Messages from WebSphere MQ
18. Administering the Java Naming and Directory Interface (JNDI) Service
19. Administering Transactions
The JMS API uses two kinds of administered objects. Connection factory objects allow an application to create other JMS objects programmatically. Destination objects serve as repositories for messages. How these objects are created is specific to each implementation of JMS. In GlassFish Server, JMS is implemented by performing the following tasks:
Creating a connection factory
Creating a destination, which requires creating a physical destination and a destination resource that refers to the physical destination
JMS applications use the Java Naming and Directory Interface (JNDI) API to access the connection factory and destination resources. A JMS application normally uses at least one connection factory and at least one destination. By studying the application or consulting with the application developer, you can determine what resources must be created. The order in which the resources are created does not matter.
GlassFish Server provides the following types of connection factory objects:
QueueConnectionFactory objects, used for point-to-point communication
TopicConnectionFactory objects, used for publish-subscribe communication
ConnectionFactory objects, which can be used for both point-to-point and publish-subscribe communications (recommended for new applications)
GlassFish Server provides the following types of destination objects:
Queue objects, used for point-to-point communication
Topic objects, used for publish-subscribe communication
The following topics are addressed here:
The subcommands in this section can be used to administer both the connection factory resources and the destination resources. For information on JMS service support of connection pooling and failover, see Connection Failover in Oracle GlassFish Server 3.1-3.1.1 High Availability Administration Guide. For instructions on administering physical destinations, see Administering JMS Physical Destinations.
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 asadmin mode to create a JMS connection factory resource or a destination resource.
Tip - 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.
Remote asadmin subcommands require a running server.
Information about the properties for the subcommand is included in this help page.
Some properties require server restart. See Configuration Changes That Require Restart. If your server needs to be restarted, see To Restart a Domain.
Example 17-5 Creating a JMS Connection Factory
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.
Example 17-6 Creating a JMS Destination
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.
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help create-jms-resource at the command line.
Use the list-jms-resources subcommand in remote asadmin mode to list the existing connection factory and destination resources.
Remote asadmin subcommands require a running server.
Example 17-7 Listing All JMS Resources
This example lists all the existing JMS connection factory and destination resources.
asadmin> list-jms-resources jms/Queue jms/ConnectionFactory jms/DurableConnectionFactory jms/Topic Command list-jms-resources executed successfully
Example 17-8 Listing a JMS Resources of a Specific Type
This example lists the resources for the resource type javax.
asadmin> list-jms-resources --restype javax.jms.TopicConnectionFactory jms/DurableTopicConnectionFactory jms/TopicConnectionFactory Command list-jms-resources executed successfully.
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help list-jms-resources at the command line.
Use the delete-jms-resource subcommand in remote asadmin mode to remove the specified connection factory or destination resource.
Before You Begin
Ensure that you remove all references to the specified JMS resource before running this subcommand.
Remote asadmin subcommands require a running server.
Example 17-9 Deleting a JMS Resource
This example deletes the jms/Queue resource.
asadmin> delete-jms-resource jms/Queue Command delete-jms-resource executed successfully
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help delete-jms-resource at the command line.