Class JMSServerManagerImpl

java.lang.Object
org.apache.activemq.artemis.core.server.impl.CleaningActivateCallback
org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl
All Implemented Interfaces:
org.apache.activemq.artemis.core.server.ActivateCallback, org.apache.activemq.artemis.core.server.ActiveMQComponent, JMSServerManager

@Deprecated public class JMSServerManagerImpl extends org.apache.activemq.artemis.core.server.impl.CleaningActivateCallback implements JMSServerManager
Deprecated.
A Deployer used to create and add to Bindings queues, topics and connection factories. Typically this would only be used in an app server env.

JMS Connection Factories and Destinations can be configured either using configuration files or using a JMSConfiguration object.

If configuration files are used, JMS resources are redeployed if the files content is changed. If a JMSConfiguration object is used, the JMS resources can not be redeployed.

  • Constructor Details

    • JMSServerManagerImpl

      public JMSServerManagerImpl(org.apache.activemq.artemis.core.server.ActiveMQServer server) throws Exception
      Deprecated.
      Throws:
      Exception
    • JMSServerManagerImpl

      public JMSServerManagerImpl(org.apache.activemq.artemis.core.server.ActiveMQServer server, BindingRegistry registry) throws Exception
      Deprecated.
      This constructor is used by the Application Server's integration
      Throws:
      Exception
    • JMSServerManagerImpl

      public JMSServerManagerImpl(org.apache.activemq.artemis.core.server.ActiveMQServer server, JMSConfiguration configuration) throws Exception
      Deprecated.
      Throws:
      Exception
  • Method Details

    • activated

      public void activated()
      Deprecated.
      Specified by:
      activated in interface org.apache.activemq.artemis.core.server.ActivateCallback
    • deActivate

      public void deActivate()
      Deprecated.
      Specified by:
      deActivate in interface org.apache.activemq.artemis.core.server.ActivateCallback
    • activationComplete

      public void activationComplete()
      Deprecated.
      Specified by:
      activationComplete in interface org.apache.activemq.artemis.core.server.ActivateCallback
    • recoverregistryBindings

      public void recoverregistryBindings(String name, PersistedType type) throws NamingException
      Deprecated.
      Throws:
      NamingException
    • start

      public void start() throws Exception
      Deprecated.
      Notice that this component has a startCalled boolean to control its internal life-cycle, but its isStarted() returns the value of server.isStarted() and not the value of startCalled.

      This method and server.start() are interdependent in the following way:

      1. start() is called, it sets start_called=true, and calls ActiveMQServerImpl.start()
      2. ActiveMQServerImpl.start() will call activated()
      3. activated() checks the value of startCalled, which must already be true.
      Specified by:
      start in interface org.apache.activemq.artemis.core.server.ActiveMQComponent
      Throws:
      Exception
    • stop

      public void stop() throws Exception
      Deprecated.
      Specified by:
      stop in interface org.apache.activemq.artemis.core.server.ActiveMQComponent
      Throws:
      Exception
    • isStarted

      public boolean isStarted()
      Deprecated.
      Description copied from interface: JMSServerManager
      Has the Server been started.
      Specified by:
      isStarted in interface org.apache.activemq.artemis.core.server.ActiveMQComponent
      Specified by:
      isStarted in interface JMSServerManager
      Returns:
      true if the server us running
    • getRegistry

      public BindingRegistry getRegistry()
      Deprecated.
      Specified by:
      getRegistry in interface JMSServerManager
    • setRegistry

      public void setRegistry(BindingRegistry registry)
      Deprecated.
      Description copied from interface: JMSServerManager
      Set this property if you want JMS resources bound to a registry
      Specified by:
      setRegistry in interface JMSServerManager
    • getActiveMQServer

      public org.apache.activemq.artemis.core.server.ActiveMQServer getActiveMQServer()
      Deprecated.
      Specified by:
      getActiveMQServer in interface JMSServerManager
    • addAddressSettings

      public void addAddressSettings(String address, org.apache.activemq.artemis.core.settings.impl.AddressSettings addressSettings)
      Deprecated.
      Specified by:
      addAddressSettings in interface JMSServerManager
    • getAddressSettings

      public org.apache.activemq.artemis.core.settings.impl.AddressSettings getAddressSettings(String address)
      Deprecated.
      Specified by:
      getAddressSettings in interface JMSServerManager
    • addSecurity

      public void addSecurity(String addressMatch, Set<org.apache.activemq.artemis.core.security.Role> roles)
      Deprecated.
      Specified by:
      addSecurity in interface JMSServerManager
    • getSecurity

      public Set<org.apache.activemq.artemis.core.security.Role> getSecurity(String addressMatch)
      Deprecated.
      Specified by:
      getSecurity in interface JMSServerManager
    • getVersion

      public String getVersion()
      Deprecated.
      Specified by:
      getVersion in interface JMSServerManager
    • createQueue

      public boolean createQueue(boolean storeConfig, String queueName, String selectorString, boolean durable, String... bindings) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      Creates a JMS Queue.
      Specified by:
      createQueue in interface JMSServerManager
      Parameters:
      queueName - The name of the queue to create
      Returns:
      true if the queue is created or if it existed and was added to the Binding Registry
      Throws:
      Exception - if problems were encountered creating the queue.
    • createQueue

      public boolean createQueue(boolean storeConfig, String queueName, String jmsQueueName, String selectorString, boolean durable, String... bindings) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      Creates a JMS Queue.
      Specified by:
      createQueue in interface JMSServerManager
      Parameters:
      queueName - The name of the core queue to create
      jmsQueueName - the name of this JMS queue
      Returns:
      true if the queue is created or if it existed and was added to the Binding Registry
      Throws:
      Exception - if problems were encountered creating the queue.
    • internalCreateJMSQueue

      protected boolean internalCreateJMSQueue(boolean storeConfig, String queueName, String jmsQueueName, String selectorString, boolean durable, boolean autoCreated, String... bindings) throws Exception
      Deprecated.
      Throws:
      Exception
    • createTopic

      public boolean createTopic(boolean storeConfig, String address, String... bindings) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      Creates a JMS Topic
      Specified by:
      createTopic in interface JMSServerManager
      Parameters:
      address - the core addres of thetopic
      bindings - the names of the binding for the Binding Registry or BindingRegistry
      Returns:
      true if the topic was created or if it existed and was added to the Binding Registry
      Throws:
      Exception - if a problem occurred creating the topic
    • createTopic

      public boolean createTopic(String address, boolean storeConfig, String topicName, String... bindings) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      Creates a JMS Topic
      Specified by:
      createTopic in interface JMSServerManager
      Parameters:
      address - the core addres of thetopic
      topicName - the name of the topic
      bindings - the names of the binding for the Binding Registry or BindingRegistry
      Returns:
      true if the topic was created or if it existed and was added to the Binding Registry
      Throws:
      Exception - if a problem occurred creating the topic
    • createTopic

      public boolean createTopic(boolean storeConfig, String address, boolean autoCreated, String... bindings) throws Exception
      Deprecated.
      Specified by:
      createTopic in interface JMSServerManager
      Throws:
      Exception
    • createTopic

      public boolean createTopic(boolean storeConfig, String address, String topicName, boolean autoCreated, String... bindings) throws Exception
      Deprecated.
      Specified by:
      createTopic in interface JMSServerManager
      Throws:
      Exception
    • addTopicToBindingRegistry

      public boolean addTopicToBindingRegistry(String topicName, String registryBinding) throws Exception
      Deprecated.
      Specified by:
      addTopicToBindingRegistry in interface JMSServerManager
      Throws:
      Exception
    • getBindingsOnQueue

      public String[] getBindingsOnQueue(String queue)
      Deprecated.
      Specified by:
      getBindingsOnQueue in interface JMSServerManager
    • getBindingsOnTopic

      public String[] getBindingsOnTopic(String topic)
      Deprecated.
      Specified by:
      getBindingsOnTopic in interface JMSServerManager
    • getBindingsOnConnectionFactory

      public String[] getBindingsOnConnectionFactory(String factoryName)
      Deprecated.
      Specified by:
      getBindingsOnConnectionFactory in interface JMSServerManager
    • addQueueToBindingRegistry

      public boolean addQueueToBindingRegistry(String queueName, String registryBinding) throws Exception
      Deprecated.
      Specified by:
      addQueueToBindingRegistry in interface JMSServerManager
      Throws:
      Exception
    • addConnectionFactoryToBindingRegistry

      public boolean addConnectionFactoryToBindingRegistry(String name, String registryBinding) throws Exception
      Deprecated.
      Specified by:
      addConnectionFactoryToBindingRegistry in interface JMSServerManager
      Throws:
      Exception
    • removeQueueFromBindingRegistry

      public boolean removeQueueFromBindingRegistry(String name, String bindings) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      Remove the queue from the BindingRegistry. Calling this method does not destroy the destination.
      Specified by:
      removeQueueFromBindingRegistry in interface JMSServerManager
      Parameters:
      name - the name of the destination to remove from the BindingRegistry
      Returns:
      true if removed
      Throws:
      Exception - if a problem occurred removing the destination
    • removeQueueFromBindingRegistry

      public boolean removeQueueFromBindingRegistry(String name) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      Remove the queue from the BindingRegistry. Calling this method does not destroy the destination.
      Specified by:
      removeQueueFromBindingRegistry in interface JMSServerManager
      Parameters:
      name - the name of the destination to remove from the BindingRegistry
      Returns:
      true if removed
      Throws:
      Exception - if a problem occurred removing the destination
    • removeTopicFromBindingRegistry

      public boolean removeTopicFromBindingRegistry(String name, String bindings) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      Remove the topic from the Binding Registry or BindingRegistry. Calling this method does not destroy the destination.
      Specified by:
      removeTopicFromBindingRegistry in interface JMSServerManager
      Parameters:
      name - the name of the destination to remove from the BindingRegistry
      Returns:
      true if removed
      Throws:
      Exception - if a problem occurred removing the destination
    • removeTopicFromBindingRegistry

      public boolean removeTopicFromBindingRegistry(String name) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      Remove the topic from the BindingRegistry. Calling this method does not destroy the destination.
      Specified by:
      removeTopicFromBindingRegistry in interface JMSServerManager
      Parameters:
      name - the name of the destination to remove from the BindingRegistry
      Returns:
      true if removed
      Throws:
      Exception - if a problem occurred removing the destination
    • removeConnectionFactoryFromBindingRegistry

      public boolean removeConnectionFactoryFromBindingRegistry(String name, String bindings) throws Exception
      Deprecated.
      Specified by:
      removeConnectionFactoryFromBindingRegistry in interface JMSServerManager
      Throws:
      Exception
    • removeConnectionFactoryFromBindingRegistry

      public boolean removeConnectionFactoryFromBindingRegistry(String name) throws Exception
      Deprecated.
      Specified by:
      removeConnectionFactoryFromBindingRegistry in interface JMSServerManager
      Throws:
      Exception
    • destroyQueue

      public boolean destroyQueue(String name) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      destroys a queue and removes it from the BindingRegistry
      Specified by:
      destroyQueue in interface JMSServerManager
      Parameters:
      name - the name of the queue to destroy
      Returns:
      true if destroyed
      Throws:
      Exception - if a problem occurred destroying the queue
    • destroyQueue

      public boolean destroyQueue(String name, boolean removeConsumers) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      destroys a queue and removes it from the BindingRegistry. disconnects any consumers connected to the queue.
      Specified by:
      destroyQueue in interface JMSServerManager
      Parameters:
      name - the name of the queue to destroy
      Returns:
      true if destroyed
      Throws:
      Exception - if a problem occurred destroying the queue
    • destroyTopic

      public boolean destroyTopic(String name) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      destroys a topic and removes it from theBindingRegistry
      Specified by:
      destroyTopic in interface JMSServerManager
      Parameters:
      name - the name of the topic to destroy
      Returns:
      true if the topic was destroyed
      Throws:
      Exception - if a problem occurred destroying the topic
    • destroyTopic

      public boolean destroyTopic(String name, boolean removeConsumers) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      destroys a topic and removes it from the BindingRegistry
      Specified by:
      destroyTopic in interface JMSServerManager
      Parameters:
      name - the name of the topic to destroy
      Returns:
      true if the topic was destroyed
      Throws:
      Exception - if a problem occurred destroying the topic
    • createConnectionFactory

      public void createConnectionFactory(String name, boolean ha, JMSFactoryType cfType, List<String> connectorNames, String... registryBindings) throws Exception
      Deprecated.
      Specified by:
      createConnectionFactory in interface JMSServerManager
      Throws:
      Exception
    • createConnectionFactory

      public void createConnectionFactory(String name, boolean ha, JMSFactoryType cfType, List<String> connectorNames, String clientID, long clientFailureCheckPeriod, long connectionTTL, long callTimeout, long callFailoverTimeout, boolean cacheLargeMessagesClient, int minLargeMessageSize, boolean compressLargeMessage, int compressionLevel, int consumerWindowSize, int consumerMaxRate, int confirmationWindowSize, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean blockOnDurableSend, boolean blockOnNonDurableSend, boolean autoGroup, boolean preAcknowledge, String loadBalancingPolicyClassName, int transactionBatchSize, int dupsOKBatchSize, boolean useGlobalPools, int scheduledThreadPoolMaxSize, int threadPoolMaxSize, long retryInterval, double retryIntervalMultiplier, long maxRetryInterval, int reconnectAttempts, boolean failoverOnInitialConnection, String groupId, String... registryBindings) throws Exception
      Deprecated.
      Specified by:
      createConnectionFactory in interface JMSServerManager
      Throws:
      Exception
    • createConnectionFactory

      public void createConnectionFactory(String name, boolean ha, JMSFactoryType cfType, String discoveryGroupName, String clientID, long clientFailureCheckPeriod, long connectionTTL, long callTimeout, long callFailoverTimeout, boolean cacheLargeMessagesClient, int minLargeMessageSize, boolean compressLargeMessages, int compressionLevel, int consumerWindowSize, int consumerMaxRate, int confirmationWindowSize, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean blockOnDurableSend, boolean blockOnNonDurableSend, boolean autoGroup, boolean preAcknowledge, String loadBalancingPolicyClassName, int transactionBatchSize, int dupsOKBatchSize, boolean useGlobalPools, int scheduledThreadPoolMaxSize, int threadPoolMaxSize, long retryInterval, double retryIntervalMultiplier, long maxRetryInterval, int reconnectAttempts, boolean failoverOnInitialConnection, String groupId, String... registryBindings) throws Exception
      Deprecated.
      Specified by:
      createConnectionFactory in interface JMSServerManager
      Throws:
      Exception
    • createConnectionFactory

      public void createConnectionFactory(String name, boolean ha, JMSFactoryType cfType, String discoveryGroupName, String... registryBindings) throws Exception
      Deprecated.
      Specified by:
      createConnectionFactory in interface JMSServerManager
      Throws:
      Exception
    • recreateCF

      public org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory recreateCF(String name, ConnectionFactoryConfiguration cf) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      Call this method to have a CF rebound to the Binding Registry and stored on the Journal
      Specified by:
      recreateCF in interface JMSServerManager
      Throws:
      Exception
    • createConnectionFactory

      public void createConnectionFactory(boolean storeConfig, ConnectionFactoryConfiguration cfConfig, String... bindings) throws Exception
      Deprecated.
      Specified by:
      createConnectionFactory in interface JMSServerManager
      Throws:
      Exception
    • getJMSStorageManager

      public JMSStorageManager getJMSStorageManager()
      Deprecated.
    • replaceStorageManager

      public void replaceStorageManager(JMSStorageManager newStorage)
      Deprecated.
    • internalCreateCFPOJO

      protected org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory internalCreateCFPOJO(ConnectionFactoryConfiguration cfConfig) throws ActiveMQException
      Deprecated.
      Throws:
      ActiveMQException
    • destroyConnectionFactory

      public boolean destroyConnectionFactory(String name) throws Exception
      Deprecated.
      Description copied from interface: JMSServerManager
      destroys a connection factory.
      Specified by:
      destroyConnectionFactory in interface JMSServerManager
      Parameters:
      name - the name of the connection factory to destroy
      Returns:
      true if the connection factory was destroyed
      Throws:
      Exception - if a problem occurred destroying the connection factory
    • shutdownConnectionFactory

      protected boolean shutdownConnectionFactory(String name) throws Exception
      Deprecated.
      Throws:
      Exception
    • listRemoteAddresses

      public String[] listRemoteAddresses() throws Exception
      Deprecated.
      Specified by:
      listRemoteAddresses in interface JMSServerManager
      Throws:
      Exception
    • listRemoteAddresses

      public String[] listRemoteAddresses(String ipAddress) throws Exception
      Deprecated.
      Specified by:
      listRemoteAddresses in interface JMSServerManager
      Throws:
      Exception
    • closeConnectionsForAddress

      public boolean closeConnectionsForAddress(String ipAddress) throws Exception
      Deprecated.
      Specified by:
      closeConnectionsForAddress in interface JMSServerManager
      Throws:
      Exception
    • closeConsumerConnectionsForAddress

      public boolean closeConsumerConnectionsForAddress(String address) throws Exception
      Deprecated.
      Specified by:
      closeConsumerConnectionsForAddress in interface JMSServerManager
      Throws:
      Exception
    • closeConnectionsForUser

      public boolean closeConnectionsForUser(String userName) throws Exception
      Deprecated.
      Specified by:
      closeConnectionsForUser in interface JMSServerManager
      Throws:
      Exception
    • listConnectionIDs

      public String[] listConnectionIDs() throws Exception
      Deprecated.
      Specified by:
      listConnectionIDs in interface JMSServerManager
      Throws:
      Exception
    • listSessions

      public String[] listSessions(String connectionID) throws Exception
      Deprecated.
      Specified by:
      listSessions in interface JMSServerManager
      Throws:
      Exception
    • listSessionsAsJSON

      public String listSessionsAsJSON(String connectionID) throws Exception
      Deprecated.
      Specified by:
      listSessionsAsJSON in interface JMSServerManager
      Throws:
      Exception
    • listPreparedTransactionDetailsAsJSON

      public String listPreparedTransactionDetailsAsJSON() throws Exception
      Deprecated.
      Specified by:
      listPreparedTransactionDetailsAsJSON in interface JMSServerManager
      Throws:
      Exception
    • listPreparedTransactionDetailsAsHTML

      @Deprecated public String listPreparedTransactionDetailsAsHTML() throws Exception
      Deprecated.
      Specified by:
      listPreparedTransactionDetailsAsHTML in interface JMSServerManager
      Throws:
      Exception