Quick Tip: Java Message Service Class

This Java programming tutorial teaches developers how to create a Java Message Service (JMS) class. Here is some Java example code showcasing how this is done:


public class JmsAppSpecificProps
	public static void main(String args[])
	protected void writeMessage(String text) throws JMSException
		TextMessage textMessage = publishSession.createTextMessage();
		textMessage.setText(text); //Message
		textMessage.setStringProperty("serverURL",""); //application specific property
		publisher.publish(textMessage); //publishing the message


Running this code will result in the following output:

The property serverURL will be published along with the standard message

Read more Java programming and development tutorials.


Image Responsiveness not working for mobile device

Using subprocess find out running node application with pid and port using python