Hi everybody
I'm using the classes ConnectionConfiguration, ConnectionFactory and Connection from the org.palo.api package to open a connection to a Palo Server.
This works quite fine. But then I tried to change the timeout to 1 millisecond and connect to a nonexisting host. Now it seems as my timeout is ignored, because it takes several seconds until it throws the exception
com.tensegrity.palojava.PaloException: Could not connect to palo server at host '187.18.0.1' on port '7777'
It's not even a timeout exceeded exception. Am I using the timeout wrong, is it a bug or am I completely misunderstanding the whole timeout-thing? Is it even a timeout for opening the connection or is it for the queries that will follow?
As you can see, I'm quite confused :huh: So could anybody please help me?
Thank you a lot!
I'm using the classes ConnectionConfiguration, ConnectionFactory and Connection from the org.palo.api package to open a connection to a Palo Server.
Source Code
- ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration(paloServer, Integer.toString(paloPort));connectionConfiguration.setPassword(paloPassword);connectionConfiguration.setUser(paloUser);connectionConfiguration.setLoadOnDemand(true);connectionConfiguration.setTimeout(timeOut);
- Connection c = ConnectionFactory.getInstance().newConnection(connectionConfiguration);
This works quite fine. But then I tried to change the timeout to 1 millisecond and connect to a nonexisting host. Now it seems as my timeout is ignored, because it takes several seconds until it throws the exception
com.tensegrity.palojava.PaloException: Could not connect to palo server at host '187.18.0.1' on port '7777'
It's not even a timeout exceeded exception. Am I using the timeout wrong, is it a bug or am I completely misunderstanding the whole timeout-thing? Is it even a timeout for opening the connection or is it for the queries that will follow?
As you can see, I'm quite confused :huh: So could anybody please help me?
Thank you a lot!