Class WmJMSConfig

java.lang.Object
com.webmethods.jms.WmJMSConfig

public class WmJMSConfig extends Object
Defines System properties and methods used to configure webMethods Broker API for JMS.
  • Field Details

    • CONFIG_FILENAME

      public static final String CONFIG_FILENAME
      The configuration file name. Upon starting a webMethods JMS client, the configuration file will be read and its properties loaded, if it exists.

      To override JMS provider-specific properties: 1. Create a properties file named wmjms.properties. 2. Add the properties that need to be overridden to that file. 3. Add the location of the file to the CLASSPATH.

      The configuration file name is defined as "wmjms.properties".

      See Also:
    • DEFAULT_BROKER_HOST

      public static final String DEFAULT_BROKER_HOST
      The default Broker host; defined as "localhost" .
      See Also:
    • DEFAULT_BROKER_PORT

      public static final int DEFAULT_BROKER_PORT
      The default Broker port; defined as 6849 .
      See Also:
    • SOCKET_CONNECT_TIMEOUT

      public static final String SOCKET_CONNECT_TIMEOUT
      The System property defining how long, in seconds, to wait for a socket connection to be created. A value of zero is interpreted as an infinite timeout.

      This System property is defined as "com.webmethods.jms.socket.connectTimeout".

      The default value is zero (infinite timeout).

      See Also:
    • SOCKET_TIMEOUT

      public static final String SOCKET_TIMEOUT
      Deprecated.
      This value is not used. Application always uses blocking socket read calls.
      See Also:
    • SOCKET_SEND_BUFFER_SIZE

      public static final String SOCKET_SEND_BUFFER_SIZE
      The System property defining the size of the outbound socket buffer in bytes.

      This System property is defined as "com.webmethods.jms.socket.sendBufferSize".

      The default value is 65536 bytes.

      See Also:
    • SOCKET_RECV_BUFFER_SIZE

      public static final String SOCKET_RECV_BUFFER_SIZE
      The System property defining the size of the inbound socket buffer in bytes.

      This System property is defined as "com.webmethods.jms.socket.recvBufferSize".

      The default value is 65536 bytes.

      See Also:
    • SOCKET_TCP_NO_DELAY

      public static final String SOCKET_TCP_NO_DELAY
      The System property to enable or disable Nagle's algorithm on the socket.

      This System property is defined as "com.webmethods.jms.socket.tcpNoDelay".

      The default value is "true".

      See Also:
    • SOCKET_LINGER

      public static final String SOCKET_LINGER
      The System property to enable or disable lingering upon socket close.

      This System property is defined as "com.webmethods.jms.socket.linger".

      The default value is "false".

      See Also:
    • SOCKET_LINGER_TIMEOUT

      public static final String SOCKET_LINGER_TIMEOUT
      The System property defining the number of seconds to linger if socket linger is enabled.

      This System property is defined as "com.webmethods.jms.socket.lingerTimeout".

      The default value is 1 second.

      See Also:
    • SOCKET_AUTO_FLUSH_SIZE

      public static final String SOCKET_AUTO_FLUSH_SIZE
      The System property defining the number of bytes to trigger auto-flushing to the socket. Increasing this value will improve publisher performance but may increase latency.

      This System property is defined as "com.webmethods.jms.socket.autoFlushSize".

      The default value is 32768 bytes.

      See Also:
    • SOCKET_AUTO_FLUSH_DELAY

      public static final String SOCKET_AUTO_FLUSH_DELAY
      The System property defining the number of milliseconds to trigger auto-flushing to the socket. Increasing this value will improve publisher performance but may increase latency. A recommended value for a fast publisher is 250 milliseconds.

      This System property is defined as "com.webmethods.jms.socket.autoFlushDelay".

      The default value is 0 milliseconds (no delay).

      See Also:
    • BROKER_TIMEOUT

      public static final String BROKER_TIMEOUT
      The System property defining the maximum number of seconds to wait for a response from the Broker. If no response is received from the Broker within this timeout then the connection is assumed lost.

      This System property is defined as "com.webmethods.jms.brokerTimeout".

      The default value is 60 seconds.

      See Also:
    • BROKER_IDLE_SOCKET_TIMEOUT

      public static final String BROKER_IDLE_SOCKET_TIMEOUT
      The System property defining the number of seconds to wait for a response from the Broker on an idle socket. If no response is received from the Broker within this timeout then the connection is assumed lost.

      This System property is defined as "com.webmethods.jms.brokerIdleSocketTimeout".

      The default value is 60 seconds.

      See Also:
    • BROKER_SOCKET_TIMEOUT_POST_CONNECTION_CLOSE

      public static final String BROKER_SOCKET_TIMEOUT_POST_CONNECTION_CLOSE
      The System property defining the number of seconds to wait for a response from the Broker on the corresponding socket, after JMS Connection close has been called.

      This System property is defined as "com.webmethods.jms.brokerTimeoutPostConnectionClose".

      The default value is 30 seconds.

      See Also:
    • KEEP_ALIVE_INTERVAL

      public static final String KEEP_ALIVE_INTERVAL
      The System property defining how often, in seconds, a keep-alive is sent from the JMS client to the Broker. A value of 0 disables keep-alives.

      This System property is defined as "com.webmethods.jms.keepAliveInterval".

      The default value is 30 (disabled).

      See Also:
    • KEEP_ALIVE_ATTEMPTS

      public static final String KEEP_ALIVE_ATTEMPTS
      The System property defining how many times the ping could time out before declaring the connection as dropped.

      This System property is defined as "com.webmethods.jms.keepAliveAttempts".

      The default value is 2.

      See Also:
    • KEEP_ALIVE_ATTEMPTS_BEFORE_DECLARING_CONNECTION_DROPPED

      public static final String KEEP_ALIVE_ATTEMPTS_BEFORE_DECLARING_CONNECTION_DROPPED
      Deprecated.
      use KEEP_ALIVE_ATTEMPTS instead.
      The System property defining how many times the ping could time out before declaring the connection as dropped.
      See Also:
    • RECONNECT_DELAY

      public static final String RECONNECT_DELAY
      The System property defining the maximum amount of time, in seconds, to delay before attempting to reconnect to a Broker.

      This System property is defined as "com.webmethods.jms.reconnectDelay".

      The default value is 15 seconds.

      See Also:
    • RECONNECT_ATTEMPTS

      public static final String RECONNECT_ATTEMPTS
      The System property defining the number of times to attempt to reconnect to a Broker. A value of 0 disables reconnect attempts.

      It is recommended that reconnect attempts be disabled when running within an application server so that distributed transactions can be recovered properly. An application server will register a connection exception listener and should handle reconnection properly for distributed transactions.

      This System property is defined as "com.webmethods.jms.reconnectAttempts".

      The default value is 0 (disabled).

      See Also:
    • BROKER_KEEP_ALIVE_INTERVAL

      public static final String BROKER_KEEP_ALIVE_INTERVAL
      The System property defining how often, in seconds, a keep-alive is sent from the Broker to the JMS client. When the JMS client receives a keep-alive from the Broker it will immediately respond to it with a keep-alive response.

      A value of 0 disables the sending of keep-alives from the Broker to the JMS client.

      This System property is defined as "com.webmethods.jms.broker.keepAliveInterval".

      The default value is 60 seconds.

      See Also:
    • BROKER_KEEP_ALIVE_TIMEOUT

      public static final String BROKER_KEEP_ALIVE_TIMEOUT
      The System property defining the number of seconds the Broker will wait for activity from the JMS client. This activity can be a response to a keep-alive sent from the Broker to the JMS client or any other traffic sent from the JMS client to the Broker. If the Broker does not see any activity from the JMS client within this timeout the Broker will disconnect the JMS client if the keep-alive attempts have been exhausted.

      A value of 0 is equivalent to an infinite timeout.

      This System property is defined as "com.webmethods.jms.broker.keepAliveTimeout".

      The default value is 60 seconds.

      See Also:
    • BROKER_KEEP_ALIVE_ATTEMPTS

      public static final String BROKER_KEEP_ALIVE_ATTEMPTS
      The System property defining the number of times the Broker will attempt a keep-alive before disconnecting the JMS client.

      This System property is defined as "com.webMethods.jms.broker.keepAliveAttempts".

      The default value is 1 attempt.

      See Also:
    • CONFIRM_DELIVERY

      public static final String CONFIRM_DELIVERY
      This System property enables or disables message delivery confirmation for persistent messages.

      This System property is defined as "com.webmethods.jms.confirmDelivery".

      The default value is "true".

      See Also:
    • DISABLE_MESSAGE_DESTINATION

      public static final String DISABLE_MESSAGE_DESTINATION
      This System property enables or disables message destinations being sent with a message. This may be used as an optimization to reduce the overhead associated with sending the message's destination.

      This System property is defined as "com.webmethods.jms.disableMessageDestination".

      The default value is "false".

      See Also:
    • DISABLE_MESSAGE_ID

      public static final String DISABLE_MESSAGE_ID
      This System property enables or disables message IDs being sent in a message. This may be used as an optimization to reduce the overhead associated with sending the message's ID. This System property has the equivalent functionality of MessageProducer.setDisableMessageID(boolean).

      This System property is defined as "com.webmethods.jms.disableMessageID".

      The default value is "false".

      See Also:
    • DISABLE_MESSAGE_TIMESTAMP

      public static final String DISABLE_MESSAGE_TIMESTAMP
      This System property enables or disables message timestamps being sent in a message. This may be used as an optimization to reduce the overhead associated with sending the message's timestamp. This System property has the equivalent functionality of MessageProducer.setDisableMessageTimestamp(boolean).

      This System property is defined as "com.webmethods.jms.disableMessageTimestamp".

      The default value is "false".

      See Also:
    • MAX_RECEIVE

      public static final String MAX_RECEIVE
      The System property defining the maximum number of messages to be sent from the Broker to a consumer at one time. For a consumer which is using cluster connection factory, the effective value of this property may be less: approximately equal to com.webmethods.jms.maxReceive / number of Brokers.

      This System property is defined as "com.webmethods.jms.maxReceive".

      The default value is 160.

      See Also:
    • AUTO_ACK_BATCHSIZE_RETRY

      public static final String AUTO_ACK_BATCHSIZE_RETRY
      The System property to define the number of retries to ensure that the AUTO_ACK_BATCHSIZE is reached for sending the message acknowledgements in a batch. This property is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.

      This System property is defined as "com.webmethods.jms.autoAckBatchSizeRetry".

      The default value is 3.

      See Also:
    • AUTO_ACK_BATCHSIZE

      public static final String AUTO_ACK_BATCHSIZE
      The System property to define the batch size for message acknowledgment. By default it is set to MAX_RECEIVE. This property is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.

      This System property is defined as "com.webmethods.jms.autoAckBatchSize".

      The default value is MAX_RECEIVE.

      See Also:
    • AUTO_ACK_SERVICE_POLL_INTERVAL

      public static final String AUTO_ACK_SERVICE_POLL_INTERVAL
      The system property to define the poll interval for automatic message acknowledgment service. This property is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.

      This System property is defined as "com.webmethods.jms.autoAckServicePollInterval".

      The default value is 1 second.

      See Also:
    • AUTO_ACK_SERVICE_MIN_WAIT_TIME

      public static final String AUTO_ACK_SERVICE_MIN_WAIT_TIME
      The system property to define the minimum wait time for auto acknowledgement service. This property is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.

      This System property is defined as "com.webmethods.jms.autoAckServiceMinWaitTime".

      The default value is 1 millisecond.

      See Also:
    • AUTO_ACK_SERVICE_MAX_WAIT_TIME

      public static final String AUTO_ACK_SERVICE_MAX_WAIT_TIME
      The system property to define the maximum wait time for auto acknowledgement service. This property is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.

      This System property is defined as "com.webmethods.jms.autoAckServiceMaxWaitTime".

      The default value is 10 millisecond.

      See Also:
    • DEFAULT_DELIVERY_MODE

      public static final String DEFAULT_DELIVERY_MODE
      The System property defining the message producer's default delivery mode.

      This System property is defined as "com.webmethods.jms.defaultDeliveryMode".

      The default value is Message.DEFAULT_DELIVERY_MODE.

      See Also:
    • DEFAULT_PRIORITY

      public static final String DEFAULT_PRIORITY
      The System property defining the message producer's default priority.

      This System property is defined as "com.webmethods.jms.defaultPriority".

      The default value is Message.DEFAULT_PRIORITY.

      See Also:
    • DEFAULT_TIME_TO_LIVE

      public static final String DEFAULT_TIME_TO_LIVE
      The System property defining the message producer's default time to live.

      This System property is defined as "com.webmethods.jms.defaultTimeToLive".

      The default value is Message.DEFAULT_TIME_TO_LIVE.

      See Also:
    • COMPRESSION_THRESHOLD

      public static final String COMPRESSION_THRESHOLD
      The System property defining the message producer's default compression threshold.

      This System property is defined as "com.webmethods.jms.compressionThreshold".

      The default value is -1 (no compression).

      See Also:
    • AUTO_QUEUE_CREATE

      public static final String AUTO_QUEUE_CREATE
      The System property enabling or disabling automatic queue creation. When disabled, if a queue receiver or browser attempts to connect to a non-existent queue then an InvalidDestinationException will be thrown. When enabled, the queue will automatically be created.

      This System property is defined as "com.webmethods.jms.autoQueueCreate".

      The default value is "false".

      See Also:
    • CLIENT_ID_SHARING

      public static final String CLIENT_ID_SHARING
      The System property enabling or disabling the sharing of client identifiers. JMS prohibits clients from sharing client identifiers. This propery can be used to allow clients to share the same client identifier. This is required when creating shared-state durable subscribers.

      This System property is defined as "com.webmethods.jms.clientIDSharing".

      The default value is "false".

      See Also:
    • USERNAME

      public static final String USERNAME
      The System property to set the default username to be used with the connection.

      This System property is defined as "com.webmethods.jms.username".

      The default value is null.

      See Also:
    • PASSWORD

      public static final String PASSWORD
      The System property to set the default password to be used with the connection.

      This System property is defined as "com.webmethods.jms.password".

      The default value is null.

      See Also:
    • SSL_KEYSTORE

      public static final String SSL_KEYSTORE
      The System property to set the default SSL keystore to be used with the connection.

      This System property is defined as "com.webmethods.jms.ssl.keystore".

      The default value is null.

      See Also:
    • SSL_KEYSTORETYPE

      public static final String SSL_KEYSTORETYPE
      The System property to set the default SSL keystore type to be used with the connection.

      This System property is defined as "com.webmethods.jms.ssl.keystoretype".

      The default value is null.

      See Also:
    • SSL_TRUSTSTORE

      public static final String SSL_TRUSTSTORE
      The System property to set the default SSL truststore to be used with the connection.

      This System property is defined as "com.webmethods.jms.ssl.truststore".

      The default value is null.

      See Also:
    • SSL_TRUSTSTORETYPE

      public static final String SSL_TRUSTSTORETYPE
      The System property to set the default SSL truststore type to be used with the connection.

      This System property is defined as "com.webmethods.jms.ssl.truststoretype".

      The default value is null.

      See Also:
    • SSL_PROVIDER

      public static final String SSL_PROVIDER
      The System property to set the default SSL provider to be used with the connection.

      This System property is defined as "com.webmethods.jms.ssl.provider".

      The default value is null.

      See Also:
    • MAX_SSL_SOCKET_HANDSHAKE_COUNT

      public static final String MAX_SSL_SOCKET_HANDSHAKE_COUNT
      System property to limit the number of SSL connections performing handshake at a time. In case the maximum number of SSL connections is already performing the handshake, this connection request will wait for a maximum of DEFAULT_MAX_SSL_SOCKET_HANDSHAKE_WAIT_TIMEOUT time to get its turn to start the SSL handshake.

      This System property is defined as "com.webmethods.jms.ssl.maxSocketHandshakeCount".

      The default value is 16.

      See Also:
    • MAX_SSL_SOCKET_HANDSHAKE_WAIT_TIMEOUT

      public static final String MAX_SSL_SOCKET_HANDSHAKE_WAIT_TIMEOUT
      System property to set the connection timeout in seconds when a SSL connection starts the handshake.

      This System property is defined as "com.webmethods.jms.ssl.socketHandshakeTimeout".

      The default value is 300 seconds.

      See Also:
    • SSL_CIPHERSUITES

      public static final String SSL_CIPHERSUITES
      The System property to set the default SSL ciphersuites to be used with the connection.

      This System property is defined as "com.webmethods.jms.ssl.ciphersuites".

      The default value is from the provider.

      See Also:
    • SSL_FIPS_MODE

      public static final String SSL_FIPS_MODE
      The System property defining whether to use SSL FIPS Mode with the connection.

      This System property is defined as "com.webmethods.jms.ssl.fipsmode".

      The default value is false.

      See Also:
    • MESSAGE_TRANSPORT_MAX_CACHE_SIZE

      public static final String MESSAGE_TRANSPORT_MAX_CACHE_SIZE
      The System property defining the message transport's maximum size of a structure that will be cached.

      This System property is defined as "com.webmethods.jms.transport.maxCacheSize".

      The default value is 2048.

      See Also:
    • JMS_CLUSTER_1PC_TRANSACTION_LOG_FILE

      public static final String JMS_CLUSTER_1PC_TRANSACTION_LOG_FILE
      The System property containing the destination file name of the JMS Clustering 1PC transaction logging data. In order to support manual recovery of transactions that might have failed during the prepare or the commit phase of a 1PC transaction logging, we record the transaction information durably to disk in the cluster transaction log.

      This System property is defined as "com.webmethods.jms.cluster.log1PC".

      The transaction logging is disabled if the value is not specified.

      See Also:
    • SOCKET_KEEP_ALIVE_ENABLED

      public static final String SOCKET_KEEP_ALIVE_ENABLED
      The System property to Enable/disable the Socket Keep Alive. Since TCP/IP sends no packets except when there is traffic, without Socket.setKeepAlive( true ), it has no way of noticing a disconnect until you start trying to send traffic again. Java has the Socket.setKeepAlive( true ) method to ask TCP/IP to handle heartbeat probing without any data packets or application programming.

      This System property is defined as "com.webmethods.jms.socket.keepAliveEnabled".

      The default value is false (no socket keep alive).

      See Also:
    • LOG_DESTINATION

      public static final String LOG_DESTINATION
      The System property to define log destination class that implements the LogDestination interface. All logging messages will be passed to this class whose responsibility is to publish the message.

      This System property is defined as "com.webmethods.jms.log.destination".

      The default value is "com.webmethods.jms.log.LogFile" class which publishes messages to a file. Other in-built supported value is "com.webmethods.jms.log.LogLog4J" which publishes messages according to provided log4j configuration.

      See Also:
    • LOG_FILENAME

      public static final String LOG_FILENAME
      The System property to specify the log file name. It can also be set to System.out or System.err to redirect output to standard output or standard error streams. This parameter is applicable if destination is set to LogFile.

      This System property is defined as "com.webmethods.jms.log.filename".

      The default value is System.err.

      See Also:
    • LOG_LOG4J_PROPERTIES

      public static final String LOG_LOG4J_PROPERTIES
      The System property to configure log4j properties file. These properties can be supplied in standard log4j 2.x format.

      This System property is defined as "com.webmethods.jms.log.log4j.properties".

      The default value is log4j2.xml.

      See Also:
    • LOG_LEVEL

      public static final String LOG_LEVEL
      The System property to set the logging level. The "[name.]level" property is either a level's string name ("OFF", "FATAL", "ERROR", "WARNING", "INFO", "VERBOSE", "DEBUG" or "ALL") or an integer value that is defined in Log.Level.

      The following category specific property may be used to configure individual log level for various log categories defined in Log:

      • "com.webmethods.jms.log.[name.]level"

      Usage examples:

      • com.webmethods.jms.log.level=all to enable all logging for all categories.
      • com.webmethods.jms.log.JMS_API.level=all to enable all logging for JMS_API category.

      This System property is defined as "com.webmethods.jms.log.level".

      The default value is ERROR.

      See Also:
    • LOG_TIMESTAMP_FORMAT

      public static final String LOG_TIMESTAMP_FORMAT
      The System property to set the log time stamp format. Supported formats are as per DateFormat.

      This System property is defined as "com.webmethods.jms.log.timestamp".

      The default value is "yyyy-MM-dd HH:mm:ss.SSS".

      See Also:
    • LOG_THREAD_ID

      public static final String LOG_THREAD_ID
      The System property to enable/disable the logging of thread id in each log entry.

      This System property is defined as "com.webmethods.jms.log.threadId".

      The default value is true.

      See Also:
  • Method Details

    • getSocketConnectTimeout

      public static int getSocketConnectTimeout()
      Get the socket connect timeout.
      Returns:
      the socket connect timeout in seconds
      See Also:
    • setSocketConnectTimeout

      public static void setSocketConnectTimeout(int socketConnectTimeout)
      Set the socket connect timeout.
      Parameters:
      socketConnectTimeout - the socket connect timeout in seconds
      See Also:
    • getSoTimeout

      public static int getSoTimeout()
      Deprecated.
      This value is not used. Application always uses blocking socket read calls.
      Get the socket connect timeout.
      Returns:
      the socket connect timeout in seconds
      See Also:
    • setSoTimeout

      public static void setSoTimeout(int socketTimeout)
      Deprecated.
      This value is not used. Application always uses blocking socket read calls.
      Set the socket connect timeout.
      Parameters:
      socketTimeout - the socket connect timeout in seconds
      See Also:
    • getSocketSendBufferSize

      public static int getSocketSendBufferSize()
      Get the outbound socket buffer size.
      Returns:
      the outbound socket buffer size
      See Also:
    • setSocketSendBufferSize

      public static void setSocketSendBufferSize(int socketSendBufferSize)
      Set the outbound socket buffer size.
      Parameters:
      socketSendBufferSize - the outbound socket buffer size
      See Also:
    • getSocketRecvBufferSize

      public static int getSocketRecvBufferSize()
      Get the inbound socket buffer size.
      Returns:
      the inbound socket buffer size
      See Also:
    • setSocketRecvBufferSize

      public static void setSocketRecvBufferSize(int socketRecvBufferSize)
      Set the inbound socket buffer size.
      Parameters:
      socketRecvBufferSize - the inbound socket buffer size
      See Also:
    • getSocketTcpNoDelay

      public static boolean getSocketTcpNoDelay()
      Get the socket setting of Nagle's algorithm.
      Returns:
      true if Nagle's algorithm is disabled
      See Also:
    • setSocketTcpNoDelay

      public static void setSocketTcpNoDelay(boolean socketTcpNoDelay)
      Enable or disable the Nagle's algorithm on the socket.
      Parameters:
      socketTcpNoDelay - true to disable Nagle's algorithm
      See Also:
    • getSocketLinger

      public static boolean getSocketLinger()
      Get the socket linger state.
      Returns:
      true if socket linger is enabled
      See Also:
    • setSocketLinger

      public static void setSocketLinger(boolean socketLinger)
      Set the socket linger state.
      Parameters:
      socketLinger - true to enable socket linger
      See Also:
    • getSocketLingerTimeout

      public static int getSocketLingerTimeout()
      Get the socket linger timeout.
      Returns:
      the socket linger timeout
      See Also:
    • setSocketLingerTimeout

      public static void setSocketLingerTimeout(int socketLingerTimeout)
      Set the socket linger timeout.
      Parameters:
      socketLingerTimeout - the socket linger timeout
      See Also:
    • getSocketAutoFlushSize

      public static int getSocketAutoFlushSize()
      Get the socket auto-flush size.
      Returns:
      the socket auto-flush size
      See Also:
    • setSocketAutoFlushSize

      public static void setSocketAutoFlushSize(int socketAutoFlushSize)
      Set the socket auto-flush size.
      Parameters:
      socketAutoFlushSize - the socket auto-flush size
      See Also:
    • getSocketAutoFlushDelay

      public static long getSocketAutoFlushDelay()
      Get the socket auto-flush delay.
      Returns:
      the socket auto-flush delay
      See Also:
    • setSocketAutoFlushDelay

      public static void setSocketAutoFlushDelay(int socketAutoFlushDelay)
      Set the socket auto-flush delay.
      Parameters:
      socketAutoFlushDelay - the socket auto-flush delay
      See Also:
    • getBrokerTimeout

      public static int getBrokerTimeout()
      Get the Broker timeout.
      Returns:
      the connection's Broker timeout in seconds
      See Also:
    • setBrokerTimeout

      public static void setBrokerTimeout(int brokerTimeout)
      Set the Broker timeout.
      Parameters:
      brokerTimeout - the connection's Broker timeout in seconds
      See Also:
    • getBrokerTimeoutOnIdleSocket

      public static int getBrokerTimeoutOnIdleSocket()
      Get the Broker timeout in seconds on idle socket.
      Returns:
      the connection's timeout on idle socket.
      See Also:
    • setBrokerTimeoutOnIdleSocket

      public static void setBrokerTimeoutOnIdleSocket(int brokerTimeoutOnIdleSocket)
      Set the Broker idle socket timeout in seconds.
      Parameters:
      brokerTimeoutOnIdleSocket - the connection's timeout on idle socket in seconds.
      See Also:
    • getBrokerTimeoutPostConnectionClose

      public static int getBrokerTimeoutPostConnectionClose()
      Gets the Broker timeout in seconds post JMS Connection.close()
      Returns:
      the connection's timeout post JMS Connection.close()
      See Also:
    • setBrokerTimeoutPostConnectionClose

      public static void setBrokerTimeoutPostConnectionClose(int brokerTimeoutPostConnectionClose)
      Sets the Broker timeout in seconds post JMS Connection.close()
      See Also:
    • getKeepAliveInterval

      public static int getKeepAliveInterval()
      Get the keep-alive interval.
      Returns:
      the connection's keep-alive interval in seconds
      See Also:
    • setKeepAliveInterval

      public static void setKeepAliveInterval(int keepAliveInterval)
      Set the keep-alive interval.
      Parameters:
      keepAliveInterval - the connection's keep-alive interval in seconds
      See Also:
    • getKeepAliveAttempts

      public static int getKeepAliveAttempts()
      Get the KeepAlive attempts which need to fail with no response before declaring the connection as broken.
      Returns:
      number of keep alive attempts
    • getKeepAliveAttemptsBeforeDeclaringConnectionDead

      public static int getKeepAliveAttemptsBeforeDeclaringConnectionDead()
      Deprecated.
      Get the KeepAlive attempts which need to fail with no response before declaring the connection as broken.
      Returns:
      number of keep alive attempts
    • setKeepAliveAttempts

      public static void setKeepAliveAttempts(int keepAliveAttempts)
      Set the KeepAlive attempts which need to fail with no response before declaring the connection as broken.
      Parameters:
      keepAliveAttempts - the connection's keep-alive attempts.
      See Also:
    • setKeepAliveAttemptsBeforeDeclaringConnectionDead

      public static void setKeepAliveAttemptsBeforeDeclaringConnectionDead(int keepAliveInterval)
      Deprecated.
      Set the KeepAlive attempts which need to fail with no response before declaring the connection as broken.
      Parameters:
      keepAliveInterval - the connection's keep-alive attempts.
    • getReconnectDelay

      public static int getReconnectDelay()
      Get the reconnect delay.
      Returns:
      the connection's reconnect delay in seconds
      See Also:
    • setReconnectDelay

      public static void setReconnectDelay(int reconnectDelay)
      Set the reconnect delay.
      Parameters:
      reconnectDelay - the connection's reconnect delay in seconds
      See Also:
    • getReconnectAttempts

      public static int getReconnectAttempts()
      Get the reconnect attempts.
      Returns:
      the connection's reconnect attempts
      See Also:
    • setReconnectAttempts

      public static void setReconnectAttempts(int reconnectAttempts)
      Set the reconnect attempts.
      Parameters:
      reconnectAttempts - the connection's reconnect attempts
      See Also:
    • getBrokerKeepAliveInterval

      public static int getBrokerKeepAliveInterval()
      Get the Broker's keep-alive interval.
      Returns:
      the Broker's keep-alive interval in seconds
      See Also:
    • setBrokerKeepAliveInterval

      public static void setBrokerKeepAliveInterval(int brokerKeepAliveInterval)
      Set the Broker's keep-alive interval.
      Parameters:
      brokerKeepAliveInterval - the Broker's keep-alive interval in seconds
      See Also:
    • getBrokerKeepAliveTimeout

      public static int getBrokerKeepAliveTimeout()
      Get the Broker's keep-alive response timeout.
      Returns:
      the Broker's keep-alive response timeout in seconds
      See Also:
    • setBrokerKeepAliveTimeout

      public static void setBrokerKeepAliveTimeout(int brokerKeepAliveTimeout)
      Set the Broker's keep-alive response timeout.
      Parameters:
      brokerKeepAliveTimeout - the Broker's keep-alive response timeout in seconds
      See Also:
    • getBrokerKeepAliveAttempts

      public static int getBrokerKeepAliveAttempts()
      Get the Broker's keep-alive attempts.
      Returns:
      the Broker's keep-alive attempts
      See Also:
    • setBrokerKeepAliveAttempts

      public static void setBrokerKeepAliveAttempts(int brokerKeepAliveAttempts)
      Set the Broker's keep-alive attempts.
      Parameters:
      brokerKeepAliveAttempts - the Broker's keep-alive attempts
      See Also:
    • getAutoAckServicePollInterval

      public static int getAutoAckServicePollInterval()
      Get the poll interval for auto acknowledgement service. This value is in seconds. This is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.
      Returns:
      poll interval for auto acknowledgment service. This value is in seconds.
      See Also:
    • setAutoAckServicePollInterval

      public static void setAutoAckServicePollInterval(int autoAckServicePollInterval)
      Set poll interval for auto acknowledgement service. This value is in seconds. This is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.
      Parameters:
      autoAckServicePollInterval - - poll interval for auto acknowledgment service.
      See Also:
    • getAutoAckServiceMinWaitTime

      public static int getAutoAckServiceMinWaitTime()
      Set the minimum wait time for auto acknowledgement service. This value is in milliseconds. This is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.
      Returns:
      poll interval for auto acknowledgment service. This value is in milliseconds.
      See Also:
    • setAutoAckServiceMinWaitTime

      public static void setAutoAckServiceMinWaitTime(int autoAckServiceMinWaitTime)
      Set the minimum wait time for auto acknowledgement service. This value is in milliseconds. This is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.
      Parameters:
      autoAckServiceMinWaitTime - - minimum wait time for auto acknowledgement service
      See Also:
    • getAutoAckServiceMaxWaitTime

      public static int getAutoAckServiceMaxWaitTime()
      Get the maximum wait time for auto acknowledgement service. This value is in milliseconds. This is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.
      Returns:
      maximum wait time for auto acknowledgement service. This value is in milliseconds.
      See Also:
    • setAutoAckServiceMaxWaitTime

      public static void setAutoAckServiceMaxWaitTime(int autoAckServiceMaxWaitTime)
      Get the maximum wait time for auto acknowledgement service. This value is in milliseconds. This is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.
      Parameters:
      autoAckServiceMaxWaitTime - maximum wait time for auto acknowledgement service.
      See Also:
    • getAutoAckBatchSize

      public static int getAutoAckBatchSize()
      Get the batch size for acknowledging messages in batches. This is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.
      Returns:
      The batch size in integer for message acknowledgement.
      See Also:
    • setAutoAckBatchSize

      public static void setAutoAckBatchSize(int autoAckBatchSize)
      Set the batch size for acknowledging messages in batches. This is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.
      Parameters:
      autoAckBatchSize - The batch size in integer for message acknowledgement.
      See Also:
    • getAutoAckBatchSizeRetry

      public static int getAutoAckBatchSizeRetry()
      Get the number of retries to be done to ensure AUTO_ACK_BATCHSIZE is reached for sending the acknowledgments for messages in a batch. This is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.
      Returns:
      The number of retries to be done to ensure that AUTO_ACK_BATCHSIZE is reached before sending the message acknowledgements in a batch.
      See Also:
    • setAutoAckBatchSizeRetry

      public static void setAutoAckBatchSizeRetry(int autoAckBatchSizeRetry)
      Set the number of retries to be done to ensure AUTO_ACK_BATCHSIZE is reached for sending the acknowledgments for messages in a batch. This is applicable only when the session is in Session.AUTO_ACKNOWLEDGE mode.
      Parameters:
      autoAckBatchSizeRetry - The number of retries to be done to ensure that AUTO_ACK_BATCHSIZE is reached before sending the message acknowledgements in a batch.
      See Also:
    • getMaxReceive

      public static int getMaxReceive()
      Get the maximum number of messages to be sent from the Broker to a consumer at one time. For a consumer which is using cluster connection factory, the effective value of this property will be: com.webmethods.jms.maxReceive * number of Brokers in the cluster.
      Returns:
      the maximum number of message to be sent from the Broker to a destination at one time
      See Also:
    • setMaxReceive

      public static void setMaxReceive(int maxReceive)
      Set the maximum number of messages to be sent from the Broker to a consumer at one time. For a consumer which is using cluster connection factory, the effective value of this property will be: com.webmethods.jms.maxReceive * number of Brokers in the cluster.
      Parameters:
      maxReceive - the maximum number of messages to be sent from the Broker to a consumer at one time
      See Also:
    • getMessageTransportMaxCacheSize

      public static int getMessageTransportMaxCacheSize()
      Get the messsage transport's maximum size for caching structures.
      Returns:
      the maximum size
      See Also:
    • setMessageTransportMaxCacheSize

      public static void setMessageTransportMaxCacheSize(int size)
      Set the messsage transport's maximum size for caching structures.
      Parameters:
      size - the maximum size
      See Also:
    • getConfirmDelivery

      public static boolean getConfirmDelivery()
      Get whether message delivery confirmation is enabled.
      Returns:
      whether message delivery confirmation is enabled
      See Also:
    • setConfirmDelivery

      public static void setConfirmDelivery(boolean confirmDelivery)
      Set whether message delivery confirmation is enabled.
      Parameters:
      confirmDelivery - whether message delivery confirmation is enabled
      See Also:
    • getDisableMessageDestination

      public static boolean getDisableMessageDestination()
      Get whether message destinations are sent.
      Returns:
      whether message destinations are sent
      See Also:
    • setDisableMessageDestination

      public static void setDisableMessageDestination(boolean disableMessageDestination)
      Set whether message destinations are sent.
      Parameters:
      disableMessageDestination - whether message destinations are sent
      See Also:
    • getDisableMessageID

      public static boolean getDisableMessageID()
      Get whether message IDs are sent.
      Returns:
      whether message IDs are sent
      See Also:
    • setDisableMessageID

      public static void setDisableMessageID(boolean disableMessageID)
      Set whether message IDs are sent.
      Parameters:
      disableMessageID - whether message IDs are sent
      See Also:
    • getDisableMessageTimestamp

      public static boolean getDisableMessageTimestamp()
      Get whether message timestamps are sent.
      Returns:
      whether message timestamps are sent
      See Also:
    • setDisableMessageTimestamp

      public static void setDisableMessageTimestamp(boolean disableMessageTimestamp)
      Set whether message timestamps are sent.
      Parameters:
      disableMessageTimestamp - whether timestamps are sent in messages
      See Also:
    • getDefaultDeliveryMode

      public static int getDefaultDeliveryMode()
      Get the message producer's default delivery mode.
      Returns:
      the message producer's default delivery mode
      See Also:
    • setDefaultDeliveryMode

      public static void setDefaultDeliveryMode(int defaultDeliveryMode)
      Set the message producer's default delivery mode.
      Parameters:
      defaultDeliveryMode - the message producer's default delivery mode
      See Also:
    • getDefaultPriority

      public static int getDefaultPriority()
      Get the message producer's default priority.
      Returns:
      the message producer's default priority
      See Also:
    • setDefaultPriority

      public static void setDefaultPriority(int defaultPriority)
      Set the message producer's default priority.
      Parameters:
      defaultPriority - the message producer's default priority
      See Also:
    • getDefaultTimeToLive

      public static long getDefaultTimeToLive()
      Get the message producer's default time to live.
      Returns:
      the message producer's default time to live
      See Also:
    • setDefaultTimeToLive

      public static void setDefaultTimeToLive(int defaultTimeToLive)
      Set the message producer's default time to live.
      Parameters:
      defaultTimeToLive - the message producer's default time to live
      See Also:
    • getAutoQueueCreate

      public static boolean getAutoQueueCreate()
      Get whether automatic queue creation is enabled or disabled.
      Returns:
      true if automatic queue creation is enabled.
      See Also:
    • setAutoQueueCreate

      public static void setAutoQueueCreate(boolean autoQueueCreate)
      Enable or disable automatic queue creation.
      Parameters:
      autoQueueCreate - true to enable automatic queue creation
      See Also:
    • getClientIDSharing

      public static boolean getClientIDSharing()
      Get whether client identifier sharing is enabled or disabled.
      Returns:
      true if client identifier sharing is enabled.
      See Also:
    • setClientIDSharing

      public static void setClientIDSharing(boolean clientIDSharing)
      Enable or disable client identifier sharing.
      Parameters:
      clientIDSharing - true to enable client identifier sharing
      See Also:
    • getCompressionThreshold

      public static int getCompressionThreshold()
      Get the default compression threshold for message producers.
      Returns:
      The default compression threshold.
      See Also:
    • setCompressionThreshold

      public static void setCompressionThreshold(int compressionThreshold)
      Set the default compression threshold for message producers.
      Parameters:
      compressionThreshold - The default compression threshold.
      See Also:
    • getSSLKeystore

      public static String getSSLKeystore()
      Get the SSL keystore.
      Returns:
      the SSL keystore
      See Also:
    • setSSLKeystore

      public static void setSSLKeystore(String sslKeystore)
      Set the SSL keystore.
      Parameters:
      sslKeystore - the SSL keystore
      See Also:
    • setSSLTruststore

      public static void setSSLTruststore(String sslTruststore)
      Set the SSL Truststore.
      Parameters:
      sslTruststore - the SSL Truststore
      See Also:
    • getSSLTruststore

      public static String getSSLTruststore()
      Get the SSL Truststore.
      Returns:
      the SSL Truststore
      See Also:
    • setSSLTruststoreType

      public static void setSSLTruststoreType(String sslTruststore)
      Set the SSL Truststore type.
      Parameters:
      sslTruststore - the SSL Truststore type
      See Also:
    • getSSLTruststoreType

      public static String getSSLTruststoreType()
      Get the SSL Truststore type.
      Returns:
      the SSL Truststore type
      See Also:
    • getSSLKeystoreType

      public static String getSSLKeystoreType()
      Get the SSL keystore type.
      Returns:
      the SSL keystore type
      See Also:
    • setSSLKeystoreType

      public static void setSSLKeystoreType(String sslKeystore)
      Set the SSL keystore type.
      Parameters:
      sslKeystore - the SSL keystore type
      See Also:
    • setSSLProvider

      public static void setSSLProvider(String provider)
      Set the SSL Provider.
      Parameters:
      provider - the SSL Provider
      See Also:
    • getSSLProvider

      public static String getSSLProvider()
      Get the SSL Provider.
      Returns:
      the SSL Provider
      See Also:
    • setSSLCipherSuites

      public static void setSSLCipherSuites(String cipherSuites)
      Set the CipherSuites.
      Parameters:
      cipherSuites - the SSL CipherSuites list, separated by comma. ex: SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_RSA_WITH_RC4_128_SHA
      See Also:
    • getSSLCipherSuites

      public static String getSSLCipherSuites()
      Get the SSL CipherSuites list, separated by comma
      Returns:
      the SSL CipherSuites
      See Also:
    • setSSLFIPSModeEnabled

      public static void setSSLFIPSModeEnabled(boolean enable)
      Set to true if SSL FIPS Mode needs to be enabled. Set to false if SSL FIPS Mode needs to be disabled.
      Parameters:
      enable - boolean.
      See Also:
    • isSSLFIPSModeEnabled

      public static boolean isSSLFIPSModeEnabled()
      Get true if the SSL FIPS Mode is enabled. Get false if it is not.
      Returns:
      boolean representing if the SSL FIPS is enabled.
      See Also:
    • getUsername

      public static String getUsername()
      Get the username.
      Returns:
      the username
      See Also:
    • setUsername

      public static void setUsername(String username)
      Set the username.
      Parameters:
      username - the username
      See Also:
    • getPassword

      public static String getPassword()
      Get the password.
      Returns:
      the password
      See Also:
    • setPassword

      public static void setPassword(String password)
      Set the password.
      Parameters:
      password - the password
      See Also:
    • setProperty

      public static void setProperty(String name, String value)
      Set a property.
      Parameters:
      name - The name of the property to set.
      value - The property value to set.
    • setProperty

      public static void setProperty(String name, int value)
      Set an integer property.
      Parameters:
      name - The name of the property to set.
      value - The property value to set.
    • setProperty

      public static void setProperty(String name, boolean value)
      Set a boolean property.
      Parameters:
      name - The name of the property to set.
      value - The property value to set.
    • getProperty

      public static String getProperty(String name)
      Get a property.
      Parameters:
      name - The name of the property to get.
      Returns:
      The property value.
    • getProperty

      public static String getProperty(String name, String defaultValue)
      Get a property.
      Parameters:
      name - The name of the property to get.
      defaultValue - The value to return if the property is not found.
      Returns:
      The property value.
    • getProperty

      public static boolean getProperty(String name, boolean defaultValue)
      Get a boolean property.
      Parameters:
      name - The name of the property to get.
      defaultValue - The value to return if the property is not found.
      Returns:
      The property value.
    • getProperty

      public static int getProperty(String name, int defaultValue)
      Get an integer property.
      Parameters:
      name - The name of the property to get.
      defaultValue - The value to return if the property is not found.
      Returns:
      The property value.
    • getProperty

      public static long getProperty(String name, long defaultValue)
      Get a long property.
      Parameters:
      name - The name of the property to get.
      defaultValue - The value to return if the property is not found.
      Returns:
      The property value.
    • getProperties

      public static Properties getProperties()
      Get all properties.
      Returns:
      all the properties
    • getJMSCluster1PCTxLogDestination

      public static String getJMSCluster1PCTxLogDestination()
      Get the file name where the JMS Cluster 1PC Logging is recorded.
      Returns:
      the file name
    • setJMSCluster1PCTxLogDestination

      public static void setJMSCluster1PCTxLogDestination(String txLogdestination)
      Set the file name where the JMS Cluster 1PC Logging is recorded.
      Parameters:
      txLogdestination - the file name
    • getSocketKeepAliveEnabled

      public static boolean getSocketKeepAliveEnabled()
    • setSocketKeepAliveEnabled

      public static void setSocketKeepAliveEnabled(boolean enabled)
    • getMaxSSLSocketHandshakeCount

      public static int getMaxSSLSocketHandshakeCount()
      Get the maximum number of SSL connections that can perform handshake at a time.
      Returns:
      connection count
      See Also:
    • setMaxSSLSocketHandshakeCount

      public static void setMaxSSLSocketHandshakeCount(int maxSSLSocketHandshakeCount)
      Set the maximum number of SSL connections that can perform handshake at a time.
      Parameters:
      maxSSLSocketHandshakeCount - connection count
      See Also:
    • getMaxSSLSocketHandshakeTimeout

      public static long getMaxSSLSocketHandshakeTimeout()
      Get the timeout value for SSL socket handshake to start.
      Returns:
      socket handshake timeout.
      See Also:
    • setMaxSSLSocketHandshakeTimeout

      public static void setMaxSSLSocketHandshakeTimeout(long timeout)
      Set the timeout value for SSL socket handshake to start.
      Parameters:
      timeout -
      See Also:
    • getLogDestination

      public static String getLogDestination()
      Gets the log destination setting.
      Returns:
      log destination setting.
      See Also:
    • setLogDestination

      public static void setLogDestination(String destination)
      Sets the log destination setting. This call will take effect only after Log is reinitialized.
      Parameters:
      destination -
      See Also:
    • getLogFileName

      public static String getLogFileName()
      Gets the name of the file where log entries will be published. This setting is used only if log destination is set to LogFile.
      Returns:
      log file name.
      See Also:
    • setLogFileName

      public static void setLogFileName(String filename)
      Sets the name of the file where log entries will be published. This setting is used only if log destination is set to LogFile. This call will take effect only after Log is reinitialized.
      Parameters:
      filename -
      See Also:
    • getLogLog4JProperties

      public static String getLogLog4JProperties()
      Gets the log4j properties file name.
      Returns:
      log4j properties file name.
      See Also:
    • setLogLog4JProperties

      public static void setLogLog4JProperties(String filename)
      Sets the log4j property file name. File should contain log4j 2.x configuration settings. This call will take effect only after Log is reinitialized.
      Parameters:
      filename -
      See Also:
    • getLogLevel

      public static String getLogLevel()
      Gets the logging level. Use "com.webmethods.jms.log.level" to get the default logging level. Use "com.webmethods.jms.log.JMS_API.level" to get the logging level for JMS_API category. See Log class for all categories.
      Returns:
      logging level.
      See Also:
    • setLogLevel

      public static void setLogLevel(String level)
      Sets the logging level. If no category is specific, then default logging level is modified. Example, if you set logging level for "com.webmethods.jms.log.level", then default logging level is modified. If you specify a category, then logging level for that category is modified. Example, if you set logging level for "com.webmethods.jms.log.JMS_API.level", then logging level is modified only for JMS_API category. This call will take effect only after Log is reinitialized.
      Parameters:
      level -
      See Also:
    • getLogTimestampFormat

      public static String getLogTimestampFormat()
      Get the log time stamp format string.
      Returns:
      log time stamp format string.
      See Also:
    • setLogTimestampFormat

      public static void setLogTimestampFormat(String format)
      Sets the log time stamp format string. Format must be valid as per DateFormat. This call will take effect only after Log is reinitialized.
      Parameters:
      format -
      See Also:
    • getLogThreadId

      public static boolean getLogThreadId()
      Gets the thread id setting for logging. If true, then each log entry will have thread id of the thread that logged the message.
      Returns:
      thread id setting.
      See Also:
    • setLogThreadId

      public static void setLogThreadId(boolean enable)
      Sets the thread id setting for logging. This will print thread id of the logging thread in each log message. This call will take effect only after Log is reinitialized.
      Parameters:
      enable -
      See Also: