List of usage examples for javax.jms XASession setMessageListener
void setMessageListener(MessageListener listener) throws JMSException;
From source file:org.soulwing.oaq.ServerSessionFactory.java
/** * {@inheritDoc}/*from w w w . j a va 2 s. c o m*/ */ @Override public ServerSession makeObject() throws JMSException, UnavailableException { Validate.notNull(getSessionPool()); Validate.notNull(getConnection()); XASession session = getConnection().createXASession(); XAResource resource = session.getXAResource(); MessageEndpointProxy endpoint = new MessageEndpointProxy( details.getEndpointFactory().createEndpoint(resource)); session.setMessageListener(endpoint); return new ServerSessionWork(session, details.getWorkManager(), getSessionPool()); }