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
Expand all | Collapse all

Clean the resource after the flow has been executed

  • 1.  Clean the resource after the flow has been executed

    Posted Mon March 17, 2003 06:04 AM

    Could somebody throws me some light on this?

    I have a database flow service to retrieve data from backend db, should I drop the dbConnection in the output pipeline after the flow has been excuted?

    Thanks


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


  • 2.  RE: Clean the resource after the flow has been executed

    Posted Wed March 19, 2003 02:55 PM

    Hi, hYang.

    This is sort of a trick question. The answer depends on your Flow.

    If you are using transactions, the answer is yes. You will start your tranasactions with pub.db:connect and end them with pub.db.close or pub.db:closeAll.

    If you are doing singular actions such as INSERT, UPDATE, SELECT or the like, the answer is no. In this case. you should use pub.db:execSQL. This built-in database service will self-manage the connection.

    You can get more information about the built-in database services in the Built-In Service guide in your developer4/doc/ directory.


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


  • 3.  RE: Clean the resource after the flow has been executed

    Posted Wed March 19, 2003 04:19 PM

    My understanding is that IS will create and reuse a connection for each http session so you theoretically don’t have to close the connection. However this causes problems if you anticipate a lot of individual sessions being created (multiple clients) where IS creates a connection for each session, or if you have stateless connections. As soon as you decide to use connection pooling (in order to limit the number of connections that IS creates for a particular db alias), you need to explicitly close your connection so that it’s put back in the pool.

    This can have somewhat serious consequences as I’ve seen lots of flow services without the pub.db:close call - turning on connection pooling then requires you to edit all your db calls to add the ‘close’ service.

    Will Kriski


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


  • 4.  RE: Clean the resource after the flow has been executed

    Posted Wed March 19, 2003 09:41 PM