0 Replies Latest reply on Oct 24, 2007 3:21 AM by Ralph Lao

    cancelling a hibernate query via another thread

    Ralph Lao Newbie

      Sometimes a query request submit via ajax4jsf takes a long time that we want to provide a facility for the user to cancel the request (by calling cancelQuery() on the hibernate session). The query request comes into a session object (POJO) and the cancel request also comes into the same session object. The 2nd request is blocked by the SEAM until the 1st request is completed. I have tried to create another class of session scope, even accessing that object is blocked. Is that right that all objects of different classes of session scope are treated as one big session and will all be blocked by SEAM from concurrent access? If so, what would be a way so I can invoke the cancelQuery() which will cause an exception (I think) on the other thread which is doing the query? Thanks for your help

      Ralph