IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Using DB alias in custom java to connect to DataBase

  • 1.  Using DB alias in custom java to connect to DataBase

    Posted Mon August 18, 2003 03:10 PM

    Hi all,
    my situation requires that I write custom java code (JDBC 2.0) to do a batch update to DB2 database. we already have created DB aliases and I would like to use that information to connect to a database using JDBC calls. Can anyone let me know how to use url, username, password information from an alais? are there any API calls involved or do I have to use the jdbc.cnf file? I don’t know how to get password information from that jdbc.cnf file.

    Thanks in advance,
    Hari.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Using DB alias in custom java to connect to DataBase

    Posted Mon August 18, 2003 05:38 PM

    You can invoke the service wm.server.db:dataSourceGet to get the information about the alias.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 3.  RE: Using DB alias in custom java to connect to DataBase

    Posted Mon August 18, 2003 07:14 PM

    Hi Rupinder,
    Thanks a lot. that solves my problem.

    Hari.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods