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
  • 1.  Locking a service

    Posted Fri June 04, 2004 06:39 PM

    Hi All,
    Can any one tell me how lock a service.In our application,i have to execute a particular service only once.If it is executed,any service which calls this service should not execute.How do we handle this situation.

    TIA


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


  • 2.  RE: Locking a service

    Posted Fri June 04, 2004 11:17 PM

    Any suggestions?
    Am planning to use pub.storage:lock


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


  • 3.  RE: Locking a service

    Posted Tue June 08, 2004 03:40 PM

    Why don’t you just put a flag somewhere (database, repository, memory, …) that indicates whether the service is currently running? Then as the first step in your service you check against this flag?

    =====service layout========= 
    BRANCH "running" 
    true: SEQUENCE 
    EXIT from flow 
    false: SEQUENCE exit-on SUCCESS (try-catch) 
    SEQUENCE exit-on FAILURE (try) 
    set running = true 
    [service contents] 
    set running = false 
    SEQUENCE exit-on DONE (catch) 
    set running = false 
    ============================

    Make sure to have the try-catch block in there, because otherwise your service will be locked forever when an exception occurs.


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


  • 4.  RE: Locking a service

    Posted Wed July 14, 2004 03:51 PM

    the service wm.server.query:getServiceStats allows you to get info on the services running and the number of execution threads a specific service has

    cheers

    Bart


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


  • 5.  RE: Locking a service

    Posted Wed July 14, 2004 03:53 PM

    or invoke via the broker this service, setting the trigger to serial processing


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