JMS configuration and development Before writing JMS client programs, you first need to configure JMS queues or topics in the WebLogic Server console. A configuration instance will be given below, which will be configured in this instance, and JMS queues and JMS topics. Before you begin to explain the configuration and development of JMS, you must first make some basic concepts of JMS to introduce. Java Message Service (JMS) is an API that accesses the enterprise information system in Java programming. The JMS API makes it easy to develop flexibly in Java, and messages-based applications are very easy. Compared with the direct method call, JMS uses communication between the message system processing process, and the message system provides different components that meet the specifications. When using an asynchronous manner, the client can continue to process without waiting for the process. In addition, the message system also supports transaction characteristics, which will have special introductions in the following sections; if users need high reliability, JMS can meet this demand through persistence messages. A JMS application consists of the following components: JMS client. Send and receive the client Java program for messages. Message. Messages passing in different clients in the JMS application. JMS provider. Implement the JMS message system, and provide management and control functions, such as the JMS server provided by WebLogic Server. Management object. The management object is a predefined JMS object, and the client uses these predefined objects to communicate, such as the connection plant described later. The simple definition of the JMS common concept is given: l Connecting Factory (ConnectionFactory) client is used to create a connection management object. l Connections Represents a connection to the JMS provider. l Device (Destination) Identification Message Receive Method. l Session (session) receives and sends a message for the session thread. l MessageProducer session uses it to send messages to your destination. l MessageConSumer session Use it to receive messages sent from the destination. 1 Establish a WebLogic object (1) required for JMS (1) to establish a connection plant Click on the system console [Service] -> [JMS] -> [Configure a new JMS ConnectionFactory] node. Enter: MyjmsFactory in the Name bar. JNDI Name Enter: MyjmsFactory. Other items use default settings. Click the Create button. Election Server to be deployed. Click the [Apply] button. (2) JMS Server Click Configure a New JMS Server. Enter the name of JMSServer: myjmsserver. Other items use default settings. Click the Create button. Select the Server to be deployed in the Target drop-down box. Click Apply.
(3)
Configure queue
Select the original established on the left side
Myjmsserver
. Click
Destinitions
node. Click on the right
Configure a new JMS Queue
. Enter the new queue name: Myjmsqueue. JNDINAME is also: Myjmsqueue. Other items use default settings. Click the Create button.