JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Administration Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of GlassFish Server Administration

Default Settings and Locations

Configuration Tasks

Administration Tools

Instructions for Administering GlassFish Server

Part I Runtime Administration

2.  General Administration

3.  Administering Domains

4.  Administering the Virtual Machine for the Java Platform

5.  Administering Thread Pools

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)

About the JMS Service

JMS Service High Availability

Updating the JMS Service Configuration

Setting Message Queue Broker Properties in the JMS Service Configuration

Administering JMS Hosts

About JMS Host Types

Configuring Embedded and Local JMS Hosts

To Create a JMS Host

To List JMS Hosts

To Update a JMS Host

To Delete a JMS Host

Administering JMS Connection Factories and Destinations

To Create a Connection Factory or Destination Resource

To List JMS Resources

To Delete a Connection Factory or Destination Resource

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

Connection Factory Properties

Destination Properties

Activation Spec 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

Part III Appendixes

A.  Subcommands for the asadmin Utility

Index

Administering JMS Connection Factories and Destinations

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:

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:

GlassFish Server provides the following types of destination objects:

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.

To Create a Connection Factory or Destination Resource

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.

  1. Ensure that the server is running.

    Remote asadmin subcommands require a running server.

  2. 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.

  3. (Optional) If needed, restart the server.

    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.

To List JMS Resources

Use the list-jms-resources subcommand in remote asadmin mode to list the existing connection factory and destination resources.

  1. Ensure that the server is running.

    Remote asadmin subcommands require a running server.

  2. List the existing JMS resources by using the list-jms-resources(1) subcommand.

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.

To Delete a Connection Factory or Destination Resource

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.

  1. Ensure that the server is running.

    Remote asadmin subcommands require a running server.

  2. List the existing JMS resources by using the list-jms-resources(1) subcommand.
  3. Delete the JMS resource by using the delete-jms-resource(1) subcommand.

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.