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

    Socket client running slow in stateless bean 3.0

    Alex Jiang Newbie

      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();
       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?