# Set Connect Attempt and Reconnect Attempt Behavior

The effect of setting connect attempt and reconnect attempt properties at the application level is different when applied to unshared state connection factories.

If the EMS client is using a shared state connection factory, then the values specified by way of properties or API calls will be the values used during client connect and reconnect sequences. However, if the client is using an unshared state factory, then the application layer values do not directly override the `connect_attempt_count` and `reconnect_attempt_count` properties set in the unshared state connection factory. Instead, the value specified at the application level is multiplied by the value in the connection factory to determine the resulting count. Also if the `connect_attempt_delay` and/or `reconnect_attempt_delay` are overridden at the application layer, the resulting actual delays can vary significantly from the override value.

For example, if the unshared state connection factory has a `connect_attempt_count` value of 5 and the Java system property `com.tibco.tibjms.connect.attempts` is set to 3 for the Java client, then the effective `connect_attempt_count` will be 15.

## See Also

The connection factory connect attempt and reconnect attempt properties are documented in `factories.conf`.

The sections Set Connection Attempts, Timeout and Delay Parameters and Set Reconnection Failure Parameters describe the use of these settings.

Copyright © Cloud Software Group, Inc. All rights reserved.