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

IS shutdown when using java socket

  • 1.  IS shutdown when using java socket

    Posted Sat December 01, 2007 04:06 AM

    Hi.
    I have a case that i have to make IS connect to another server using socket.
    I’m using java service to connect to the server, but the problem is the IS always restart everytime i run the service. what should i do?
    is there any problem with java socket in IS?

    I try to connect the IS to my own PC, it’s still happen. So i think the problem may in IS?

    what should I do??? :confused:


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


  • 2.  RE: IS shutdown when using java socket

    Posted Sat December 01, 2007 02:49 PM

    The problem is likely that your java service is not written correctly. Please post that if you can as well as any error messages written to the logs.

    Mark


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


  • 3.  RE: IS shutdown when using java socket

    Posted Mon December 03, 2007 02:52 AM

    I’m not the one who handle the server, i just wrote the java service. The server administrator saig that’s nothing wrong in the log. It’s just said the IS trying connecting to other server (non IS) then go shutdown.
    Here the example of my java service

    try {
    echoSocket = new Socket(host, Integer.parseInt(port));
    echoSocket.setSoTimeout(5000);
    out = new PrintWriter(echoSocket.getOutputStream(), true);
    in = new BufferedReader(new InputStreamReader(echoSocket.getInputStream()));
    } catch (UnknownHostException e) {
    System.err.println(“Don’t know about host”);
    throw new ServiceException(e);
    } catch (IOException e) {
    System.err.println(“Couldn’t get I/O for the connection”);
    throw new ServiceException(e);
    }

    try {
    out.println(message);
    fromServer = in.readLine();
    } catch(IOException e) {
    System.out.println(e);
    }

    try {
    out.close();
    in.close();
    echoSocket.close();
    } catch (Exception e)
    {}

    But sometimes it’s work, and then suddenly shutdown the server. This make me confuse…
    Is there any IS configuration to allow socket connection work properly??
    Thanks for your attention…


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