!--a11y-->
JMS
Service – Development 
The Java Message Service (JMS) is an enterprise messaging system, also referred to as Message-Oriented Middleware (MOM). JMS enables applications to communicate by exchanging messages.
Relationship of the JMS objects

The JMS elements are:
· Connection factory – this is an administered object that you can use to create a connection. You have to create a connection factory first and then look it up. A reference to a connection factory is usually obtained from a naming service using JNDI.
· Connection – this is an active connection to a JMS provider. Use the connection factory to initialize the connection, and then use the connection to create a session object. For more information, see Creating JMS Connection.
· Session – this is a single-threaded context for sending and receiving messages. Using the session object you can create a message producer, message consumers and message objects.
· Message producer – this is an object created by a session. Use it to send messages to a destination such as queues and topics.
· Message consumer – this is an object created by a session. Use it to receive messages sent to a destination.
· Destination – this is an administered object that encapsulates the identity of a message destination.
The point-to-point model enables you to send a message, and the costumer can receive only one specified message. You can use the point-to-point messaging model through initialization of the javax.jms.Queue class. For more information, see Point-to-Point Model.
The javax.jms.QueueSender class is used to send the messages to the queue. For more information, see Creating Message Producer to a Queue.
The javax.jms.QueueReceiver classes represent the message consumer. For more information, see Creating Message Consumer to a Queue.
The publish-subscribe messaging style enables you to send messages to a group of receivers. You can use the publish/subscribe messaging model through initialization of the javax.jms.Topic class. For more information, see Publish-Subscribe Model.
The javax.jms.TopicPublisher class is used to send the messages to the topic. For more information, see Creating Message Producer to a Topic.
The javax.jms.TopicSubscriber class represents the message consumer. For more information, see Creating Message Consumer to a Topic.
The topic connection also enables you to create the so-called durable subscribers, which enable you to get a stored message sent to the topic when the subscriber was not active. For more information, see Managing Durable Subscriptions.
JMS messages are requests, responses or events that are asynchronous, and which are used by the enterprise applications. They contain the information required to coordinate the application communications. For more information, see JMS Messages.
Having finished using the JMS Provider, you should release the used objects. For more information, see Closing the JMS Connection.
The JMS enables applications that use one messaging system to exchange messages easily. With the JMS API, you have a standard for writing applications that have to send, receive or exchange asynchronous messages.
SAP J2EE Engine JMS Provider is fully compliant with the JMS specifications versions 1.02.
J2EE Engine JMS service fully covers the 1.02b and partly covers the 1.1 version of the JMS Specification. This enables you to:
· Create different types of messages – the JMS supports few messages types. You can use them to send a certain type of information. See JMS Messages.
· Send messages – you can send messages to an exact client of the messages, or you can send messages to a group of clients that are subscribed to a messaging instance. See Creating Message Consumer to a Queue or Creating Message Producer to a Topic.
· Receive messages – JMS enables easy messages receiving. See Creating Message Consumer to a Queue or Creating Message Consumer to a Topic .
· Secure the JMS connection – the SAP J2EE Engine JMS Provider enables you to apply security restrictions over the JMS connections you are using or managing. For more information, see Security on JMS Service.
· Use transactions – you can use the transacted connection factories, which are the XAConnectionFactories on the SAP J2EE Engine.
· Use message-driven beans – the message-driven beans are fully supported by the SAP J2EE Engine JMS Provider implementation. For more information, see Developing Message-Driven Beans.
· Create Clustered Subscriber – this is required for the message-driven bean container of the SAP J2EE Engine. A special API attaches a groupID to all types of standard JMS subscriptions. This group ID results in special semantics in the message delivery levels of the J2EE agents – instead of publishing a message to all subscribers, JMS only chooses one subscriber of each different group and send the message to it.
· Use JMS message selector. See Creating Message Selector.
· Use the additional API to create and delete destinations programmatically.
· Use the API for obtaining monitoring or statistics data from the JMS server.
See also:
· JMS Administration in the Administration Manual
