[jboss-cvs] jboss-seam/src/main/org/jboss/seam/bpm ...

Gavin King gavin.king at jboss.com
Fri Jul 6 15:42:55 EDT 2007


  User: gavin   
  Date: 07/07/06 15:42:55

  Modified:    src/main/org/jboss/seam/bpm  ManagedJbpmContext.java
  Log:
  JBSEAM-1614
  
  Revision  Changes    Path
  1.9       +9 -2      jboss-seam/src/main/org/jboss/seam/bpm/ManagedJbpmContext.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ManagedJbpmContext.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/bpm/ManagedJbpmContext.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- ManagedJbpmContext.java	24 Jun 2007 06:34:31 -0000	1.8
  +++ ManagedJbpmContext.java	6 Jul 2007 19:42:55 -0000	1.9
  @@ -35,7 +35,7 @@
   /**
    * Manages a reference to a JbpmContext.
    *
  - * @author <a href="mailto:steve at hibernate.org">Steve Ebersole </a>
  + * @author <a href="mailto:steve at hibernate.org">Steve Ebersole</a>
    * @author Gavin King
    */
   @Scope(ScopeType.EVENT)
  @@ -70,11 +70,19 @@
      @Unwrap
      public JbpmContext getJbpmContext() throws NamingException, RollbackException, SystemException
      {
  +      joinTransaction();
  +      return jbpmContext;
  +   }
  +
  +   private void joinTransaction() throws SystemException
  +   {
         UserTransaction transaction = Transaction.instance();
  +      
         if ( !transaction.isActiveOrMarkedRollback() )
         {
            throw new IllegalStateException("JbpmContext may only be used inside a transaction");
         }
  +      
         if ( !synchronizationRegistered && !Lifecycle.isDestroying() && transaction.isActive() )
         {
            jbpmContext.getSession().isOpen();
  @@ -88,7 +96,6 @@
            }
            synchronizationRegistered = true;
         }
  -      return jbpmContext;
      }
      
      public void beforeCompletion()
  
  
  



More information about the jboss-cvs-commits mailing list