jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graeme Steyn (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-2664) OraclePersistenceManager does not work with JNDI resource
Date Sat, 19 Jun 2010 00:58:23 GMT

     [ https://issues.apache.org/jira/browse/JCR-2664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Graeme Steyn updated JCR-2664:
------------------------------

    Attachment: OraclePersistenceManager.patch

Patch file.

> OraclePersistenceManager does not work with JNDI resource
> ---------------------------------------------------------
>
>                 Key: JCR-2664
>                 URL: https://issues.apache.org/jira/browse/JCR-2664
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.6.1, 1.6.2, 2.1.0
>         Environment: Oracle 11g Rel1, SpringSource tc Server 2.0.0.SR01, JDK 1.6.0 Update
20, LIferay 5.2 EE SP4, Jackrabbit 1.6.1.
>            Reporter: Graeme Steyn
>         Attachments: OraclePersistenceManager.patch
>
>
> The OraclePersistenceManager will not work correctly with a JNDI resource due to the
default values provided in the constructor. I noticed this problem when configuring LIferay
5.2 EE SP4 (which uses jackrabbit-core.jar v 1.6.1).  This problem has been touched on in
different areas in JCR-1703.
> Patch:
> Index: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
> ===================================================================
> --- jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
(revision 956161)
> +++ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
(working copy)
> @@ -107,8 +107,6 @@
>          schema = "oracle";
>          driver = "oracle.jdbc.OracleDriver";
>          schemaObjectPrefix = "";
> -        user = "";
> -        password = "";
>          initialized = false;
>      }
>  
> The patch attached basically allows the following configuration in repository.xml to
work correctly.
> <?xml version="1.0"?>
> <Repository> 
>  
>     <!--
>     Database File System (Cluster Configuration)
>  
>     This is sample configuration for mysql persistence that can be used for
>     clustering Jackrabbit. For other databases, change the connection,
>     credentials, and schema settings.
>     --> 
>  
>     <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem"> 
>         <param name="driver" value="javax.naming.InitialContext"/> 
>         <param name="url" value="java:comp/env/jdbc/LiferayPool"/>
>         <param name="schemaObjectPrefix" value="J_R_FS_"/> 
>     </FileSystem> 
>     <Security appName="Jackrabbit"> 
>         <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager"
/> 
>         <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">

>         <param name="anonymousId" value="anonymous" /> 
>         </LoginModule> 
>     </Security> 
>     <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="liferay" />

>     <Workspace name="${wsp.name}"> 
>         <!-- 
>         Database File System and Persistence (Cluster Configuration)
>         This is sample configuration for mysql persistence that can be used for
>         clustering Jackrabbit. For other databases, change the  connection,
>         credentials, and schema settings.
>         --> 
>         <PersistenceManager class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">

>             <param name="driver" value="javax.naming.InitialContext" /> 
>             <param name="url" value="java:comp/env/jdbc/LiferayPool"/>
>             <param name="schemaObjectPrefix" value="J_PM_${wsp.name}_" /> 
>             <param name="schema" value="oracle"/>
>             <param name="externalBLOBs" value="false" /> 
>         </PersistenceManager> 
>         <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">

>             <param name="driver" value="javax.naming.InitialContext"/> 
>             <param name="url" value="java:comp/env/jdbc/LiferayPool"/>
>             <param name="schemaObjectPrefix" value="J_FS_${wsp.name}_"/> 
>         </FileSystem> 
>     </Workspace> 
>     <Versioning rootPath="${rep.home}/version"> 
>         <!--
>         Database File System and Persistence (Cluster Configuration)
>         This is sample configuration for mysql persistence that can be used for
>         clustering Jackrabbit. For other databases, change the connection,
>         credentials, and schema settings.
>         --> 
>         <FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">

>             <param name="driver" value="javax.naming.InitialContext"/> 
>             <param name="url" value="java:comp/env/jdbc/LiferayPool"/>
>             <param name="schemaObjectPrefix" value="J_V_FS_"/> 
>         </FileSystem> 
>         <PersistenceManager class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">

>             <param name="driver" value="javax.naming.InitialContext" /> 
>             <param name="url" value="java:comp/env/jdbc/LiferayPool"/>
>             <param name="schemaObjectPrefix" value="J_V_PM_" /> 
>             <param name="schema" value="oracle"/>
>             <param name="externalBLOBs" value="false" /> 
>         </PersistenceManager> 
>     </Versioning> 
>     <!--
>     Cluster Configuration
>     This is sample configuration for mysql persistence that can be used for
>     clustering Jackrabbit. For other databases, change the  connection,
>     credentials, and schema settings.
>     --> 
>     <Cluster id="node1" syncDelay="5"> 
>         <Journal class="org.apache.jackrabbit.core.journal.OracleDatabaseJournal">

>             <param name="revision" value="${rep.home}/revision.log" /> 
>             <param name="driver" value="javax.naming.InitialContext" /> 
>             <param name="url" value="java:comp/env/jdbc/LiferayPool"/>
>             <param name="databaseType" value="oracle"/>
>         </Journal> 
>     </Cluster> 
> </Repository> 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message