Josias Thoeny wrote:

[...]

So each usecase has its own identity map in order to have a view of the
content which is independent from the other usecases?

Yes. Actually the purpose is to isolate the documents in different
user sessions. The problem at hand occurs because we also have to
isolate active / non-active usecases of a single user. But maybe this
is too complex and we just shouldn't allow "inactive usecases" when a
usecase is active.


Does that mean that two instances of the same document stored in two
different identity maps may have different meta data, workflow, or
actual document content?

Yes. This is necessary to support transactions.


Another question: Where in the code are documents added to the identity
map? I expected this to happen in DefaultDocumentBuilder or
DefaultDocument, but I wasn't able to figure it out.

IdentityMapImpl.get(IdentifiableFactory factory, String key)


        if (object == null) {
            try {
                object = factory.build(this, key);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
            map.put(key, object);
        }

This should be the single entry point for creating new Identifiables.


Thanks in advance for an explanation. (I'm just trying to get a better
understanding of the matter.)

I'm looking forward to your comments :)

BTW, hopefully we can get rid of this home-grown code by doing
a JCR-only approach. But for me it is a good opportunity to learn.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to