1 Reply Latest reply on Apr 24, 2009 5:27 PM by gonorrhea

    Lifecycle methods and Threads

    torakuma

      Hi-


      I have a Seam app that manages long running processes.  I needed more control over queueing/prioritization so I did not use the Asynchronous annotation but rather made my own framework that uses the java.util.concurrent package.  My worker threads rely on Lifecycle.begin() and Lifecycle.end() calls so they can have access to the application context.  Things appear to be working fine but I just wanted to check in and make sure I wasn't using these methods inappropriately or perhaps there was a more Seam friendly way of doing threads.


      Thanks-

        • 1. Re: Lifecycle methods and Threads
          gonorrhea

          read 4.1.10. Concurrency model of Seam ref doc.  Specifically, the following two key points are noteworthy:



          you can force a serialized threading model on any session bean or JavaBean component by adding the @Synchronized annotation.


          Seam enforces a single thread per conversation per process model for the conversation context by
          serializing concurrent requests in the same long-running conversation context.