// Set the log4j appender for getting the statements logged by
// HCatMessageHandler
Logger logger = Logger.getLogger(HCatMessageHandler.class);
ByteArrayOutputStream out = new ByteArrayOutputStream();
Layout layout = new SimpleLayout();
Appender appender = new WriterAppender(layout, out);
logger.addAppender(appender);
Message msg = session.createTextMessage("{" +
"\"server\" : \"thrift://localhost:1234\"," +
"\"db\" : \"default\"," +