You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Tony Giaccone <tg...@masslight.net> on 2010/06/29 18:15:43 UTC

Oracle and Sling


For those who are interested in the ongoing effort to get Sling 
to talk to Oracle, let me announce that today I was finally 
successful.  To run using Oracle, you need to make two slight 
changes to the process outlined in my pervious email about 
getting sling working with postgres.

First you need to bundle the Oracle drives and put them in the
right places. Which oracle Driver to use, depends strongly on 
which version of Oracle you're using. I suggest you contact 
your local Oraclel Guru for guidance on  jdbc driver selection. 


Second you need to change the PersistenceManager to 
use the Oracle persistence manager. You should be aware
that there are two different Oracle Persistence managers in Jackrabbit. 


org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager (Oracle 10 or newer)

org.apache.jackrabbit.core.persistence.bundle.Oracle9PersistenceManager (Oracle 9)


Which you use is Oracle Version specific, and also please be
 aware there are other versions of the OraclePersistenceManager. 


org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager
org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager


I originally found an example that used the 

db.OraclePersistenceManager and was unable to 

get that to work.  And it throws ClassCast Exception errors. 

 Once I swapped out that class for:

org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager 

Things started working much better. 


As an aside, the PersistenceManager is mentioned twice 
in the repository.xml file.

If you're ignorant like me, then you are tempted to do a cut 
and past copy job from the first stanza to the second. 

DO NOT DO THIS!

From personal experience, I can tell you that if you 
reference ${wsp.home} in the stanza of XML that is used for 
versioning,  your repository will not boot. It's a bad thing. 

I've just gotten this working this morning, and I've not done 
any kind of load testing or substantive development. 

I have however booted sling, and connected to it using WebDAV


Re: Oracle and Sling

Posted by Alexander Klimetschek <ak...@day.com>.
Hi,

nice to hear that you got it working!

On Tue, Jun 29, 2010 at 18:15, Tony Giaccone <tg...@masslight.net> wrote:
> Second you need to change the PersistenceManager to
> use the Oracle persistence manager. You should be aware
> that there are two different Oracle Persistence managers in Jackrabbit.
>
> org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager (Oracle 10 or newer)
>
> org.apache.jackrabbit.core.persistence.bundle.Oracle9PersistenceManager (Oracle 9)

The "bundle persistence managers" are preferred and more "modern", as
they perform better.

> Which you use is Oracle Version specific, and also please be
>  aware there are other versions of the OraclePersistenceManager.
>
>
> org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager
> org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager

These are legacy pms.

See also http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ

> As an aside, the PersistenceManager is mentioned twice
> in the repository.xml file.

One is the template for actual workspaces, the other one is the
global, pseudo-workspace for jcr versioning.

> If you're ignorant like me, then you are tempted to do a cut
> and past copy job from the first stanza to the second.
>
> DO NOT DO THIS!
>
> From personal experience, I can tell you that if you
> reference ${wsp.home} in the stanza of XML that is used for
> versioning,  your repository will not boot. It's a bad thing.

The <Workspace/> element inside the repository.xml is just a template
for the workspace.xml that will be created and then used for each
workspace. See http://jackrabbit.apache.org/jackrabbit-configuration.html

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com