2 Replies Latest reply on Apr 9, 2007 5:18 PM by zurchman

    Starting threads

    l3o

      Hello all.

      I'd like to ask a simple question regarding new threads creation.

      I need to create a service that opens a new ServerSocket and keeps listening to it. When a new connection arrives, it should use a separated thread to handle the incoming connection. Quite like a HTTP Server.

      I've read that you can't start new threads in the EJB container; so I got confused: where can I start threads? Or how? Can you please explain? Please, I need help with this and can use any pointer of where to look for an answer.

      Thanks a lot.

      Leo.

        • 1. Re: Starting threads
          zurchman

           

          "l3o" wrote:

          I've read that you can't start new threads in the EJB container; so I got confused: where can I start threads?


          • 2. Re: Starting threads
            zurchman

             

            "l3o" wrote:
            I've read that you can't start new threads in the EJB container; so I got confused: where can I start threads?

            (Oops. Hit the wrong button earlier.)

            I've been using an MVC architecture adapted from an early Java PetStore demo for years to create threads of Stateless Session beans which can be joined.