configuring jackrabbit

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

configuring jackrabbit

Tony Giaccone-2



How does  the launchpad configure jackrabbit?

If I want to move the repository outside the war file what do I need to do to set the value of rep.home?


How do I set up the repository so that it uses a DB for persistence?

I guess I have to configure repository.xml, but which one, and should I use the DB file system as well as the DB for persistence info?


Tony
Reply | Threaded
Open this post in threaded view
|

Re: configuring jackrabbit

justinedelson
On 6/8/10 3:50 PM, Tony Giaccone wrote:
>
>
>
> How does  the launchpad configure jackrabbit?
The Embedded Jackrabbit is configured through OSGi ConfigAdmin. The
simplest way to use ConfigAdmin is probably via the console -
http://sling:[port]/system/console/configMgr. Look for a config under
"Apache Sling Embedded JCR Repository".

>
> If I want to move the repository outside the war file what do I need to do to set the value of rep.home?
You can set the Repository Home location via ConfigAdmin.

>
> How do I set up the repository so that it uses a DB for persistence?
The default repository.xml does use a DB for presistence. If you want to
use a different database you need to write your own repository.xml.

>
> I guess I have to configure repository.xml, but which one, and should I use the DB file system as well as the DB for persistence info?
The one pointed to in the Configuration File configuration property. You
definitely don't NEED to use the DBFileSystem.

Justin

>
>
> Tony

Reply | Threaded
Open this post in threaded view
|

Re: configuring jackrabbit

Tony Giaccone-2


Ok, so as I understand this,  what you're saying is that it is possible, to configure sling, by using the admin console, and that things can be set appropriately there.


However, it's also possible to write your own repository.xml file and given that I want to minimize the post installation configuration that would be the right thing to do, right?


So I want to set it up so I can use Postgres for local development.

Then in production we're going to use Oracle. So I'll have to get the jackrabbit instance using the Oracle persistence manager.

In both cases, I need to be able to access the JDBC drivers for each of these drivers. I assume they are not included in the default launchpad set up.


Where is the right place to put the jar files for these two set ups so that they are included in the correct place so that the java class loader will find them and
be jackrabbit will be able  to use them?

In the source tree I pulled out before a build there are these three repository.xml files:

sling/bundles/jcr/jackrabbit-server/src/main/resources/repository.xml
sling/launchpad/builder/sling/jackrabbit/repository.xml
sling/sling/jackrabbit/repository.xml


I assume the one to modify for use with launchpad is

sling/launchpad/builder/sling/jackrabbit/repository.xml

Is that correct?

Tony Giaccone

On Jun 8, 2010, at 4:34 PM, Justin Edelson wrote:

> On 6/8/10 3:50 PM, Tony Giaccone wrote:
>>
>>
>>
>> How does  the launchpad configure jackrabbit?
> The Embedded Jackrabbit is configured through OSGi ConfigAdmin. The
> simplest way to use ConfigAdmin is probably via the console -
> http://sling:[port]/system/console/configMgr. Look for a config under
> "Apache Sling Embedded JCR Repository".
>
>>
>> If I want to move the repository outside the war file what do I need to do to set the value of rep.home?
> You can set the Repository Home location via ConfigAdmin.
>
>>
>> How do I set up the repository so that it uses a DB for persistence?
> The default repository.xml does use a DB for presistence. If you want to
> use a different database you need to write your own repository.xml.
>
>>
>> I guess I have to configure repository.xml, but which one, and should I use the DB file system as well as the DB for persistence info?
> The one pointed to in the Configuration File configuration property. You
> definitely don't NEED to use the DBFileSystem.
>
> Justin
>
>>
>>
>> Tony
>

Reply | Threaded
Open this post in threaded view
|

Re: configuring jackrabbit

justinedelson
On 6/8/10 4:51 PM, Tony Giaccone wrote:
>
>
> Ok, so as I understand this,  what you're saying is that it is possible, to configure sling, by using the admin console, and that things can be set appropriately there.
Correct.

Also, I just remembered that you can also configure using framework
properties:

sling.repository.home  = rep.home
sling.repository.config.file.url = the URL to the repository.xml file

However, since you're using the WAR version, I don't think there's a
good way to set framework properties without modifying web.xml.

>
>
> However, it's also possible to write your own repository.xml file and given that I want to minimize the post installation configuration that would be the right thing to do, right?
There are two fundamental things you can configure with respect to the
embedded repository:
1) The location of rep.home
2) The location of the repository.xml file

If you want to use Postgres and Oracle, you NEED to write your own
repository.xml file. It sounds like you want to change rep.home as well.

>
>
> So I want to set it up so I can use Postgres for local development.
>
> Then in production we're going to use Oracle. So I'll have to get the jackrabbit instance using the Oracle persistence manager.
>
> In both cases, I need to be able to access the JDBC drivers for each of these drivers. I assume they are not included in the default launchpad set up.
That's correct. If there are OSGi bundles containing these drivers, you
can simple install the bundles into Sling's OSGi framework. If there
aren't OSGi bundles for these drivers, you'll need to construct one.

>
>
> Where is the right place to put the jar files for these two set ups so that they are included in the correct place so that the java class loader will find them and
> be jackrabbit will be able  to use them?
They need to be installed into the OSGi framework. You can either
include the drivers in the launchpad WAR or install them at runtime or
use something like Felix FileInstall.


>
> In the source tree I pulled out before a build there are these three repository.xml files:
>
> sling/bundles/jcr/jackrabbit-server/src/main/resources/repository.xml
> sling/launchpad/builder/sling/jackrabbit/repository.xml
> sling/sling/jackrabbit/repository.xml
>
>
> I assume the one to modify for use with launchpad is
>
> sling/launchpad/builder/sling/jackrabbit/repository.xml
>
> Is that correct?
>
Well, these files should all have identical content. The last two are
copies of the first one; these copies are made by Sling when it sees
that there's no file configure.

You should copy one of them to a different location, edit it, and then
configure the location of that file in ConfigAdmin.

Justin

> Tony Giaccone
>
> On Jun 8, 2010, at 4:34 PM, Justin Edelson wrote:
>
>> On 6/8/10 3:50 PM, Tony Giaccone wrote:
>>>
>>>
>>>
>>> How does  the launchpad configure jackrabbit?
>> The Embedded Jackrabbit is configured through OSGi ConfigAdmin. The
>> simplest way to use ConfigAdmin is probably via the console -
>> http://sling:[port]/system/console/configMgr. Look for a config under
>> "Apache Sling Embedded JCR Repository".
>>
>>>
>>> If I want to move the repository outside the war file what do I need to do to set the value of rep.home?
>> You can set the Repository Home location via ConfigAdmin.
>>
>>>
>>> How do I set up the repository so that it uses a DB for persistence?
>> The default repository.xml does use a DB for presistence. If you want to
>> use a different database you need to write your own repository.xml.
>>
>>>
>>> I guess I have to configure repository.xml, but which one, and should I use the DB file system as well as the DB for persistence info?
>> The one pointed to in the Configuration File configuration property. You
>> definitely don't NEED to use the DBFileSystem.
>>
>> Justin
>>
>>>
>>>
>>> Tony
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: configuring jackrabbit

Tony Giaccone-2

On Jun 8, 2010, at 5:26 PM, Justin Edelson wrote:

> On 6/8/10 4:51 PM, Tony Giaccone wrote:
>>
>>
>> Ok, so as I understand this,  what you're saying is that it is possible, to configure sling, by using the admin console, and that things can be set appropriately there.
> Correct.
>
> Also, I just remembered that you can also configure using framework
> properties:
>
> sling.repository.home  = rep.home
> sling.repository.config.file.url = the URL to the repository.xml file
>
> However, since you're using the WAR version, I don't think there's a
> good way to set framework properties without modifying web.xml.

I'm building the war file from source. So I can set these values. They go into the web.xml file


Are you talking about this stanza from the web xml?

        <init-param>
                <param-name>sling.home</param-name>
                <param-value> Enter Path Here </param-value>
        </init-param>

Or are you talking about the file

sling.properties


Tony Giaccone



Reply | Threaded
Open this post in threaded view
|

Re: configuring jackrabbit

justinedelson
On 6/8/10 7:37 PM, Tony Giaccone wrote:

>
> On Jun 8, 2010, at 5:26 PM, Justin Edelson wrote:
>
>> On 6/8/10 4:51 PM, Tony Giaccone wrote:
>>>
>>>
>>> Ok, so as I understand this,  what you're saying is that it is possible, to configure sling, by using the admin console, and that things can be set appropriately there.
>> Correct.
>>
>> Also, I just remembered that you can also configure using framework
>> properties:
>>
>> sling.repository.home  = rep.home
>> sling.repository.config.file.url = the URL to the repository.xml file
>>
>> However, since you're using the WAR version, I don't think there's a
>> good way to set framework properties without modifying web.xml.
>
> I'm building the war file from source. So I can set these values. They go into the web.xml file
>
>
> Are you talking about this stanza from the web xml?
>
>         <init-param>
>                 <param-name>sling.home</param-name>
>                 <param-value> Enter Path Here </param-value>
>         </init-param>
>
> Or are you talking about the file
>
> sling.properties

Either. Init params take precendence over the contents of sling.properties.

Justin

>
>
> Tony Giaccone
>
>
>