2 Replies Latest reply on Mar 11, 2009 12:10 PM by Marco Santos

    javax.persistence.TransactionRequiredException - no transaction is in progress

    Marco Santos Newbie

      Hello There.

      I'm having problems persiting an entity. From an action wich is a Seam component, everything runs fine. but from the following component i get the following execption:

      javax.persistence.TransactionRequiredException: no transaction is in progress

      The Seam component that raise the exception:

      public class PontonAdapter
          public void partnerAdded(String partnerId, String displayName, boolean isLocalPartner) {
              System.out.print("PARTNER ADDED");
              Partner newPartner = (Partner) Component.getInstance(Partner.class, true);
              partnerHandler.save(newPartner);//--> call that raise exception

      public class PartnerHandlerBean extends CommonHandlerBean implements PartnerHandler {
              private EntityManager entityManager;
              public void save(Partner partner) {
                      entityManager.flush(); //--> raise the exception

      Thanks a lot for the help

      Best Regards / Os meus melhores cumprimentos

      Marco Santos