Open topic with navigation

TIBCO GridServer® 7.1.0

# Notes for Java Developers

Here are some notes for Java developers.

## Stop Java Client by using a property

Unlike C++ and .NET clients, a Java client does not stop automatically. It remains pending after submitting Services and collecting results. Instead of calling `System.exit()` to stop the client, you can set a property to change this behavior. Add this line to your code:

    DriverManager.setProperty(DriverManager.IS_DAEMON, Boolean.TRUE.toString());

You can also enable this by setting `DSIsDaemon=true` in the `driver.properties` file.

When this property is set to true, all client threads are daemon threads, meaning that they allow the process to shut down when all threads have shut down.

## HTTP Connection Parameters

The following parameters are specific for Java Drivers:

Parameter | Default value | Description
--- | --- | ---
`DSHttpMaxConnectionTotal` | 500 | It controls how many maximum concurrent connections the Driver application can have at any given time. To change the default value, you can specify `-DDSHttpMaxConnectionTotal=800` as JAVA OPTION (as one of the System properties) or specify the following parameter: `DSHttpMaxConnectionTotal=`
`DSHttpMaxPerRoute` | 80 | It controls how many maximum concurrent connections per Route the Driver application can have at any given time. To change the default value, you can specify `-DDSHttpMaxPerRoute=100` as JAVA OPTION or specify the following parameter: `DSHttpMaxPerRoute=`
`DSHttpDDTKeepalive` | `True` | It controls whether to keep the HTTP connection alive for DDT requests. To change the default value, you can specify `-DDSHttpDDTKeepalive=false` as JAVA OPTION or specify the following parameter: `DSHttpDDTKeepalive=`
`DSHttpSubmissionKeepalive` | `True` | It controls whether to keep the HTTP connection alive for tasks submission requests. To change the default value, you can specify `-DDSHttpSubmissionKeepalive=false` as JAVA OPTION or specify the following parameter: `DSHttpSubmissionKeepalive=`
`DSHttpImplementation` | `com.livecluster.util.http.ApacheHttpClientSupportFactory` | It controls which HTTP communication implementation is applied. The default is `Apache HttpClient`. To change the default value to JRE HTTP Connection implementation, you can specify`-Dds.DSHttpImplementation=com.livecluster.util.http.JavaHttpSupportFactory` as JAVA OPTION (System property) or specify the following parameter: `DSHttpImplementation=`

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO GridServer®

Copyright © 2001-2022. TIBCO Software Inc. All Rights Reserved.