0 Replies Latest reply on Oct 10, 2005 11:53 PM by saibrian

    Can I use the single thread bound session pattern?

    saibrian

      I have managed to get the hibernate mappings for Jbpm integrated and loaded into the same Configuration that the rest of my application uses, but I am having problems with the Hibernate Sessions. I wish Jbpm to use the same thread-bound session that the rest of the application uses, and for the most part that works fine... I modified the jbpm code to fetch Sessions from my own session producer, and to not close sessions on its own. The problem comes in in that try as I might I can't seem to get Jbpm to only use single Session. Not using a single Session messes things up, as objects fetched as temporary variables in one action handler can't always be associated with objects fetched in other handlers due to an "Illegal attempt to associate a proxy with 2 sessions" error.
      So my question is, how do I manage to make Jbpm only use a single session - from the signal that wakes a process to when the instance is persisted back to the database.

      Any help in this matter would be greatly appreciated.