public static void main(final String[] args) throws Exception {
// create transaction manager,reuse it.
final TransactionManager tm = new UserTransactionManager();
final String topic = "meta-test";
final XAMessageSessionFactory xasf = getXAMessageSessionFactory();
// create XA producer,it should be used as a singleton instance.
XAMessageProducer xaMessageProducer = xasf.createXAProducer();
// publish topic
xaMessageProducer.publish(topic);
// create XA datasource,reuse it.
final XADataSource xads = getXADataSource();