Java Message Service (JMS)
Java message service is pretty good to send message to another. its maintain a queue and when any message stay in that queue, the publisher immediately publish the message. From the EJB (Enterprise Java Beans) context, generally JMS is used for distributed asynchronous computing. Also its can be used for debugging, web chat service for customer and the provider etc. here i used it for doing logging for web service operation. the response can not wait for log write rather response return to the user and the log message sent to the HornetQ (a message Queue). then log will insert to database. Here i used JPA for query and Bean managed transaction. necessary tools given below, 1) JBoss-eap-6.2 or 7 2) MySql DB. here is the project structure. first we need to add the HornetQ module and for this make a xml file say named "hornetq-jms.xml" and put the code here. put the xml file in META-INF folder in your class path. <?xml version="1.0" encoding="U...