[jboss-user] [EJB 3.0] - Socket client running slow in stateless bean 3.0

jhavefun@gmail.com do-not-reply at jboss.com
Wed Nov 12 22:08:19 EST 2008


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4188961#4188961

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4188961



More information about the jboss-user mailing list