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.  Long lived TContext connection

    Posted Wed March 19, 2008 10:21 PM

    Folks,

    we have a java service that makes a call to WM to execute a service, and we use TAM for authorization. The TAM times out connection after 5 minutes.

    We are using TContext to generate the context, and set up with TTL of 3 hours. But, the TContext times out after about 11 minutes. Is there some way we can make TContext live longer?


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


  • 2.  RE: Long lived TContext connection

    Posted Thu March 20, 2008 12:20 AM

    What is the session timeout setting on IS?


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


  • 3.  RE: Long lived TContext connection

    Posted Wed March 26, 2008 03:55 PM

    The session timeout is 10 minutes. We poll for the status every 5 seconds, so the session should “theoretically” be active?


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


  • 4.  RE: Long lived TContext connection

    Posted Wed March 26, 2008 06:03 PM

    The timing sounds like the session is being timed out. What do you mean by “poll for the status” exactly?


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


  • 5.  RE: Long lived TContext connection

    Posted Wed March 26, 2008 06:13 PM

    Raemon, thank you for the reply. We use TContext to make the connection, and getTxStatusVal(tid) to read the status of the porcess (we have some porcesses that run for almost 1.5 hours).

    When the connection is terminated, we get a status of failed.


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


  • 6.  RE: Long lived TContext connection

    Posted Wed March 26, 2008 07:40 PM

    I’ve never used TContext so I’m not entirely sure, but it seems from the behavior and the description of the method that getTxStatusVal doesn’t interact with the server. It is simply returning the status of the waiting job in the job manager.

    My guess is that the session timeout is enforced regardless of the TContext settings, which appear to be more for controlling things on the client side than on the server side.

    Implied in the docs is that you can start multiple transactions via startTx. Then you can call wm.server:ping to keep the session fresh. Something like this (omitting try/catch blocks that would be needed):

    String tid1 = tc.startTx(180); // 3 hr TTL
    tc.submitTx(tid1, “your.folder”, “yourservice”, new Values());
    while(tc.getTxStatusVal(tid1) == TXJob.PENDING) // or other appropriate test
    {
    // keep the IS session alive
    String tid2 = tc.startTx(1); // 1 minute TTL
    Values out = tc.invokeTx(tid2, “wm.server”, “ping”, new Values());
    tc.endTx(tid2);
    Thread.sleep(5000); // wait 5 seconds
    }
    Values out = tc.retrieveTx(tid1);
    tc.endTx(tid1);

    Another way would be to simply increase the session timeout on the server, but a 3 hr session timeout may introduce other issues for the environment.


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


  • 7.  RE: Long lived TContext connection

    Posted Wed March 26, 2008 07:43 PM

    Thank you. I will try out the ping and keep you posted via this board. It may be a while before we try out all permutations and combinations.


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