JMS Resource General Attributes
See Also
You see this page of the New File wizard when you are defining a JMS resource.
On this page you choose to create either an Admin Object resource (destination) or a Connector resource (connection factory),
and specify the JNDI name of the resource.
- A JMS application normally uses at least one connection factory and at least one destination.
The order in which these are created is not important.
Use this page as follows:
- Enter the configuration information for the resource.
- JNDI name. The JNDI name for the resource is required and must be unique to this resource.
Because all resource JNDI names are in the java:comp/env subcontext, when you specify the JNDI name of a JMS
resource enter only jms/name. For example, specify jms/ConnectionFactory1. You cannot change the JNDI name
of the resource after it has been registered with the server. To change the JNDI name, you must delete the resource
from the server, after which you can change the JNDI name in the properties window of the resource and register the resource again.
- Enabled. The resource is enabled by default. To disable the resource, select false from the dropdown list.
You can change this setting in the properties window for the resource.
- Description. Enter a description of the resource. This field is optional.
- Choose the resource type.
A JMS resource may be either an Admin Object resource or it may be a
Connector resource, in which case it is accessed via the Connector API.
If the JMS resource you are creating is an Admin Object resource:
- Check the javax.jms.Queue radio button if it is a queue.
- Check the javax.jms.Topic radio button if it is a topic.
If the JMS resource you are creating is a Connector resource:
- Check the javax.jms.QueueConnectionFactory radio button if it is used as a queue.
- Check the javax.jms.TopicConnectionFactory radio button if it is used as a topic.
- Check the javax.jms.ConnectionFactory radio button if it is used as a connection factory.
- With the introduction of the JMS 1.1 specification, it is recommended that you use javax.jms.ConnectionFactory
if you do not need to support existing code.
- Click Next to further customize the resource properties.
Click Finish to create the resource without additional properties. You can
add properties later by editing sun-resources.xml.
The JMS resource properties are added to sun-resources.xml.
You can open sun-resources.xml in the Source Editor by expanding the
Server Resources node of your project in the Projects window and double-clicking the file.
Once you have created the object in your project, the resource needs to be registered with the server before you can use it.
The resource is automatically registered when you deploy your project.
- See Also
- Setting up a JMS Resource on the GlassFish Application Server
Legal Notices