If I am connecting to an Apelon DB directly through JDBC (bypassing the Apelon
Server), do I still have the option of providing a full JDBC connection URL?
For example, one with two load balanced hosts?
If I'm using the Apelon Server, then the apelonserverprops.xml file lets me
specify a url_template that contains the full URL. But for the direct
connection, the ServerConnectionJDBC object doesn't seem to support it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I am connecting to an Apelon DB directly through JDBC (bypassing the Apelon
Server), do I still have the option of providing a full JDBC connection URL?
For example, one with two load balanced hosts?
If I'm using the Apelon Server, then the apelonserverprops.xml file lets me
specify a url_template that contains the full URL. But for the direct
connection, the ServerConnectionJDBC object doesn't seem to support it.
You can use the ConnectionParams parameter in the ServerConnectionJDBC to
specify the connection URL directly.
Here is the sample code:
ConnectionParams cp = new ConnectionParams();
cp.setUrl("jdbc:oracle:thin:@localhost:1521:orcl");
cp.setUserName("dts");
cp.setPassword("dts");
ServerConnection sc = new ServerConnectionJDBC(cp);