TopicConnectionFactoryobjects, used for publish-subscribe communication
ConnectionFactoryobjects, which can be used for both point-to-point and
publish-subscribecommunications; these are recommended for new applications
Thereare two kinds of destinations:
Queueobjects, used for point-to-point communication
Topicobjects, used for publish-subscribe communication
Thechapters on JMS in the Java EE 5 Tutorial provide details on these two types of
communicationand other aspects of JMS (see
http://java.sun.com/javaee/5/docs/tutorial/doc/index.html).
Theorder in which the resources are created does not matter.
Fora Java EE application, specify connection factory and destination resources in the
EnterpriseServer deployment descriptors as follows:
Specifya connection factory JNDI name in a resource-ref or an
mdb-connection-factoryelement.
Specifya destination resource JNDI name in the ejb element for a message-driven bean and
inthe message-destination element.
Specifya physical destination name in a message-destination-link element, within either
amessage-drivenelement of an enterprise bean deployment descriptor or a
message-destination-refelement. In addition, specify it in the message-destination
element.(The message-destination-ref element replaces the resource-env-ref
element,which is deprecated in new applications.) In the message-destination element of
anEnterprise Server deployment descriptor, link the physical destination name with the
destinationresource name.
The RelationshipBetween JMS Resources and ConnectorResources
TheEnterprise Server implements JMS by using a system resource adapter named jmsra. When
auser creates JMS resources, the Enterprise Server automatically creates connector resources
thatappear under the Connectors node in the Admin Console’s tree view.
Foreach JMS connection factory that a user creates, the Enterprise Server creates a connector
connectionpool and connector resource. For each JMS destination a user creates, the
EnterpriseServer creates an admin object resource. When the user deletes the JMS resources,
theEnterprise Server automatically deletes the connector resources.
Itis possible to create connector resources for the JMS system resource adapter by using the
Connectorsnode of the Admin Console instead of the JMS Resources node. See Chapter 7,
“ConnectorResources,”for details.
TheRelationshipBetween JMS Resources and Connector Resources
SunGlassFishEnterprise Ser ver2.1 Administration Guide • December 200864