You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Michael Wechner <mi...@wyona.com> on 2005/08/24 10:55:32 UTC

Make JCR resp Repo configurable within local.build.properties

Hi

I would like to make the Repo (e.g. JCR or the filesystem) configurable
within local.build.properties, because it seems to me that right now
people are quite confused how to get started with JCR.

WDYT?

Michi

-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Make JCR resp Repo configurable within local.build.properties

Posted by Michael Wechner <mi...@wyona.com>.
Emmanouil Batsis wrote:

>>Michael Wechner wrote:
>>    
>>
>>>>>I would like to make the Repo (e.g. JCR or the filesystem) configurable
>>>>>within local.build.properties, because it seems to me that right now
>>>>>people are quite confused how to get started with JCR.
>>>>>          
>>>>>
>
>I found that pretty easily and i consider myself a complete newbie :-)
>  
>

I am not a newbie, but I consider it very annoying ;-)

>Anyway, what is equally or more importand is the deployment model [1] and how 
>to control that. Are models 2 and 3 supported by current glue?
>
>[1] http://incubator.apache.org/jackrabbit/arch/deploy.html
>  
>

that's worth another thread ;-)

especially if one wants to consider clustering ...

But I would suggest one step after the other.

Michi

>Manos
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>For additional commands, e-mail: dev-help@lenya.apache.org
>
>
>  
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Make JCR resp Repo configurable within local.build.properties

Posted by Emmanouil Batsis <ma...@geekologue.com>.
> Michael Wechner wrote:
> >>> I would like to make the Repo (e.g. JCR or the filesystem) configurable
> >>> within local.build.properties, because it seems to me that right now
> >>> people are quite confused how to get started with JCR.

I found that pretty easily and i consider myself a complete newbie :-)

Anyway, what is equally or more importand is the deployment model [1] and how 
to control that. Are models 2 and 3 supported by current glue?

[1] http://incubator.apache.org/jackrabbit/arch/deploy.html

Manos

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Make JCR resp Repo configurable within local.build.properties

Posted by Michael Wechner <mi...@wyona.com>.
Andreas Hartmann wrote:

> Michael Wechner wrote:
>
> [...]
>
>>>>> BTW, invoking the "import into JCR" usecase during the build is not
>>>>> possible because the repository service cannot be accessed without
>>>>> the service manager.
>>>>
>>>>
>>>> well, I guess it shouldn't be very hard to refactor this ;-)
>>>
>>>
>>> It is virtually impossible. Furthermore, it's not a refactoring but
>>> a design change.
>>
>
>>
>> I don't understand. I just want to import the data during the build 
>> process.
>> What's the difference to import the data from the command line than 
>> from Lenya?!
>
>
> The Avalon environment is not available.
>
> You could invoke the Cocoon CLI with the usecase URI, that would
> probably be the easiest way. But it would requite to disable access 
> control
> or add a log-in request scenario to the build target (maybe using a web
> test framework).


ok

>
>
>> If this isn't possible, then I think the design has a problem and we 
>> should
>> change the design.
>
>
> :)
>
> You should post that on cocoon-dev.


will do that

Michi

>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Make JCR resp Repo configurable within local.build.properties

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:

[...]

>>>> BTW, invoking the "import into JCR" usecase during the build is not
>>>> possible because the repository service cannot be accessed without
>>>> the service manager.
>>>
>>> well, I guess it shouldn't be very hard to refactor this ;-)
>>
>> It is virtually impossible. Furthermore, it's not a refactoring but
>> a design change.

> 
> I don't understand. I just want to import the data during the build 
> process.
> What's the difference to import the data from the command line than from 
> Lenya?!

The Avalon environment is not available.

You could invoke the Cocoon CLI with the usecase URI, that would
probably be the easiest way. But it would requite to disable access control
or add a log-in request scenario to the build target (maybe using a web
test framework).


> If this isn't possible, then I think the design has a problem and we should
> change the design.

:)

You should post that on cocoon-dev.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Make JCR resp Repo configurable within local.build.properties

Posted by Michael Wechner <mi...@wyona.com>.
Andreas Hartmann wrote:

> Michael Wechner wrote:
>
>> Andreas Hartmann wrote:
>>
>>> Michael Wechner wrote:
>>>
>>>> Hi
>>>>
>>>> I would like to make the Repo (e.g. JCR or the filesystem) 
>>>> configurable
>>>> within local.build.properties, because it seems to me that right now
>>>> people are quite confused how to get started with JCR.
>>>
>>>
>>>
>>>
>>> BTW, invoking the "import into JCR" usecase during the build is not
>>> possible because the repository service cannot be accessed without
>>> the service manager.
>>
>>
>>
>>
>> well, I guess it shouldn't be very hard to refactor this ;-)
>
>
> It is virtually impossible. Furthermore, it's not a refactoring but
> a design change.


I don't understand. I just want to import the data during the build process.
What's the difference to import the data from the command line than from 
Lenya?!

If this isn't possible, then I think the design has a problem and we should
change the design.

Michi

>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Make JCR resp Repo configurable within local.build.properties

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:
> Andreas Hartmann wrote:
> 
>> Michael Wechner wrote:
>>
>>> Hi
>>>
>>> I would like to make the Repo (e.g. JCR or the filesystem) configurable
>>> within local.build.properties, because it seems to me that right now
>>> people are quite confused how to get started with JCR.
>>
>>
>>
>> BTW, invoking the "import into JCR" usecase during the build is not
>> possible because the repository service cannot be accessed without
>> the service manager.
> 
> 
> 
> well, I guess it shouldn't be very hard to refactor this ;-)

It is virtually impossible. Furthermore, it's not a refactoring but
a design change.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Make JCR resp Repo configurable within local.build.properties

Posted by Michael Wechner <mi...@wyona.com>.
Andreas Hartmann wrote:

> Michael Wechner wrote:
>
>> Hi
>>
>> I would like to make the Repo (e.g. JCR or the filesystem) configurable
>> within local.build.properties, because it seems to me that right now
>> people are quite confused how to get started with JCR.
>
>
> BTW, invoking the "import into JCR" usecase during the build is not
> possible because the repository service cannot be accessed without
> the service manager.


well, I guess it shouldn't be very hard to refactor this ;-)

>
> Instead of re-implementing this with a custom repository integration,
> we could automatically invoke the usecase when a JCR-based publication is
> accessed which is not yet migrated to the JCR repository.


I don't think such automagic is a good thing. Also what about performance.

Michi

>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Make JCR resp Repo configurable within local.build.properties

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:
> Hi
> 
> I would like to make the Repo (e.g. JCR or the filesystem) configurable
> within local.build.properties, because it seems to me that right now
> people are quite confused how to get started with JCR.

BTW, invoking the "import into JCR" usecase during the build is not
possible because the repository service cannot be accessed without
the service manager.

Instead of re-implementing this with a custom repository integration,
we could automatically invoke the usecase when a JCR-based publication is
accessed which is not yet migrated to the JCR repository.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Make JCR resp Repo configurable within local.build.properties

Posted by Michael Wechner <mi...@wyona.com>.
Andreas Hartmann wrote:

> Michael Wechner wrote:
>
>> Hi
>>
>> I would like to make the Repo (e.g. JCR or the filesystem) configurable
>> within local.build.properties, because it seems to me that right now
>> people are quite confused how to get started with JCR.
>>
>> WDYT?
>
>
> Makes sense.
>
> Instead of changing the default class in lenya.roles, I'd rather use a
> service selector to obtain the node factory.
>
> This way it might even be possible to use either JCR or the FS for 
> different
> publications by adding the config to publication.xconf:
>
>   <repository type="jcr"/>
>
>
> RepositorySource.java:
>
>     selector = (...) this.manager.lookup(NodeFactory.ROLE + "Selector");
>
>     if (isPublication(path)) {
>
>         Publication pub = getPublication(path);
>         String hint = pub.getNodeFactoryHint();
>         factory = (...) selector.select(hint);
>     }
>     else {
>         factory = (...) selector.select(NodeFactory.DEFAULT_FACTORY);
>     }


ok, sounds good to me. I will try to change this.

Thanks

Michi

>
>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Make JCR resp Repo configurable within local.build.properties

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:
> Hi
> 
> I would like to make the Repo (e.g. JCR or the filesystem) configurable
> within local.build.properties, because it seems to me that right now
> people are quite confused how to get started with JCR.
> 
> WDYT?

Makes sense.

Instead of changing the default class in lenya.roles, I'd rather use a
service selector to obtain the node factory.

This way it might even be possible to use either JCR or the FS for different
publications by adding the config to publication.xconf:

   <repository type="jcr"/>


RepositorySource.java:

     selector = (...) this.manager.lookup(NodeFactory.ROLE + "Selector");

     if (isPublication(path)) {

         Publication pub = getPublication(path);
         String hint = pub.getNodeFactoryHint();
         factory = (...) selector.select(hint);
     }
     else {
         factory = (...) selector.select(NodeFactory.DEFAULT_FACTORY);
     }


-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org