EJB design: Creating threads in web tier.

  1. Creating threads in web tier. (3 messages)

    My company is presently designing a session management model in which a custom session manager uses a thread which executes in the back ground to store big session objects inro the dataabse.

    Is it safe to have such a thread?

    thanks in advance

    Threaded Messages (3)

  2. Creating threads in web tier.[ Go to top ]

    What's wrong with using an EJB for that purpose - for instance MDBs are supposed to be quite suitable for asynchronous behavior?
  3. Creating threads in web tier.[ Go to top ]

    MDBs : do you mean Message Drivem Beans.
    Can you eloborate how MSBs can be use dfor session management.

    Thanks for helping

  4. Creating threads in web tier.[ Go to top ]

    Well, if I understood the problem correctly, you have to save big session objects from time to time in separate thread, so that on the one hand they can be restored/accessed later, and on the other, client-orineted threads don't wait for this to happen. If this so, it seems like you can just send a message with the object to be saved a message-driven bean. The latter will do what needs to be done: make JDBC calls, call entity EJBs etc., but asynchronusly, 'cause client method will return as soon as the message it sent, and your client thread can mind its own business - serve clients.