0 Replies Latest reply on Nov 12, 2008 10:08 PM by jhavefun

    Socket client running slow in stateless bean 3.0

    jhavefun

      I found the socket client inside of SLSB 3.0 takes more time to connect to a server which is implented by c++. but the same code works very fast on Tomcat .
      actually the code is very simple:

       Socket socket = new Socket(host, port);
       OutputStream outputStream = socket.getOutputStream();
       InputStream inputStream = socket.getInputStream();
       outputStream.write(outPacket);
       socket.setSoTimeout(15000);
       int messageBufferSize = 250;
       byte[] res = new byte[messageBufferSize];
       int len = inputStream.read(res);
       return res;





      Is there any other solution for EJB 3 in JBoss 4.2.3 instead of pure socket client? or how can I optimise my ejb?

      thanks.

      Alex