User: schulze 
  Date: 00/10/11 16:24:00

  Modified:    src/main/org/jboss/ejb/plugins CMPPersistenceManager.java
  Log:
  moved the transaction code from the persistence manager into the init/destroy 
commands.
  This enables us to move back to the previous table finder code
  (if the MetaData version doesnt work as expected for any reason).
  
  Revision  Changes    Path
  1.13      +3 -33     jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java
  
  Index: CMPPersistenceManager.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- CMPPersistenceManager.java        2000/10/11 19:40:42     1.12
  +++ CMPPersistenceManager.java        2000/10/11 23:23:59     1.13
  @@ -40,7 +40,7 @@
   *      
   *   @see <related>
   *   @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  -*   @version $Revision: 1.12 $
  +*   @version $Revision: 1.13 $
   */
   public class CMPPersistenceManager
   implements EntityPersistenceManager {
  @@ -100,22 +100,7 @@
                        }
            }
           
  -        // Initialize the store
  -        // if the store performes database operations (ie: table creations) it
  -        // will need a transaction to do so
  -        con.getTransactionManager ().begin ();
  -        try
  -        {
  -           store.init();
  -           con.getTransactionManager ().commit ();
  -        } 
  -        catch (Exception _e)
  -        {
  -           con.getTransactionManager ().rollback ();
  -           store.destroy ();
  -           throw _e;
  -        }
  -        
  +       store.init();
       }
       
       public void start() 
  @@ -129,22 +114,7 @@
       }
       
       public void destroy() {
  -
  -      // same as inistalize...
  -      // maybe the store needs to drop tables and he
  -      // will need a transaction therefor
  -      try
  -      {
  -         con.getTransactionManager ().begin ();
  -         store.destroy();
  -         if (con.getTransactionManager().getStatus() == Status.STATUS_ACTIVE)
  -             con.getTransactionManager ().commit ();
  -         else
  -            con.getTransactionManager ().rollback ();
  -      }
  -      catch (Exception _e)
  -      {
  -      }
  +        store.destroy();
       }
       
       public void createEntity(Method m, Object[] args, EntityEnterpriseContext ctx)
  
  
  

Reply via email to