0 Replies Latest reply on Jul 13, 2009 8:57 AM by Adam Basori

    EntityManager on prematurely ended conversation

    Adam Basori Newbie

      hi all,


      i have SFSB component. Because it's method use @StartTask annotations, so the pre-existing session conversation, must be terminated to avoid creating business scoped conversation within active session conversation.


      but when i trying to reuse EntityManager in business scoped conversation, the EntityManager seem unconnected or some kind of state change.



      @Stateful
      @Scope(ScopeType.SESSION)
      @Name("branch")
      public class BranchAction implements IBranch {
              @PersistenceContext(type=PersistenceContextType.EXTENDED)
           private EntityManager entityManager;
              
              @End
           @CreateProcess(definition="ShortPeriodCredit")
           public String select(){}
      
              @StartTask
           @EndTask(transition="next")
           public void getInfo(){
      //here i can't use EntityManager normally as expected
              }
      }
      



      i don't know what really happen. any help will be appreciated