The Java Message Service (JMS) API is a Java Message Oriented Middleware (MOM) API for sending messages between two or more clients. JMS is a part of the Java Platform, Enterprise Edition, and is defined by a specification developed under the Java Community Process as JSR 914. It is a messaging standard that allows application components based on the Java Enterprise Edition (JEE) to create, send, receive, and read messages. It allows the communication between different components of a distributed application to be loosely coupled, reliable, and asynchronous.
Example:
Step1:
Copy jbossmq-destinations-service.xml file from JBOSS_HOME/server/default/deploy/jms to JBOSS_HOME/server/Server_Name/deploy/jms
Step2:
Open the file and append the following code before </server>
Example:
Step1:
Copy jbossmq-destinations-service.xml file from JBOSS_HOME/server/default/deploy/jms to JBOSS_HOME/server/Server_Name/deploy/jms
Step2:
Open the file and append the following code before </server>
Step3:
Deploy the application (download) into the server.
Now let us test the application
Open the application using the following url
http://localhost:<PORT>/JmsJb-war
Enter Hello world in the message field and click Send The message.
Step4:
Open the command prompt in which server is running.
You can see that the message is received in MessageMDB
You can find more details about your jms resources at JMX -->Console jboss.mq -->service=DestinationManager.
0 comments:
Post a Comment