Index: topia2/src/java/org/codelutin/topia/framework/TopiaFiresSupport.java diff -u topia2/src/java/org/codelutin/topia/framework/TopiaFiresSupport.java:1.5 topia2/src/java/org/codelutin/topia/framework/TopiaFiresSupport.java:1.6 --- topia2/src/java/org/codelutin/topia/framework/TopiaFiresSupport.java:1.5 Wed Nov 22 20:20:56 2006 +++ topia2/src/java/org/codelutin/topia/framework/TopiaFiresSupport.java Thu Nov 23 13:41:40 2006 @@ -128,9 +128,11 @@ if (log.isDebugEnabled()) { log.debug("warnOnReadEntity"); } - // we don't create state if null, because state must be create - // before in warnOnLoad or warnOnCreate EntityState state = transactionEntities.get(entity); + if (state == null) { + state = new EntityState(); + transactionEntities.put(entity, state); + } state.addRead(); } @@ -143,9 +145,11 @@ log.debug("warnOnUpdateEntity"); } - // we don't create state if null, because state must be create - // before in warnOnLoad or warnOnCreate EntityState state = transactionEntities.get(entity); + if (state == null) { + state = new EntityState(); + transactionEntities.put(entity, state); + } state.addUpdate(); } @@ -157,9 +161,11 @@ if (log.isDebugEnabled()) { log.debug("warnOnDeleteEntity"); } - // we don't create state if null, because state must be create - // before in warnOnLoad or warnOnCreate EntityState state = transactionEntities.get(entity); + if (state == null) { + state = new EntityState(); + transactionEntities.put(entity, state); + } state.addDelete(); } @@ -168,13 +174,13 @@ if (log.isDebugEnabled()) { log.debug("fireOnBeginTransaction"); } - try { - TopiaTransactionEvent e = new TopiaTransactionEvent(context); - for(Iterator l=transactionVetoables.iterator(); l.hasNext();) { + TopiaTransactionEvent e = new TopiaTransactionEvent(context); + for(Iterator l=transactionVetoables.iterator(); l.hasNext();) { + try { l.next().beginTransaction(e); + } catch (Exception eee) { + throw new TopiaVetoException(eee); } - } catch (Exception eee) { - throw new TopiaVetoException(eee); } }