Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content
  • BW6.X - BWCE - How to make sure TIBCO BusinessWorks applications can connect or reconnect to an EMS server in every cases

    This article is the BusinessWorks 6.X version of an article previously published for BusinessWorks 5.X.

    The TIBCO BusinessWorks platform is made of multiple components that are often distributed over multiple servers or Virtual Machines.

    One important component of the platform is the TIBCO EMS Messaging server and it is key for the BusinessWorks applications to be able to manage cases where the EMS server might be unavailable or unreachable for some time.

    BusinessWorks has a build-in mechanism to reconnect to the EMS server if needed, but it is still a good practice to leverage EMS client library reconnection mechanisms and the case of the initial connection to the EMS remain to be managed.

    With the configuration best practices from this article BusinessWorks 6.X applications should be able to connect or reconnect to EMS in every cases.

    EMS Configuration

    Before configuring BusinessWorks we should include in the EMS set-up the parameters that will allow the EMS server and EMS client libraries to detect quickly that connection has been lost.

    For this the following parameters have to added in the tibemsd.conf file :

    client_heartbeat_server = 20
    server_timeout_client_connection = 90
    server_heartbeat_client = 20
    client_timeout_server_connection = 90
    server_heartbeat_server = 20
    server_timeout_server_connection = 90

    Once the tibemsd.conf file is updated the EMS server should be restarted for the parameters to be taken into account.

    BusinessWorks 6.X configuration

    On all BusinessWorks servers of the configuration edit the ‘bwappnode.tra’ file (in <TIBCO_HOME>/bw/<version>/bin folder) and add the following properties at the end of the file: 6, 10000 12, 10000

    These two properties are managed by the EMS client library. The first parameter defines a number of retries, the second parameter the delay between retries (in milliseconds). These parameters are used by EMS connections of type ‘Direct Connection’ and also for the connection to the EMS server acting as a JNDI server in the case of connections using ‘Connection Factories’.

    A difference between BusinessWorks 5.X and BusinessWorks 6.X here is that BusinessWorks 6.X doesn’t manage a mechanism to reconnect to the EMS if it is not available at start-up (and in this case a BW 6.X application using a JMS Receive message process starter goes into impaired state and remain inactive until it is restarted).

    This is why we use a relatively high value for the ‘retry’ parameter (180 in the above example).

    Once the bwappnode.tra files are updated on all servers, appnodes have to be restarted for the parameters to be taken into account.

    Connection factories configuration

    By default BusinessWorks projects are using the default EMS ‘QueueConnectionFactory’ and ‘TopicConnectionFactory’.

    The connection and reconnection parameters of these factories can be set with the following tibemsadmin command:

    addprop factory QueueConnectionFactory url=tcp://server1:7222,tcp:// server2:7222
    addprop factory QueueConnectionFactory connect_attempt_count=6
    addprop factory QueueConnectionFactory connect_attempt_delay=10000
    addprop factory QueueConnectionFactory connect_attempt_timeout=1000
    addprop factory QueueConnectionFactory reconnect_attempt_count=12
    addprop factory QueueConnectionFactory reconnect_attempt_delay=10000
    addprop factory QueueConnectionFactory reconnect_attempt_timeout=1000
    addprop factory TopicConnectionFactory url=tcp://server1:7222,tcp:// server2:7222
    addprop factory TopicConnectionFactory connect_attempt_count=6
    addprop factory TopicConnectionFactory connect_attempt_delay=10000
    addprop factory TopicConnectionFactory connect_attempt_timeout=1000
    addprop factory TopicConnectionFactory reconnect_attempt_count=12
    addprop factory TopicConnectionFactory reconnect_attempt_delay=10000
    addprop factory TopicConnectionFactory reconnect_attempt_timeout=1000

    Note that if other factories than the default ones are used in your BusinessWorks projects they should also be configured like above. Note also that even if you are using only one standalone EMS server the URL should be in the ‘FT’ format (for example : tcp://myserver:7222,tcp://myserver:7222).


    With the elements above your BusinessWorks 6.X platform should now be able to connect and reconnect to the EMS in every cases which will make it very reliable.

    Reference KB article :

    User Feedback

    Recommended Comments

    There are no comments to display.

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Create New...