Menu

JDBC connection URL for ServerConnectionJDBC

Help
2010-02-05
2012-08-30
  • Mark Stuppy

    Mark Stuppy - 2010-02-05

    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.

     
  • Abhay Sinha

    Abhay Sinha - 2010-02-07

    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);

     

Log in to post a comment.