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
|
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
|
DSHttpDDTKeepalive
|
True
|
It controls whether to keep the HTTP connection alive for DDT requests. To change the
default value, you can specify
|
DSHttpSubmissionKeepalive
|
True
|
It controls whether to keep the HTTP connection alive for tasks submission requests. To change the default value, you can specify
|
DSHttpImplementation
|
com.livecluster.util.http.ApacheHttpClientSupportFactory
|
It controls which HTTP communication implementation is applied.
The default is To change the default value to JRE HTTP Connection
implementation, you can specify |