You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by m k <mk...@gmail.com> on 2008/01/10 16:20:19 UTC

Oracle repository with dynamic user/pwd

Hey All,
  I'm using the OracleFileSystem and OraclePersistenceManager to configure
Jackrabbit to connect to an Oracle database.  The issue I'm having is that
when writing the repository.xml for this I cannot successfully connect
without hard coding the user and password into the file.  I'd like to make
that a bit more dynamic as my component could be connecting to a variety of
Oracle databases and the user/password will vary.  I saw documentation on
how to move that information out to a server.xml[1] if my application is
running on Tomcat.  However my component won't always be running in that
manner.

I could write logic to do my own variable substitution but I was wondering
if there was another alternative to putting that information in an external
location and Jackrabbit picking it up.  Or if there is a way of
programatically specifying it.

Thanks for your help,
Micah

[1] -http://wiki.apache.org/jackrabbit/JackRabbitOnTomcat
[2] - http://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.2.0/

Re: Oracle repository with dynamic user/pwd

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Micah,

please see recent jira issue that was resolved for 1.4:
https://issues.apache.org/jira/browse/JCR-1304

regards
  marcel

m k wrote:
> Hey All,
>   I'm using the OracleFileSystem and OraclePersistenceManager to configure
> Jackrabbit to connect to an Oracle database.  The issue I'm having is that
> when writing the repository.xml for this I cannot successfully connect
> without hard coding the user and password into the file.  I'd like to make
> that a bit more dynamic as my component could be connecting to a variety of
> Oracle databases and the user/password will vary.  I saw documentation on
> how to move that information out to a server.xml[1] if my application is
> running on Tomcat.  However my component won't always be running in that
> manner.
> 
> I could write logic to do my own variable substitution but I was wondering
> if there was another alternative to putting that information in an external
> location and Jackrabbit picking it up.  Or if there is a way of
> programatically specifying it.
> 
> Thanks for your help,
> Micah
> 
> [1] -http://wiki.apache.org/jackrabbit/JackRabbitOnTomcat
> [2] - http://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.2.0/
> 


RE: Oracle repository with dynamic user/pwd

Posted by ni...@planet.nl.
It wasn't a jira issue, but by design. Afterwards, we also don't use it anymore in favor of JNDI to supply the database connection.

I will send you the patch.

With regards,

Nick Stolwijk


-----Original Message-----
From: m k [mailto:mkwhitacre@gmail.com]
Sent: Thu 1/10/2008 4:45 PM
To: users@jackrabbit.apache.org
Subject: Re: Oracle repository with dynamic user/pwd
 
I'd be interested to see the JIRA issue you supplied the patch for.

Out of curiosity did the system parameters only work for workspace
configuration or any parts of the repository.xml file?  I'm using the
OracleFileSystem/OraclePersistenceManager for the repository and versioning
system as well.

Micah

On Jan 10, 2008 9:26 AM, <ni...@planet.nl> wrote:

> A while ago I had patched the code to include all the system parameters
> for resolving. So each -D key=value pair works in the workspace
> configuration. If you are interested I can look it up.
>
> Hth,
>
> Nick Stolwijk
>
>
> -----Original Message-----
> From: m k [mailto:mkwhitacre@gmail.com]
> Sent: Thu 1/10/2008 4:20 PM
> To: users@jackrabbit.apache.org
> Subject: Oracle repository with dynamic user/pwd
>
> Hey All,
>  I'm using the OracleFileSystem and OraclePersistenceManager to configure
> Jackrabbit to connect to an Oracle database.  The issue I'm having is that
> when writing the repository.xml for this I cannot successfully connect
> without hard coding the user and password into the file.  I'd like to make
> that a bit more dynamic as my component could be connecting to a variety
> of
> Oracle databases and the user/password will vary.  I saw documentation on
> how to move that information out to a server.xml[1] if my application is
> running on Tomcat.  However my component won't always be running in that
> manner.
>
> I could write logic to do my own variable substitution but I was wondering
> if there was another alternative to putting that information in an
> external
> location and Jackrabbit picking it up.  Or if there is a way of
> programatically specifying it.
>
> Thanks for your help,
> Micah
>
> [1] -http://wiki.apache.org/jackrabbit/JackRabbitOnTomcat
> [2] - http://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.2.0/
>
>


Re: Oracle repository with dynamic user/pwd

Posted by m k <mk...@gmail.com>.
I'd be interested to see the JIRA issue you supplied the patch for.

Out of curiosity did the system parameters only work for workspace
configuration or any parts of the repository.xml file?  I'm using the
OracleFileSystem/OraclePersistenceManager for the repository and versioning
system as well.

Micah

On Jan 10, 2008 9:26 AM, <ni...@planet.nl> wrote:

> A while ago I had patched the code to include all the system parameters
> for resolving. So each -D key=value pair works in the workspace
> configuration. If you are interested I can look it up.
>
> Hth,
>
> Nick Stolwijk
>
>
> -----Original Message-----
> From: m k [mailto:mkwhitacre@gmail.com]
> Sent: Thu 1/10/2008 4:20 PM
> To: users@jackrabbit.apache.org
> Subject: Oracle repository with dynamic user/pwd
>
> Hey All,
>  I'm using the OracleFileSystem and OraclePersistenceManager to configure
> Jackrabbit to connect to an Oracle database.  The issue I'm having is that
> when writing the repository.xml for this I cannot successfully connect
> without hard coding the user and password into the file.  I'd like to make
> that a bit more dynamic as my component could be connecting to a variety
> of
> Oracle databases and the user/password will vary.  I saw documentation on
> how to move that information out to a server.xml[1] if my application is
> running on Tomcat.  However my component won't always be running in that
> manner.
>
> I could write logic to do my own variable substitution but I was wondering
> if there was another alternative to putting that information in an
> external
> location and Jackrabbit picking it up.  Or if there is a way of
> programatically specifying it.
>
> Thanks for your help,
> Micah
>
> [1] -http://wiki.apache.org/jackrabbit/JackRabbitOnTomcat
> [2] - http://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.2.0/
>
>

RE: Oracle repository with dynamic user/pwd

Posted by ni...@planet.nl.
A while ago I had patched the code to include all the system parameters for resolving. So each -D key=value pair works in the workspace configuration. If you are interested I can look it up.

Hth,

Nick Stolwijk


-----Original Message-----
From: m k [mailto:mkwhitacre@gmail.com]
Sent: Thu 1/10/2008 4:20 PM
To: users@jackrabbit.apache.org
Subject: Oracle repository with dynamic user/pwd
 
Hey All,
  I'm using the OracleFileSystem and OraclePersistenceManager to configure
Jackrabbit to connect to an Oracle database.  The issue I'm having is that
when writing the repository.xml for this I cannot successfully connect
without hard coding the user and password into the file.  I'd like to make
that a bit more dynamic as my component could be connecting to a variety of
Oracle databases and the user/password will vary.  I saw documentation on
how to move that information out to a server.xml[1] if my application is
running on Tomcat.  However my component won't always be running in that
manner.

I could write logic to do my own variable substitution but I was wondering
if there was another alternative to putting that information in an external
location and Jackrabbit picking it up.  Or if there is a way of
programatically specifying it.

Thanks for your help,
Micah

[1] -http://wiki.apache.org/jackrabbit/JackRabbitOnTomcat
[2] - http://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.2.0/