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.  shutdown script

    Posted Fri March 07, 2003 12:24 AM

    Hi,

    Is any unix script to shutdown the Integration server. With out using IE browser how to shutdown the Integration Server from UNIX.

    Thanx
    Ganesh


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: shutdown script

    Posted Mon March 10, 2003 11:21 AM

    You can run the script stop_wm to shutdowm the Integration server on UNIX. and use the script start_wm to restart the IS.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 3.  RE: shutdown script

    Posted Mon March 10, 2003 11:59 PM

    But I have checked in the bin directory there is no stop_wm scirpt.

    Thx
    Ganesh


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 4.  RE: shutdown script

    Posted Tue March 11, 2003 11:47 AM

    Where are the start_wm & stop_wm scripts found? Or from where can they be downloaded? I can’t find them in my IS install.

    Thanks…
    Raj.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 5.  RE: shutdown script

    Posted Wed March 12, 2003 02:50 AM

    If your IS is starting at boot time of the machine, there should be startup and shutdown scripts in /etc/rc5.d or /etc/init.d/rc5
    Well actually I think it will be one script. If the name of the script is S44WMIS you would use it like this:
    ./S44WMIS {start|stop|restart}

    The name I gave above is certainly not correct!!! It’s just an example!!

    I hope this helps.

    Jeroen


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB


  • 6.  RE: shutdown script

    Posted Thu March 13, 2003 07:49 AM

    The location of the scripts and name might vary. We have it in scripts/bin directory. Maybe your sys admin can tell you about the location of the scripts.

    Hope this helps.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 7.  RE: shutdown script

    Posted Thu March 13, 2003 08:05 AM

    Ganesh,

    We have developed a java prgm that is called from a shell:

    -------Put in your shell--------

    (…)

    Usage: java B2BShutdown [yes/no] [force/drain] [timeout]

    [yes/no] = restart?

    [force/drain] = immediate/wait?

    [timeout] = minutes to wait before committing?

    java TNShutdown no drain 30

    (…)

    -------the corresponding java source----------

    import java.io.*;
    import java.util.Vector;
    import com.wm.util.Table;
    import com.wm.util.Values;
    import com.wm.app.b2b.util.GenUtil;
    import com.wm.app.b2b.client.Context;
    import com.wm.app.b2b.client.ServiceException;
    import com.wm.util.coder.ValuesCodable;

    public class TNShutdown {

        public static void main(String[] args) {
    
    if (args.length != 3) {
    
    System.out.println("\nUsage: JavaCMD TNShutdown [yes/no] [force/drain] [timeout]\n");
    System.out.println("\t[yes/no] = restart?");
    System.out.println("\t[force/drain] = immediate/wait?");
    System.out.println("\t[timeout] = minutes to wait before committing?\n");
    
    System.exit(0);
    }
    
    // Edit these settings for your locale and then compile
    String server = "localhost:<your port>";
    String username = "<Admin User Name>";
    String password = "<Pwd>";
    
    // Edit these settings to your preference
    String bounce = args[0];   
    String option = args[1];  
    String timeout = args[2];
    
    Values in = new Values();
    
    Context context = new Context();
    
    try {
    context.connect(server, username, password);
    } catch (ServiceException e) {
    System.out.println("\n\tCannot connect to server \""+server+"\""); 
    System.exit(0);
    }
    
    try {
    in.put("bounce", bounce);
    in.put("option", option);
    in.put("timeout", timeout);
    
    in = context.invoke("wm.server.admin", "shutdown", in);
    } catch (ServiceException e) {
    System.out.println("\n\tCould not shutdown server:  " + e.getMessage());
    System.exit(0);
    }
    
    System.out.println(in.getString("message"));
    
    }
    

    }

    This should fulfil your need,
    Regards,
    Emmanuel


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: shutdown script

    Posted Fri March 14, 2003 12:12 AM

    Hi,

    Thanx for the code.

    One more problem. more number of transactions are going in Integration Server but some service threads are not releasing from the services. The services are hang up with service threads. How to release the service threads from services without restarting the server.

    Thanx


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods