List of usage examples for javax.jms XAConnection createXASession
XASession createXASession() throws JMSException;
From source file:org.codehaus.stomp.jms.ProtocolConverter.java
protected StompSession getXASession(Xid xid) throws JMSException { StompSession xaSession = xaSessions.get(xid); if (xaSession == null) { XAConnection xaConnection; if (login != null) { xaConnection = xaConnectionFactory.createXAConnection(login, passcode); } else {/*from ww w. j a v a 2 s . c o m*/ xaConnection = xaConnectionFactory.createXAConnection(); } if (clientId != null) { xaConnection.setClientID(clientId); } xaConnection.start(); Session session = xaConnection.createXASession(); if (log.isDebugEnabled()) { log.debug("Created XA session"); } xaSession = new StompSession(initialContext, this, session, xaConnection); log.trace("Created XA Session"); xaSessions.put(xid, xaSession); } else { log.trace("Returned existing XA session"); } return xaSession; }