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.

 View Only
  • 1.  Using a IS DBAlias in a java service

    Posted Mon December 12, 2005 11:49 AM

    Hi,
    I am using webMethods 4.6
    I have created a DB alias in IS admin console.
    And I have a main service that calls a java service. The code to connect to the database is there in the java service. I am passing the DB alias as a string from the main service to the java service.
    Can anyone tell me how to use this DBalias in the java service.
    Thanks for help in advance.


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


  • 2.  RE: Using a IS DBAlias in a java service

    Posted Mon December 12, 2005 03:10 PM

    I assume you mean Integration Server 4.6. “webMethods” is the company that makes several products, one of which is Integration Server.

    DB aliases are not intended to be used within Java services. They are for use by the webMethods-supplied DB (WmDB) services.

    What are you trying to accomplish? Maybe someone can suggest an approach. If the solution simply needs to read or write DB data, then Java services are most likely not needed.


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


  • 3.  RE: Using a IS DBAlias in a java service

    Posted Tue December 13, 2005 04:51 AM

    Thanks Rob for replying.
    I am using Integration Server(IS) 4.6.1 version
    Let me explain you the problem in detail.
    I have a java service that uses a JDBC thin driver to make a call to an Oracle DB stored procedure. The stored procedure takes as an input a variable array so the java service declares the variable of the type oracle.sql.ArrayDescriptor & oracle.sql.ARRAY. The above task cannot be accomplished thr’ the flow service pub.db.call so a java service was written for the same.
    Presently I am hardcoding the DB connection details in the java service which is obviously a wrong coding practice. For our rest of the interfaces we are using DBaliases(created through IS admin console) to make DB connections and they are very easy to maintain.
    So was thinking of such a solution for the same. I saw in the earlier posts that through Connection manager class we can use the DBaliases to make connection to DB. But since we are using webMethods 4.6 which supports jdk1.3 so feels that Connection manager class is not available.

    I tried using the connection object of the pub.db.connect in my java service but it did not worked.

    Thanks in advance.


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


  • 4.  RE: Using a IS DBAlias in a java service

    Posted Mon January 16, 2006 05:31 AM

    Can anyone help Pls. I am still looking for an appropriate solution to avoid the hard coding of connection parameters in the java service


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


  • 5.  RE: Using a IS DBAlias in a java service

    Posted Tue January 17, 2006 03:46 AM

    The JDBC adapter connections are not intended for being used within Java services. The “appropriate” solution is to use the JDBC adapter and associated adapter services that you create according the JDBC Adapter documentation.


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


  • 6.  RE: Using a IS DBAlias in a java service

    Posted Mon January 23, 2006 04:13 AM

    Rob, I think “dsaini” is talking about WmDB instead of JDBC Adapter.

    Deepali, why don’t you just call WmDB/wm.server.db:dataSourceGet and use the information from there? Of course, the connection won’t be managed by IS, but it does make maintenance of the DB connection settings a bit easier.


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


  • 7.  RE: Using a IS DBAlias in a java service

    Posted Thu January 26, 2006 05:44 PM

    As a work-around you could store the DB connection information in a properties file and pass that into your flow service. It’s not the solution you’re looking for, but it’s better than hard-coding the connection info.


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