Java Sample To Test Multiple Connections,Verify Load Balancing And Check Connection Time
(Doc ID 429646.1)
Last updated on MARCH 22, 2022
Applies to:
JDBC - Version 9.2.0.1 and laterInformation in this document applies to any platform.
Purpose
This sample can be used to:
- test multiple connections
- test load balancing.
- find out the connection time.
This sample is useful when some of your JDBC connections fail in a load balancing environment. Since the try-catch block is within the while loop that executes the method getConnection you can see to what host connections are successful.
Also this sample can be used to test if load balancing is working. If load balancing is working the query will return the different host selected by the load balancer.
Troubleshooting Steps
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Purpose |
Troubleshooting Steps |
References |