3 Replies Latest reply on Jun 15, 2011 4:56 AM by peteroyle.howardmoon.hitcity.com.au

    Seam Cron - persisting something asynchronously

    fortega

      Hi,


      I am using the @Asynchronous annotation from seam cron.
      I try to persist something in the method having this annotation.


      I get an exception:
      javax.persistence.TransactionRequiredException: EntityManager must be access within a transaction


      Which is expected behaviour, as I try to persist something in an other thread.


      What is the cleanest solution for this?