[Helma-user] Suggestion for Transactor.java
Hannes Wallnoefer
hannes at helma.at
Tue Apr 24 16:05:16 CEST 2007
Hi Kris,
yes, please send me a patch.
hannes
2007/4/23, Kris Leite <kleite at imcsoftware.com>:
> I found that in using the new 'onPersist' feature that if I added or updated
> another persisted HopObject, that HopObject was not being written out
> to the database (either embedded or relational).
>
> It would appear that in 'commit()' method in Transactor.java makes a
> copy of the dirtyNodes map once and processes all the nodes. Anything
> done in the 'onPersist' calls will be ignored.
>
> I would like to suggest that the routine is changed slightly to continue
> looking into the dirtyNodes list for any addition Nodes that need to be
> updated. The change is very simple and can be implemented on just
> a couple lines:
>
> 1) Around line 260 in Transactor.java which contains:
>
> if (!dirtyNodes.isEmpty()) {
>
> change to:
>
> while (!dirtyNodes.isEmpty()) {
>
> 2) Add a new line after line 261
>
> Object[] dirty = dirtyNodes.values().toArray();
>
> insert:
>
> dirtyNodes = new HashMap();
>
> If you would like a patch for this change, I can provide one.
>
> Thanks,
> Kris
>
> _______________________________________________
> Helma-user mailing list
> Helma-user at helma.org
> http://helma.org/mailman/listinfo/helma-user
>
More information about the Helma-user
mailing list