Reference for StreamBase DefaultJMSContainerConnectionSettings Configuration

Overview

This article provides a reference for writing a StreamBase DefaultJMSContainerConnectionSettings HOCON configuration file.

The default JMS container connection configuration sets, as the name suggests, defaults for JMS-based StreamBase container connections. It is separate from the base engine configuration and can be managed separately without having to recreate an application archive and redeploy the application whenever for example a port number changes.

Required Header Lines

Each configuration file must contain the following header lines, typically found at the beginning of each file:

name

Specifies an arbitrary, case-sensitive string to name this configuration, which must be unique among other files with the same type, if any. Configuration files can refer to each other by this name. Select a name that reminds you of this configuration's type and purpose. For example:

name = "my-default-jms-container-connection-settings"
version

Specifies an arbitrary version number that you can use to keep track of file versions for this configuration type in your development project. The maintenance of version numbers is under user control; StreamBase does not compare versions when loading configuration files during the fragment launch process. The version number is a string value, and can contain any combination of characters and numbers. For example:

version = "1.0.0"
type

This essential setting specifies the unique HOCON configuration type described on this page.

type = "com.tibco.ep.streambase.configuration.
  defaultjmscontainerconnectionsettings"

The header lines taken together constitute a unique signature for each HOCON file in a project's configurations folder. Each project's configurations folder can contain only one file with the same signature.

In addition, the configuration top-level element is the same for all HOCON file types.

configuration

On a line below the header element lines, enter the word configuration followed by an open brace. The configuration element is a sibling of the name, version, and type elements, and serves as a wrapper around this type's elements described below. The file must end with the matching close brace.

configuration = {
...
...
}

HOCON Elements Explained

Below shows the configuration's HOCON elements, its name-values, usage, and syntax example, where applicable.

DefaultJMSContainerConnectionSettings

A collection of default JMS client settings for JMS container connections.

associatedWithEngines

If you want to restrict this object to be associated with specific engines, do so here. Each entry can be a specific engine name or a regular expression that can applies to more than one engine. This name-value pair is optional and has no default value. If not present, the configuration is associated with all engines.

For example:

associatedWithEngines = [ "javaengine", "otherengine[0-9]" ]
connectionFactoryName

String. A connection factory to be looked up by name via a JNDI lookup. This will then be used to construct the connection object. This name-value pair is optional and has no default value.

For example:

connectionFactoryName = "com.somevendor.jms.TheirFactory"
providerContextFactoryClassName

String. This attribute is used to specify a value for Context.INITIAL_CONTEXT_FACTORY. This name-value pair is optional and has no default value.

For example:

providerContextFactoryClassName = "foo1"
providerURL

String. This attribute is used to specify a value for Context.PROVIDER_URL. This name-value pair is optional and has no default value.

For example:

providerURL = "jms://a.b.c:123"
clientID

String. If desired, a specific ClientID value may be set on the connection. This will result in the adapter calling javax.jms.Connection.setClientID() with the supplied value. This name-value pair is optional and has no default value.

For example:

clientID = "myclientid"
subscriberName

String. If specified, causes a durable subscription to be made and used with the specified subscriber name. Valid only when used in conjunction with destinations that are Topics. This name-value pair is optional and has no default value.

For example:

subscriberName = "mysubscribername"
deliveryMode

The delivery mode used when sending messages to JMS. This must be one of the following values: PERSISTENT, NON_PERSISTENT, RELIABLE_DELIVERY. This last delivery mode is specific to TIBCO EMS; using this value with any other JMS server may result in an error. This value is passed directly to javax.jms.MessageProducer.setDeliveryMode().

This name-value pair is optional and its default value is 'NON_PERSISTENT'.

For example:

deliveryMode = "PERSISTENT"
jndiSecurityPrincipal

String. Setup for the JNDI InitialContext object. Corresponds to javax.naming.Context.SECURITY_PRINCIPAL. This name-value pair is optional and has no default value.

For example:

jndiSecurityPrincipal = "foo4"
jndiSecurityCredentials

String. Setup for the JNDI InitialContext object. Corresponds to javax.naming.Context.SECURITY_CREDENTIALS. This name-value pair is optional and has no default value.

For example:

jndiSecurityCredentials = "foo5"
jndiSecurityAuthentication

String. Setup for the JNDI InitialContext object. Corresponds to javax.naming.Context.SECURITY_AUTHENTICATION. This name-value pair is optional and has no default value.

For example:

jndiSecurityAuthentication = "foo6"
jndiSecurityProtocol

Setup for the JNDI InitialContext object. Corresponds to javax.naming.Context.SECURITY_PRINCIPAL. This name-value pair is optional and has no default value.

jndiSecurityProtocol = "foo7"
jndiAuthoritative

Setup for the JNDI InitialContext object. Corresponds to javax.naming.Context.AUTHORITATIVE. This name-value pair is optional and has no default value.

For example:

jndiAuthoritative = true
jndiDNSURL

Setup for the JNDI InitialContext object. Corresponds to javax.naming.Context.DNS_URL. This name-value pair is optional and has no default value.

For example:

jndiDNSURL = "foo9"
jndiReferral

Setup for the JNDI InitialContext object. Corresponds to javax.naming.Context.REFERRAL. This name-value pair is optional and has no default value.

For example:

jndiReferral = "foo10"
userName

String. The user name to use when connecting to JMS. This name-value pair is optional and has no default value.

For example:

userName = "foo14"
password

String. The password to use when connecting to JMS. You can provide an enciphered string for the value; generate the enciphered string with the sbcipher command and prefix #! to the generated string. This name-value pair is optional and has no default value.

For example:

password = "foo15"
acknowledgeMode

The mode that is used to acknowledge JMS messages. Defaults to AUTO_ACKNOWLEDGE. Other possible values include DUPS_OK_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, INDIVIDUAL_ACKNOWLEDGE (TIBCO EMS only) and NO_ACKNOWLEDGE (TIBCO EMS only).

This name-value pair is optional and its default value is AUTO_ACKNOWLEDGE.

For example:

acknowledgeMode = "NO_ACKNOWLEDGE"
createDestinations

Bool. Whether destinations should be created or looked up in JNDI. If supported by the JMS provider, destinations can be created even if they exist. Creating destinations is faster than looking them up in JNDI. This name-value pair is optional and its default value is true.

For example:

createDestinations = true
useTopics

Bool. If this attribute is true, then destinations will be treated as Topics, otherwise they will be treated as Queues. This name-value pair is optional and its default value is true.

For example:

useTopics = false

HOCON Configuration File Sample

The following is an example of the com.tibco.ep.streambase.configuration.defaultjmscontainerconnectionsettings type.

name = "my-default-jms-container-connection-settings"
version = "1.0.0"
type = "com.tibco.ep.streambase.configuration.defaultjmscontainerconnectionsettings" 
configuration = {
  DefaultJMSContainerConnectionSettings = {

    associatedWithEngines = [ "javaengine", "otherengine[0-9]" ]
    connectionFactoryName = "com.somevendor.jms.TheirFactory"
    providerContextFactoryClassName = "foo1"
    providerURL = "jms://a.b.c:123"
    clientID = "myclientid"
    subscriberName = "mysubscribername"
    deliveryMode = "PERSISTENT"
    jndiSecurityPrincipal = "foo4"
    jndiSecurityCredentials = "foo5"
    jndiSecurityAuthentication = "foo6"
    jndiSecurityProtocol = "foo7"
    jndiAuthoritative = true
    jndiDNSURL = "foo9"
    jndiReferral = "foo10"
    userName = "foo14"
    password = "foo15"
    acknowledgeMode = "NO_ACKNOWLEDGE"
    createDestinations = true
    useTopics = false
  }
}