javax.jms.ServerSessionPool Java Examples

The following examples show how to use javax.jms.ServerSessionPool. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ActiveMQRASessionFactoryImpl.java    From activemq-artemis with Apache License 2.0 6 votes vote down vote up
/**
 * Create a connection consumer -- throws IllegalStateException
 *
 * @param queue           The queue
 * @param messageSelector The message selector
 * @param sessionPool     The session pool
 * @param maxMessages     The number of max messages
 * @return The connection consumer
 * @throws JMSException Thrown if an error occurs
 */
@Override
public ConnectionConsumer createConnectionConsumer(final Queue queue,
                                                   final String messageSelector,
                                                   final ServerSessionPool sessionPool,
                                                   final int maxMessages) throws JMSException {
   if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
      ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + queue +
                                       ", " +
                                       messageSelector +
                                       ", " +
                                       sessionPool +
                                       ", " +
                                       maxMessages +
                                       ")");
   }

   throw new IllegalStateException(ISE);
}
 
Example #2
Source File: ActiveMQRASessionFactoryImpl.java    From activemq-artemis with Apache License 2.0 6 votes vote down vote up
/**
 * Create a connection consumer -- throws IllegalStateException
 *
 * @param topic           The topic
 * @param messageSelector The message selector
 * @param sessionPool     The session pool
 * @param maxMessages     The number of max messages
 * @return The connection consumer
 * @throws JMSException Thrown if an error occurs
 */
@Override
public ConnectionConsumer createConnectionConsumer(final Topic topic,
                                                   final String messageSelector,
                                                   final ServerSessionPool sessionPool,
                                                   final int maxMessages) throws JMSException {
   if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
      ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + topic +
                                       ", " +
                                       messageSelector +
                                       ", " +
                                       sessionPool +
                                       ", " +
                                       maxMessages +
                                       ")");
   }

   throw new IllegalStateException(ISE);
}
 
Example #3
Source File: ActiveMQRASessionFactoryImpl.java    From activemq-artemis with Apache License 2.0 6 votes vote down vote up
/**
 * Create a durable connection consumer -- throws IllegalStateException
 *
 * @param topic            The topic
 * @param subscriptionName The subscription name
 * @param messageSelector  The message selector
 * @param sessionPool      The session pool
 * @param maxMessages      The number of max messages
 * @return The connection consumer
 * @throws JMSException Thrown if an error occurs
 */
@Override
public ConnectionConsumer createDurableConnectionConsumer(final Topic topic,
                                                          final String subscriptionName,
                                                          final String messageSelector,
                                                          final ServerSessionPool sessionPool,
                                                          final int maxMessages) throws JMSException {
   if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
      ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + topic +
                                       ", " +
                                       subscriptionName +
                                       ", " +
                                       messageSelector +
                                       ", " +
                                       sessionPool +
                                       ", " +
                                       maxMessages +
                                       ")");
   }

   throw new IllegalStateException(ISE);
}
 
Example #4
Source File: ActiveMQRASessionFactoryImpl.java    From activemq-artemis with Apache License 2.0 6 votes vote down vote up
/**
 * Create a connection consumer -- throws IllegalStateException
 *
 * @param destination The destination
 * @param name        The name
 * @param pool        The session pool
 * @param maxMessages The number of max messages
 * @return The connection consumer
 * @throws JMSException Thrown if an error occurs
 */
@Override
public ConnectionConsumer createConnectionConsumer(final Destination destination,
                                                   final String name,
                                                   final ServerSessionPool pool,
                                                   final int maxMessages) throws JMSException {
   if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
      ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + destination +
                                       ", " +
                                       name +
                                       ", " +
                                       pool +
                                       ", " +
                                       maxMessages +
                                       ")");
   }

   throw new IllegalStateException(ISE);
}
 
Example #5
Source File: ActiveMQConnection.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createConnectionConsumer(final Queue queue,
                                                   final String messageSelector,
                                                   final ServerSessionPool sessionPool,
                                                   final int maxMessages) throws JMSException {
   checkClosed();
   checkTempQueues(queue);
   return null;
}
 
Example #6
Source File: JmsConnection.java    From qpid-jms with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
    checkClosedOrFailed();
    createJmsConnection();

    return createConnectionConsumer(topic, messageSelector, sessionPool, maxMessages, subscriptionName, true, false);
}
 
Example #7
Source File: JmsConnection.java    From qpid-jms with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
    checkClosedOrFailed();
    createJmsConnection();

    return createConnectionConsumer(topic, messageSelector, sessionPool, maxMessages, subscriptionName, true, true);
}
 
Example #8
Source File: JmsConnection.java    From qpid-jms with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createSharedConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
    checkClosedOrFailed();
    createJmsConnection();

    return createConnectionConsumer(topic, messageSelector, sessionPool, maxMessages, subscriptionName, false, true);
}
 
Example #9
Source File: JmsConnection.java    From qpid-jms with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
    checkClosedOrFailed();
    createJmsConnection();

    return createConnectionConsumer(destination, messageSelector, sessionPool, maxMessages, null, false, false);
}
 
Example #10
Source File: JmsConnectionConsumer.java    From qpid-jms with Apache License 2.0 5 votes vote down vote up
public JmsConnectionConsumer(JmsConnection connection, JmsConsumerInfo consumerInfo, MessageQueue messageQueue, ServerSessionPool sessionPool) throws JMSException {
    this.connection = connection;
    this.consumerInfo = consumerInfo;
    this.sessionPool = sessionPool;
    this.messageQueue = messageQueue;
    this.dispatcher = new ScheduledThreadPoolExecutor(1, new ThreadFactory() {

        @Override
        public Thread newThread(Runnable runner) {
            Thread serial = new Thread(runner);
            serial.setDaemon(true);
            serial.setName(this.getClass().getSimpleName() + ":(" + consumerInfo.getId() + ")");
            return serial;
        }
    });

    // Ensure a timely shutdown for consumer close.
    dispatcher.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
    dispatcher.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);

    connection.createResource(consumerInfo, new ProviderSynchronization() {

        @Override
        public void onPendingSuccess() {
            connection.addConnectionConsumer(consumerInfo, JmsConnectionConsumer.this);
        }

        @Override
        public void onPendingFailure(ProviderException cause) {
        }
    });
}
 
Example #11
Source File: ConnectionStub.java    From development with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createSharedConnectionConsumer(Topic arg0,
        String arg1, String arg2, ServerSessionPool arg3, int arg4)
                throws JMSException {
    // TODO Auto-generated method stub
    return null;
}
 
Example #12
Source File: JmsConnection.java    From qpid-jms with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createConnectionConsumer(Queue queue, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
    checkClosedOrFailed();
    createJmsConnection();

    return createConnectionConsumer(queue, messageSelector, sessionPool, maxMessages, null, false, false);
}
 
Example #13
Source File: ConnectionStub.java    From development with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createSharedDurableConnectionConsumer(Topic arg0,
        String arg1, String arg2, ServerSessionPool arg3, int arg4)
                throws JMSException {
    // TODO Auto-generated method stub
    return null;
}
 
Example #14
Source File: ActiveMQConnection.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic,
                                                                String subscriptionName,
                                                                String messageSelector,
                                                                ServerSessionPool sessionPool,
                                                                int maxMessages) throws JMSException {
   return null; // we offer RA
}
 
Example #15
Source File: ActiveMQConnection.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createSharedConnectionConsumer(Topic topic,
                                                         String subscriptionName,
                                                         String messageSelector,
                                                         ServerSessionPool sessionPool,
                                                         int maxMessages) throws JMSException {
   return null; // we offer RA
}
 
Example #16
Source File: ActiveMQConnection.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createConnectionConsumer(final Topic topic,
                                                   final String messageSelector,
                                                   final ServerSessionPool sessionPool,
                                                   final int maxMessages) throws JMSException {
   checkClosed();
   checkTempQueues(topic);
   return null;
}
 
Example #17
Source File: ActiveMQConnection.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createConnectionConsumer(final Destination destination,
                                                   final String messageSelector,
                                                   final ServerSessionPool sessionPool,
                                                   final int maxMessages) throws JMSException {
   checkClosed();

   checkTempQueues(destination);

   // We offer a RA, so no need to implement this for MDBs
   return null;
}
 
Example #18
Source File: ActiveMQRASessionFactoryImpl.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic,
                                                                String subscriptionName,
                                                                String messageSelector,
                                                                ServerSessionPool sessionPool,
                                                                int maxMessages) throws JMSException {
   if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
      ActiveMQRALogger.LOGGER.trace("createSharedDurableConnectionConsumer(" + topic + ", " + subscriptionName +
                                       ", " + messageSelector + ", " + sessionPool + ", " + maxMessages + ")");
   }

   throw new IllegalStateException(ISE);
}
 
Example #19
Source File: ActiveMQRASessionFactoryImpl.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createSharedConnectionConsumer(Topic topic,
                                                         String subscriptionName,
                                                         String messageSelector,
                                                         ServerSessionPool sessionPool,
                                                         int maxMessages) throws JMSException {
   if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
      ActiveMQRALogger.LOGGER.trace("createSharedConnectionConsumer(" + topic + ", " + subscriptionName + ", " +
                                       messageSelector + ", " + sessionPool + ", " + maxMessages + ")");
   }

   throw new IllegalStateException(ISE);
}
 
Example #20
Source File: ActiveMQRASessionFactoryImpl.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
/**
 * Create a connection consumer -- throws IllegalStateException
 *
 * @param destination The destination
 * @param pool        The session pool
 * @param maxMessages The number of max messages
 * @return The connection consumer
 * @throws JMSException Thrown if an error occurs
 */
public ConnectionConsumer createConnectionConsumer(final Destination destination,
                                                   final ServerSessionPool pool,
                                                   final int maxMessages) throws JMSException {
   if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
      ActiveMQRALogger.LOGGER.trace("createConnectionConsumer(" + destination +
                                       ", " +
                                       pool +
                                       ", " +
                                       maxMessages +
                                       ")");
   }

   throw new IllegalStateException(ISE);
}
 
Example #21
Source File: ManagedTopicConnection.java    From ats-framework with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createConnectionConsumer(
                                                    Topic topic,
                                                    String messageSelector,
                                                    ServerSessionPool sessionPool,
                                                    int maxMessages ) throws JMSException {

    return addConnectionConsumer(topicConnection.createConnectionConsumer(topic,
                                                                          messageSelector,
                                                                          sessionPool,
                                                                          maxMessages));
}
 
Example #22
Source File: ManagedConnection.java    From ats-framework with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createConnectionConsumer(
                                                    Destination destination,
                                                    String messageSelector,
                                                    ServerSessionPool sessionPool,
                                                    int maxMessages ) throws JMSException {

    return connection.createConnectionConsumer(destination, messageSelector, sessionPool, maxMessages);
}
 
Example #23
Source File: ManagedConnection.java    From ats-framework with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createDurableConnectionConsumer(
                                                           Topic topic,
                                                           String subscriptionName,
                                                           String messageSelector,
                                                           ServerSessionPool sessionPool,
                                                           int maxMessages ) throws JMSException {

    return connection.createDurableConnectionConsumer(topic,
                                                      subscriptionName,
                                                      messageSelector,
                                                      sessionPool,
                                                      maxMessages);
}
 
Example #24
Source File: ManagedQueueConnection.java    From ats-framework with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createConnectionConsumer(
                                                    Queue queue,
                                                    String messageSelector,
                                                    ServerSessionPool sessionPool,
                                                    int maxMessages ) throws JMSException {

    return addConnectionConsumer(queueConnection.createConnectionConsumer(queue,
                                                                          messageSelector,
                                                                          sessionPool,
                                                                          maxMessages));
}
 
Example #25
Source File: ManagedQueueTopicConnection.java    From ats-framework with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createConnectionConsumer(
                                                    Queue queue,
                                                    String messageSelector,
                                                    ServerSessionPool sessionPool,
                                                    int maxMessages ) throws JMSException {

    return addConnectionConsumer( ((QueueConnection) connection).createConnectionConsumer(queue,
                                                                                          messageSelector,
                                                                                          sessionPool,
                                                                                          maxMessages));
}
 
Example #26
Source File: ManagedQueueTopicConnection.java    From ats-framework with Apache License 2.0 5 votes vote down vote up
@Override
public ConnectionConsumer createConnectionConsumer(
                                                    Topic topic,
                                                    String messageSelector,
                                                    ServerSessionPool sessionPool,
                                                    int maxMessages ) throws JMSException {

    return addConnectionConsumer( ((TopicConnection) connection).createConnectionConsumer(topic,
                                                                                          messageSelector,
                                                                                          sessionPool,
                                                                                          maxMessages));
}
 
Example #27
Source File: TestConnection.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String paramName, String paramName1, ServerSessionPool serverSessionPool, int i) throws JMSException {
	return null;
}
 
Example #28
Source File: TestJMSConnection.java    From development with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic, String s, String s1,
    ServerSessionPool serverSessionPool, int i) throws JMSException {
    return null;
}
 
Example #29
Source File: FakeConnection.java    From kieker with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public ConnectionConsumer createDurableConnectionConsumer(final Topic arg0, final String arg1, final String arg2, final ServerSessionPool arg3, final int arg4)
		throws JMSException {
	return null;
}
 
Example #30
Source File: TestJMSConnection.java    From development with Apache License 2.0 4 votes vote down vote up
public ConnectionConsumer createDurableConnectionConsumer(Topic arg0,
        String arg1, String arg2, ServerSessionPool arg3, int arg4)
        throws JMSException {
    throw new UnsupportedOperationException();
}