Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Sylvain, I'm currently writing such a source ;-) Sylvain did you finish it yet? Did not yet see anything in the SVN. Regards, Torsten Torsten Schlabach wrote: Hi all, did anyone yet write any - maybe experimental - code for Cocoon to use a repository through the JCR (aka JSR-170) API? I am thinking of an Avalon / Excalibur source (which is the right current term?) which would maybe implement a scheme, so I could write map:generate src=jcr://... / I'm currently writing such a source ;-) Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Sylvain Wallez wrote: Stefano Mazzocchi wrote: Sylvain Wallez wrote: Will the scheme be named jcr? Yes, but the scheme can be anything you want, especially as you may use several repositories within the same webapp, and therefore use jcr1, jcr2, etc. ah! Please, do jcr://repo/* instead! I thought about that, but I'm not sure it is the best as: - most apps will use a single repo - I'd like to provide pure JCR repos using JNDI and pure Jackrabbit where the component config is or points to the Jackrabbit config, and these will be different implementations of SourceFactory what about specifying the repo as parameter, e.g. map:generate src=jcr://... map:parameter name=repo value=.../ /map:generate whereas if not parameter is being specified a default repo is being used? Michi -- Michael Wechner Wyona Inc. - Open Source Content Management - Apache Lenya http://www.wyona.com http://lenya.apache.org [EMAIL PROTECTED][EMAIL PROTECTED]
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Sylvain Wallez wrote: Torsten Schlabach wrote: Sylvain, I'm currently writing such a source ;-) Will it show up in a separate block in 2.2-dev soon? Yes. Maybe even 2.1, as I needed for a 2.1 project. cool. I would be happy to help and testdrive when you will check in your stuff Michi -- Michael Wechner Wyona Inc. - Open Source Content Management - Apache Lenya http://www.wyona.com http://lenya.apache.org [EMAIL PROTECTED][EMAIL PROTECTED]
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Michael Wechner wrote: what about specifying the repo as parameter, e.g. map:generate src=jcr://... map:parameter name=repo value=.../ /map:generate Because this is a source, not a generator. The parameter would be a parameter to the generator. Regards, Upayavira
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Upayavira wrote: Michael Wechner wrote: what about specifying the repo as parameter, e.g. map:generate src=jcr://... map:parameter name=repo value=.../ /map:generate Because this is a source, not a generator. The parameter would be a parameter to the generator. ok. Well, I thought the generator could pass it on to the source, but I guess I don't fully understand how it should work. Will try to figure it out. But on the other hand I don't fully understand why Sylvan would like to use jcrX://... instead of jcr://X/... as Stefano suggested, which seems to make more sense. Michi Regards, Upayavira -- Michael Wechner Wyona Inc. - Open Source Content Management - Apache Lenya http://www.wyona.com http://lenya.apache.org [EMAIL PROTECTED][EMAIL PROTECTED]
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Michael Wechner wrote: Upayavira wrote: Michael Wechner wrote: what about specifying the repo as parameter, e.g. map:generate src=jcr://... map:parameter name=repo value=.../ /map:generate Because this is a source, not a generator. The parameter would be a parameter to the generator. ok. Well, I thought the generator could pass it on to the source, but I guess I don't fully understand how it should work. Will try to figure it out. But on the other hand I don't fully understand why Sylvan would like to use jcrX://... instead of jcr://X/... as Stefano suggested, which seems to make more sense. same here. The repository configuration could be done in the source configuration (.xconf) but I guess that Sylvain is aware of this ;-) -- Reinhard Pötz Independant Consultant, Trainer (IT)-Coach {Software Engineering, Open Source, Web Applications, Apache Cocoon} web(log): http://www.poetz.cc
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Reinhard Poetz wrote: Michael Wechner wrote: Upayavira wrote: Michael Wechner wrote: what about specifying the repo as parameter, e.g. map:generate src=jcr://... map:parameter name=repo value=.../ /map:generate Because this is a source, not a generator. The parameter would be a parameter to the generator. ok. Well, I thought the generator could pass it on to the source, but I guess I don't fully understand how it should work. Will try to figure it out. But on the other hand I don't fully understand why Sylvan would like to use jcrX://... instead of jcr://X/... as Stefano suggested, which seems to make more sense. same here. The repository configuration could be done in the source configuration (.xconf) but I guess that Sylvain is aware of this ;-) My suggestion of having different protocols for different repositories comes from lazyness as with jcr://repo/ the first path element has to be handled by the source factory implementation that then needs to call the appropriate repository (and also manage a collection of repositories) whereas having several protocols allows all this stuff to be handled automatically by the service manager and the source resolver. Or we could also have a RepositorySelector and select a repository using the first path element. Hmm... that may be a good option as an application also need to access a repository directly and not only through a source. Hmm... Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Sylvain Wallez wrote: Or we could also have a RepositorySelector and select a repository using the first path element. Instead of path element, you could use subprotocol jcr:repo1://path/ Hmm... that may be a good option as an application also need to access a repository directly and not only through a source. Hmm... Yes, applications should have programmatic access to the repository. Are you thinking about registering all repositories in cocoon.xconf? Vadim Sylvain
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Vadim Gritsenko wrote: Sylvain Wallez wrote: Or we could also have a RepositorySelector and select a repository using the first path element. Instead of path element, you could use subprotocol jcr:repo1://path/ I like it, as it allows to use jcr://path to use the default (or single) repository. Hmm... that may be a good option as an application also need to access a repository directly and not only through a source. Hmm... Yes, applications should have programmatic access to the repository. Are you thinking about registering all repositories in cocoon.xconf? Exactly. The JCRSourceFactory will then just be one particular client of these components. Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Sylvain Wallez wrote: Reinhard Poetz wrote: Michael Wechner wrote: Upayavira wrote: Michael Wechner wrote: what about specifying the repo as parameter, e.g. map:generate src=jcr://... map:parameter name=repo value=.../ /map:generate Because this is a source, not a generator. The parameter would be a parameter to the generator. ok. Well, I thought the generator could pass it on to the source, but I guess I don't fully understand how it should work. Will try to figure it out. But on the other hand I don't fully understand why Sylvan would like to use jcrX://... instead of jcr://X/... as Stefano suggested, which seems to make more sense. same here. The repository configuration could be done in the source configuration (.xconf) but I guess that Sylvain is aware of this ;-) My suggestion of having different protocols for different repositories comes from lazyness as with jcr://repo/ the first path element has to be handled by the source factory implementation that then needs to call the appropriate repository (and also manage a collection of repositories) whereas having several protocols allows all this stuff to be handled automatically by the service manager and the source resolver. Or we could also have a RepositorySelector and select a repository using the first path element. Hmm... that may be a good option as an application also need to access a repository directly and not only through a source. Hmm... I know it came from lazyness. And that is also why I hope you'll reconsider spending those 15 minutes and save all of us (and you!) terrible pain in the future in answering a gazillion email about why in hell that was done ;-) -- Stefano.
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Sylvain Wallez wrote: Vadim Gritsenko wrote: Sylvain Wallez wrote: Or we could also have a RepositorySelector and select a repository using the first path element. Instead of path element, you could use subprotocol jcr:repo1://path/ I like it, as it allows to use jcr://path to use the default (or single) repository. +1 -- Stefano.
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Torsten Schlabach wrote: Hi all, did anyone yet write any - maybe experimental - code for Cocoon to use a repository through the JCR (aka JSR-170) API? I am thinking of an Avalon / Excalibur source (which is the right current term?) which would maybe implement a scheme, so I could write map:generate src=jcr://... / I'm currently writing such a source ;-) Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Sylvain, I'm currently writing such a source ;-) Will it show up in a separate block in 2.2-dev soon? Will the scheme be named jcr? Regards, Torsten Sylvain Wallez schrieb: Torsten Schlabach wrote: Hi all, did anyone yet write any - maybe experimental - code for Cocoon to use a repository through the JCR (aka JSR-170) API? I am thinking of an Avalon / Excalibur source (which is the right current term?) which would maybe implement a scheme, so I could write map:generate src=jcr://... / I'm currently writing such a source ;-) Sylvain
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Torsten Schlabach wrote: Sylvain, I'm currently writing such a source ;-) Will it show up in a separate block in 2.2-dev soon? Yes. Maybe even 2.1, as I needed for a 2.1 project. Will the scheme be named jcr? Yes, but the scheme can be anything you want, especially as you may use several repositories within the same webapp, and therefore use jcr1, jcr2, etc. Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: Any JCR (JSR-170) scratchpad code for Cocoon yet?
Stefano Mazzocchi wrote: Sylvain Wallez wrote: Will the scheme be named jcr? Yes, but the scheme can be anything you want, especially as you may use several repositories within the same webapp, and therefore use jcr1, jcr2, etc. ah! Please, do jcr://repo/* instead! I thought about that, but I'm not sure it is the best as: - most apps will use a single repo - I'd like to provide pure JCR repos using JNDI and pure Jackrabbit where the component config is or points to the Jackrabbit config, and these will be different implementations of SourceFactory Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }