Search in sources :

Example 1 with ManagedSession

use of com.axway.ats.action.jms.model.sessions.ManagedSession in project ats-framework by Axway.

the class ManagedConnection method addSession.

@SuppressWarnings("unchecked")
protected synchronized <T extends Session> T addSession(final T session) {
    final ManagedSession managedSession = ManagedSession.create(session);
    sessions.add(managedSession);
    return (T) managedSession;
}
Also used : ManagedSession(com.axway.ats.action.jms.model.sessions.ManagedSession)

Example 2 with ManagedSession

use of com.axway.ats.action.jms.model.sessions.ManagedSession in project ats-framework by Axway.

the class ManagedConnection method close.

@Override
public synchronized void close() throws JMSException {
    for (final ConnectionConsumer c : connectionConsumers) try {
        c.close();
    } catch (final Exception e) {
    }
    connectionConsumers.clear();
    for (final ManagedSession session : sessions) session.shutdown();
    sessions.clear();
    try {
        this.stop();
    } catch (final Exception e) {
    }
    connection.close();
}
Also used : ConnectionConsumer(javax.jms.ConnectionConsumer) ManagedSession(com.axway.ats.action.jms.model.sessions.ManagedSession) JMSException(javax.jms.JMSException)

Aggregations

ManagedSession (com.axway.ats.action.jms.model.sessions.ManagedSession)2 ConnectionConsumer (javax.jms.ConnectionConsumer)1 JMSException (javax.jms.JMSException)1