Search in sources :

Example 1 with ServerSessionImpl

use of jms.base.ServerSessionImpl in project swiftmq-ce by iitsoftware.

the class Consumer method setUp.

protected void setUp() throws Exception {
    super.setUp();
    sender.close();
    receiver.close();
    qs.close();
    pool = new ServerSessionPoolImpl();
    for (int i = 0; i < 1; i++) {
        XAQueueSession session = qc.createXAQueueSession();
        session.setMessageListener(new Listener(session));
        pool.addServerSession(new ServerSessionImpl(pool, session));
    }
    cc = qc.createConnectionConsumer(getQueue(queueName), null, pool, 5);
    verifier = new MsgNoVerifier(this, nMsgs, "no");
// verifier.setCheckSequence(false);
}
Also used : XAQueueSession(javax.jms.XAQueueSession) MessageListener(javax.jms.MessageListener) ServerSessionImpl(jms.base.ServerSessionImpl) MsgNoVerifier(jms.base.MsgNoVerifier) ServerSessionPoolImpl(jms.base.ServerSessionPoolImpl)

Example 2 with ServerSessionImpl

use of jms.base.ServerSessionImpl in project swiftmq-ce by iitsoftware.

the class Forwarder method setUp.

protected void setUp() throws Exception {
    super.setUp();
    sender.close();
    receiver.close();
    qs.close();
    pool = new ServerSessionPoolImpl();
    for (int i = 0; i < 1; i++) {
        XAQueueSession session = qc.createXAQueueSession();
        session.setMessageListener(new Listener(session, session.getQueueSession().createSender(getQueue(targetQueueName))));
        pool.addServerSession(new ServerSessionImpl(pool, session));
    }
    cc = qc.createConnectionConsumer(getQueue(sourceQueueName), null, pool, 5);
    verifier = new MsgNoVerifier(this, nMsgs, "no");
// verifier.setCheckSequence(false);
}
Also used : XAQueueSession(javax.jms.XAQueueSession) MessageListener(javax.jms.MessageListener) ServerSessionImpl(jms.base.ServerSessionImpl) MsgNoVerifier(jms.base.MsgNoVerifier) ServerSessionPoolImpl(jms.base.ServerSessionPoolImpl)

Example 3 with ServerSessionImpl

use of jms.base.ServerSessionImpl in project swiftmq-ce by iitsoftware.

the class Consumer method setUp.

protected void setUp() throws Exception {
    super.setUp();
    sender.close();
    receiver.close();
    qs.close();
    pool = new ServerSessionPoolImpl();
    for (int i = 0; i < 10; i++) {
        XAQueueSession session = qc.createXAQueueSession();
        session.setMessageListener(new Listener(session));
        pool.addServerSession(new ServerSessionImpl(pool, session));
    }
    cc = qc.createConnectionConsumer(queue, null, pool, 5);
    verifier = new MsgNoVerifier(this, nMsgs, "no");
    verifier.setCheckSequence(false);
}
Also used : XAQueueSession(javax.jms.XAQueueSession) MessageListener(javax.jms.MessageListener) ServerSessionImpl(jms.base.ServerSessionImpl) MsgNoVerifier(jms.base.MsgNoVerifier) ServerSessionPoolImpl(jms.base.ServerSessionPoolImpl)

Example 4 with ServerSessionImpl

use of jms.base.ServerSessionImpl in project swiftmq-ce by iitsoftware.

the class Consumer method setUp.

protected void setUp() throws Exception {
    super.setUp();
    sender.close();
    receiver.close();
    qs.close();
    pool = new ServerSessionPoolImpl();
    for (int i = 0; i < 10; i++) {
        XAQueueSession session = qc.createXAQueueSession();
        session.setMessageListener(new Listener(session));
        pool.addServerSession(new ServerSessionImpl(pool, session));
    }
    cc = qc.createConnectionConsumer(getQueue(queueName), null, pool, 5);
    verifier = new MsgNoVerifier(this, nMsgs, "no");
    verifier.setCheckSequence(false);
}
Also used : XAQueueSession(javax.jms.XAQueueSession) MessageListener(javax.jms.MessageListener) ServerSessionImpl(jms.base.ServerSessionImpl) MsgNoVerifier(jms.base.MsgNoVerifier) ServerSessionPoolImpl(jms.base.ServerSessionPoolImpl)

Example 5 with ServerSessionImpl

use of jms.base.ServerSessionImpl in project swiftmq-ce by iitsoftware.

the class Forwarder method setUp.

protected void setUp() throws Exception {
    super.setUp();
    sender.close();
    receiver.close();
    qs.close();
    pool = new ServerSessionPoolImpl();
    for (int i = 0; i < 10; i++) {
        XAQueueSession session = qc.createXAQueueSession();
        session.setMessageListener(new Listener(session, session.getQueueSession().createSender(getQueue(targetQueueName))));
        pool.addServerSession(new ServerSessionImpl(pool, session));
    }
    cc = qc.createConnectionConsumer(getQueue(sourceQueueName), null, pool, 5);
    verifier = new MsgNoVerifier(this, nMsgs, "no");
    verifier.setCheckSequence(false);
}
Also used : XAQueueSession(javax.jms.XAQueueSession) MessageListener(javax.jms.MessageListener) ServerSessionImpl(jms.base.ServerSessionImpl) MsgNoVerifier(jms.base.MsgNoVerifier) ServerSessionPoolImpl(jms.base.ServerSessionPoolImpl)

Aggregations

ServerSessionImpl (jms.base.ServerSessionImpl)67 ServerSessionPoolImpl (jms.base.ServerSessionPoolImpl)67 MessageListener (javax.jms.MessageListener)36 MsgNoVerifier (jms.base.MsgNoVerifier)36 QueueSession (javax.jms.QueueSession)18 XAQueueSession (javax.jms.XAQueueSession)10 TopicSession (javax.jms.TopicSession)6 XATopicSession (javax.jms.XATopicSession)2