@Test(timeout = 60000) public void testInstanceOf() throws Exception { cf = new JmsPoolConnectionFactory(); assertTrue(cf instanceof QueueConnectionFactory); assertTrue(cf instanceof TopicConnectionFactory); cf.stop(); }
public void stop() { if (stopped.compareAndSet(false, true)) { LOG.debug("Stopping the JmsPoolConnectionFactory, number of connections in cache: {}", connectionsPool != null ? connectionsPool.getNumActive() : 0); try { if (connectionsPool != null) { connectionsPool.close(); connectionsPool = null; } } catch (Exception ignored) { LOG.trace("Caught exception on close of the Connection pool: ", ignored); } } }
JmsPoolConnectionFactory implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory { public void stop() { if (stopped.compareAndSet(false, true)) { LOG.debug("Stopping the JmsPoolConnectionFactory, number of connections in cache: {}", connectionsPool != null ? connectionsPool.getNumActive() : 0); try { if (connectionsPool != null) { connectionsPool.close(); connectionsPool = null; } } catch (Exception ignored) { LOG.trace("Caught exception on close of the Connection pool: ", ignored); } } } }
JmsPoolConnectionFactory implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory { public void stop() { if (stopped.compareAndSet(false, true)) { LOG.debug("Stopping the JmsPoolConnectionFactory, number of connections in cache: {}", connectionsPool != null ? connectionsPool.getNumActive() : 0); try { if (connectionsPool != null) { connectionsPool.close(); connectionsPool = null; } } catch (Exception ignored) { LOG.trace("Caught exception on close of the Connection pool: ", ignored); } } }  }
JmsPoolConnectionFactory implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory { public void stop() { if (stopped.compareAndSet(false, true)) { LOG.debug("Stopping the JmsPoolConnectionFactory, number of connections in cache: {}", connectionsPool != null ? connectionsPool.getNumActive() : 0); try { if (connectionsPool != null) { connectionsPool.close(); connectionsPool = null; } } catch (Exception ignored) { LOG.trace("Caught exception on close of the Connection pool: ", ignored); } } }  void initConnectionsPool(); Object getConnectionFactory(); void setConnectionFactory(final Object factory); @Override QueueConnection createQueueConnection(); @Override QueueConnection createQueueConnection(String userName, String password); @Override TopicConnection createTopicConnection(); @Override TopicConnection createTopicConnection(String userName, String password); @Override Connection createConnection(); @Override Connection createConnection(String userName, String password); @Override JMSContext createContext(); @Override JMSContext createContext(int sessionMode); @Override JMSContext createContext(String username, String password); @Override JMSContext createContext(String username, String password, int sessionMode); void start(); void stop(); void clear(); int getMaxSessionsPerConnection(); void setMaxSessionsPerConnection(int maxSessionsPerConnection); void setBlockIfSessionPoolIsFull(boolean block); boolean isBlockIfSessionPoolIsFull(); int getMaxConnections(); void setMaxConnections(int maxConnections); int getConnectionIdleTimeout(); void setConnectionIdleTimeout(int connectionIdleTimeout); boolean isUseAnonymousProducers(); void setUseAnonymousProducers(boolean value); int getExplicitProducerCacheSize(); void setExplicitProducerCacheSize(int cacheSize); void setConnectionCheckInterval(long connectionCheckInterval); long getConnectionCheckInterval(); int getNumConnections(); long getBlockIfSessionPoolIsFullTimeout(); void setBlockIfSessionPoolIsFullTimeout(long blockIfSessionPoolIsFullTimeout); boolean isUseProviderJMSContext(); void setUseProviderJMSContext(boolean useProviderJMSContext); }
JmsPoolConnectionFactory implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory { public void stop() { if (stopped.compareAndSet(false, true)) { LOG.debug("Stopping the JmsPoolConnectionFactory, number of connections in cache: {}", connectionsPool != null ? connectionsPool.getNumActive() : 0); try { if (connectionsPool != null) { connectionsPool.close(); connectionsPool = null; } } catch (Exception ignored) { LOG.trace("Caught exception on close of the Connection pool: ", ignored); } } }  void initConnectionsPool(); Object getConnectionFactory(); void setConnectionFactory(final Object factory); @Override QueueConnection createQueueConnection(); @Override QueueConnection createQueueConnection(String userName, String password); @Override TopicConnection createTopicConnection(); @Override TopicConnection createTopicConnection(String userName, String password); @Override Connection createConnection(); @Override Connection createConnection(String userName, String password); @Override JMSContext createContext(); @Override JMSContext createContext(int sessionMode); @Override JMSContext createContext(String username, String password); @Override JMSContext createContext(String username, String password, int sessionMode); void start(); void stop(); void clear(); int getMaxSessionsPerConnection(); void setMaxSessionsPerConnection(int maxSessionsPerConnection); void setBlockIfSessionPoolIsFull(boolean block); boolean isBlockIfSessionPoolIsFull(); int getMaxConnections(); void setMaxConnections(int maxConnections); int getConnectionIdleTimeout(); void setConnectionIdleTimeout(int connectionIdleTimeout); boolean isUseAnonymousProducers(); void setUseAnonymousProducers(boolean value); int getExplicitProducerCacheSize(); void setExplicitProducerCacheSize(int cacheSize); void setConnectionCheckInterval(long connectionCheckInterval); long getConnectionCheckInterval(); int getNumConnections(); long getBlockIfSessionPoolIsFullTimeout(); void setBlockIfSessionPoolIsFullTimeout(long blockIfSessionPoolIsFullTimeout); boolean isUseProviderJMSContext(); void setUseProviderJMSContext(boolean useProviderJMSContext); static final int DEFAULT_MAX_CONNECTIONS; }