Hi,
But this takes out the charm of the request-response type of behavior available in the Socket Communications. JMS is typically asynchronous and if the reply is expected back by the EJB from the socket server synchronously, JMS will have all round abouts of creating a temp queue, block on it and stuff like that which is not at all desirable for a 24X7 type of applications.
Please refer point 5 of section EJB RESTRICTIONS of this link:
http://www.javaworld.com/javaworld/jw-08-2000/jw-0825-ejbrestrict.html it sayeth, EJBs CAN open Client socket for communication.
I have personally used URLConnection object to extract dynamic content like currency rate, weather info etc., from within a Stateless Session Bean.
I am not sure if it works for pure Sockets. Ultimately, URLConnection must boil down to a Socket under the covers right?
Anybody who had successfully implemented a client socket from within EJBs, please share your experience. Please....
This is a major concern when we have External Socket Server is available as a product and we have no way to reengineer or add a layer of JMS as suggested.
Socket client is just another resource connector to an external world. But this topic is always being seen as BIG NO NO..... in EJB Context :-)
Rgds
Muthu