Class JmsSettings

java.lang.Object
com.northconcepts.datapipeline.core.DataObject
com.northconcepts.datapipeline.jms.JmsSettings

public class JmsSettings extends DataObject
The configuration used to connect to a JmsReader or JmsWriter.
  • Constructor Details

    • JmsSettings

      public JmsSettings(String instanceName, JmsDestinationType type, Properties properties)
      Parameters:
      instanceName - the name of the Topic or Queue
      type - the type of messaging used
    • JmsSettings

      public JmsSettings(String name, JmsDestinationType type)
      Parameters:
      name - the name of the Topic or Queue
      type - the type of messaging used
  • Method Details

    • getProperties

      public Properties getProperties()
      Returns the JNDI environment used to look up the connection factory; it must not be empty when connecting.
    • setProperty

      public JmsSettings setProperty(String key, String value)
      Sets a JNDI environment property used to look up the connection factory.
    • getProperty

      public String getProperty(String key)
      Returns a JNDI environment property or null if it is not set.
    • getInstanceName

      public String getInstanceName()
      Returns the name of the queue or topic.
    • getType

      public JmsDestinationType getType()
    • isTransacted

      public boolean isTransacted()
      Indicates if the JMS session is created as transacted (default is false).
    • setTransacted

      public JmsSettings setTransacted(boolean transacted)
      Indicates if the JMS session is created as transacted (default is false).
    • getAcknowledgeMode

      public JmsAcknowledgeMode getAcknowledgeMode()
      Indicates how received messages should be acknowledged (default to JmsAcknowledgeMode.AUTO).
    • setAcknowledgeMode

      public JmsSettings setAcknowledgeMode(JmsAcknowledgeMode acknowledgeMode)
      Indicates how received messages should be acknowledged (default to JmsAcknowledgeMode.AUTO).
    • getJndiFactoryName

      public String getJndiFactoryName()
      Indicates the JNDI name to use when looking up the ConnectionFactory (defaults to "ConnectionFactory").
      Returns:
    • setJndiFactoryName

      public JmsSettings setJndiFactoryName(String jndiFactoryName)
      Indicates the JNDI name to use when looking up the ConnectionFactory (defaults to "ConnectionFactory").
    • getClientId

      public String getClientId()
      Returns the connection's client ID, also used as the durable subscription name when reading a topic.
    • setClientId

      public JmsSettings setClientId(String clientId)
      Sets the connection's client ID, also used as the durable subscription name when reading a topic.
    • addExceptionProperties

      public DataException addExceptionProperties(DataException exception)
      Description copied from class: DataObject
      Adds this object's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.
      Overrides:
      addExceptionProperties in class DataObject