Michael Wechner wrote:
Andreas Hartmann wrote:
That would be possible for instance by using a selector for different
repositories.
can you give an example
cocoon.xconf:
<repositories>
<default> ... </default>
<myrepo> ... </myrepo>
</repositories>
selector = (...) this.manager.lookup(Repository.ROLE + "Selector");
repository = (...) selector.select("myrepo");
ok. And within the sitemap it would look as follows:
jcr://myrepo/....
Actually this would be up to the source / source factory implementation.
Using the first path step to select the repository is certainly a
possible solution.
JCRSourceFactory.getSource():
String repoName = path.split('/')[0];
Repository repo = (Repository) selector.select(repoName);
session = repo.login();
return createSource(session, path);
Multiple source factories can be registered anyway
(using different protocols).
I think it makes sense to register teh Lenya Source Factory with
another protocol, e.g. jcr-lenya or whatever.
OK, we could do that if we use a selector to manage the repository
implementations
isn't that two different things? I mean the actual repository and
the actual source factory?
At the moment, there's only one repository:
SourceFactory.lazyInit():
this.repo = (Repository)manager.lookup(Repository.class.getName());
This means that only one Repository service is available.
Of course you can instanciate multiple source factories, but they
will access the same repository.
[...]
All JCR related stuff is in the JCR publet.
ok
This way, we can keep
it clearly separated from the core.
why do you consider JCR as publet. I would say that should be part of
the core.
-1
Lenya still suffers from too many cross-component dependencies.
There should be no dependencies from the core to the JCR-related
classes, only the other way round. The JCR publet offers just another
implementation of the Lenya repository components.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]