db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: jakarta-ojb/src/java/org/apache/ojb/odmg/collections DMapImpl.java DListImpl.java DSetImpl.java
Date Sat, 21 Dec 2002 17:35:54 GMT
thma        2002/12/21 09:35:53

  Modified:    src/java/org/apache/ojb/odmg/collections DMapImpl.java
                        DListImpl.java DSetImpl.java
  Log:
  fix check for open transactions
  
  Revision  Changes    Path
  1.12      +3 -3      jakarta-ojb/src/java/org/apache/ojb/odmg/collections/DMapImpl.java
  
  Index: DMapImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/odmg/collections/DMapImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DMapImpl.java	20 Dec 2002 01:54:02 -0000	1.11
  +++ DMapImpl.java	21 Dec 2002 17:35:53 -0000	1.12
  @@ -189,7 +189,7 @@
           if (ok)
           {
               TransactionImpl tx = TxManagerFactory.instance().getTransaction();
  -            if (tx != null)
  +            if ((tx != null) && (tx.isOpen()))
               {
                   tx.lock(this, Transaction.WRITE);
                   tx.lock(entry, Transaction.WRITE);
  @@ -234,7 +234,7 @@
               oldValue = correctEntry.getValue();
               i.remove();
               TransactionImpl tx = TxManagerFactory.instance().getTransaction();
  -            if (tx != null)
  +            if ((tx != null) && (tx.isOpen()))
               {
                   tx.markDelete(correctEntry);
               }
  
  
  
  1.12      +2 -3      jakarta-ojb/src/java/org/apache/ojb/odmg/collections/DListImpl.java
  
  Index: DListImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/odmg/collections/DListImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DListImpl.java	20 Dec 2002 01:54:02 -0000	1.11
  +++ DListImpl.java	21 Dec 2002 17:35:53 -0000	1.12
  @@ -81,7 +81,6 @@
   import org.odmg.OQLQuery;
   import org.odmg.Transaction;
   import org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldFactory;
  -import org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPropertyImpl;
   
   /**
    * Insert the type's description here.
  @@ -176,7 +175,7 @@
           elements.add(index, entry);
           // if we are in a transaction: acquire locks !
           Transaction tx = TxManagerFactory.instance().getTransaction();
  -        if (tx != null)
  +        if ((tx != null) && (tx.isOpen()))
           {
               tx.lock(this, Transaction.WRITE);
               tx.lock(entry, Transaction.WRITE);
  @@ -221,7 +220,7 @@
           DListEntry entry = (DListEntry) elements.get(index);
           // if we are in a transaction: acquire locks !
           TransactionImpl tx = TxManagerFactory.instance().getTransaction();
  -        if (tx != null)
  +        if ((tx != null) && (tx.isOpen()))
           {
               tx.markDelete(entry);
           }
  
  
  
  1.11      +1 -1      jakarta-ojb/src/java/org/apache/ojb/odmg/collections/DSetImpl.java
  
  Index: DSetImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/odmg/collections/DSetImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DSetImpl.java	20 Dec 2002 01:54:02 -0000	1.10
  +++ DSetImpl.java	21 Dec 2002 17:35:53 -0000	1.11
  @@ -139,7 +139,7 @@
               elements.add(entry);
               // if we are in a transaction: get locks !
               TransactionImpl tx = getTransaction();
  -            if (tx != null)
  +            if ((tx != null) && (tx.isOpen()))
               {
                   tx.lock(this, Transaction.WRITE);
                   tx.lock(entry, Transaction.WRITE);
  
  
  

Mime
View raw message