Update of /var/cvs/src/org/mmbase/bridge/implementation In directory james.mmbase.org:/tmp/cvs-serv18262
Modified Files: Tag: MMBase-1_8 BasicTransaction.java Log Message: ported some performacne related checks from HEAD See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/bridge/implementation Index: BasicTransaction.java =================================================================== RCS file: /var/cvs/src/org/mmbase/bridge/implementation/BasicTransaction.java,v retrieving revision 1.25.2.12 retrieving revision 1.25.2.13 diff -u -b -r1.25.2.12 -r1.25.2.13 --- BasicTransaction.java 7 Jul 2008 13:31:10 -0000 1.25.2.12 +++ BasicTransaction.java 4 Nov 2008 17:29:45 -0000 1.25.2.13 @@ -23,7 +23,7 @@ * which means that chanegs are committed only if you commit the transaction itself. * This mechanism allows you to rollback changes if something goes wrong. * @author Pierre van Rooden - * @version $Id: BasicTransaction.java,v 1.25.2.12 2008/07/07 13:31:10 michiel Exp $ + * @version $Id: BasicTransaction.java,v 1.25.2.13 2008/11/04 17:29:45 michiel Exp $ */ public class BasicTransaction extends BasicCloud implements Transaction { @@ -102,10 +102,20 @@ Iterator i = col.iterator(); while (i.hasNext()) { MMObjectNode n = (MMObjectNode) i.next(); - if (!TransactionManager.EXISTS_NOLONGER.equals(n.getStringValue("_exists"))) { + + if (n == null) { + log.warn("Found null in transaction"); + continue; + } Node node = parentCloud.makeNode(n, "" + n.getNumber()); - node.commit(); + if (! node.isChanged() && ! node.isNew()) { + continue; } + if (TransactionManager.EXISTS_NOLONGER.equals(n.getStringValue("_exists"))) { + continue; + } + + node.commit(); } } catch (TransactionManagerException e) { // do we drop the transaction here or delete the trans context? _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs