2 Replies Latest reply on May 12, 2009 11:46 AM by Balazs Pataki

    Asynchronous events and transaction

    Balazs Pataki Newbie


      I try to use raiseAsynchronousEvent() and handle these events in methods annotated with @Observer. In the observer methods the use of an EntityManager seems to fails for various reasons, which somehow all lead to the problem that the transaction is not propagated to/by the thread which invokes my @Observer. At least this is my assumption.

      The  doucmentation only states this:

      Components may observe asynchronous events in the usual way, but remember that only the business process context is propagated to the asynchronous thread.

      What is in the business process context? Is the transaction included? Is it not? The use of @Transactional with some approriate TransactionPropagationType could help?

      I would appreciate any hints, because I'm currently stuck with it.

      Thanks in advance!