Hi,
we have numerous client applications that transmit data to a server via a socket. We want to use J2EE on the server side, but EJB's cannot listen on sockets.
If we implement a small java app to listen on the socket, we can then drop the data into a JMS queue for processing by a message driven bean. But this leaves us with a nasty single point of failure running *outside* the appserver.
Can anyone suggest a solution for us that would move the socket listener "inside" the appserver? Assume for the moment that our clients must use a socket to talk to the server.
thanks
Dale
-
Implementing a socket server using J2EE (3 messages)
- Posted by: Dale Ogilvie
- Posted on: November 21 2001 18:22 EST
Threaded Messages (3)
- Implementing a socket server using J2EE by Michael Lu on November 23 2001 00:55 EST
- a servlet? by Hans Prueller on November 17 2005 01:35 EST
- Servlet as Socket Listener by Jatin Taneja on February 19 2006 07:11 EST
- a servlet? by Hans Prueller on November 17 2005 01:35 EST
-
Implementing a socket server using J2EE[ Go to top ]
- Posted by: Michael Lu
- Posted on: November 23 2001 00:55 EST
- in response to Dale Ogilvie
I think a Resource Adaptor is the answer for you. You can code RA to listen to a specific port for your client and dispatch the message to JMS for your EJB. -
a servlet?[ Go to top ]
- Posted by: Hans Prueller
- Posted on: November 17 2005 01:35 EST
- in response to Michael Lu
I assume you already served your problem but I found this post just as I was doing some internet research because we've got a similar requirement.
what we tried is to use a servlet which starts listening on a port at its first init() call and stops listening on destry() - this generates not the overhead of having to use JMS. I'm not sure if it violates the spec in a way. Our j2ee-app runs on a single machine... -
Servlet as Socket Listener[ Go to top ]
- Posted by: Jatin Taneja
- Posted on: February 19 2006 19:11 EST
- in response to Hans Prueller
Hans, we have a similar requirement.Did you go ahead and use the servlet as a socket server? what problems did you face? would you recommend it ?