conn.close();
}
public void sendAMessage(String fileName) throws JMSException, FileNotFoundException, IOException {
QueueSender send = session.createSender(que);
ObjectMessage tm;
File file = new File(fileName);
if(!file.exists()) {
throw new IllegalArgumentException("Input message file [" + file.getAbsolutePath() + "] not found.");
}
String message = FileUtil.readTextFile(file);
tm = session.createObjectMessage(message);
tm.setStringProperty("jbesbfilename", "transformedmessageDateManipulation.log");
send.send(tm);
send.close();
System.out.println("*** Switch back to the ESB Java console now to see '" + fileName + "' before and after the transformation...");
}