Re: Suggestion for Transactor.java

"Hannes Wallnoefer" <[email protected]>
Newsgroups gmane.comp.java.helma.general
Message-ID <[email protected]>
Hi Kris,

yes, please send me a patch.

hannes

2007/4/23, Kris Leite <[email protected]>:
> 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
> [email protected]
> http://helma.org/mailman/listinfo/helma-user
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.