svn commit: r1144287 - /ofbiz/branches/jackrabbit20100709/framework/jcr/src/org/ofbiz/jcr/JCRContainer.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1144287 - /ofbiz/branches/jackrabbit20100709/framework/jcr/src/org/ofbiz/jcr/JCRContainer.java

sascharodekamp
Author: sascharodekamp
Date: Fri Jul  8 12:27:27 2011
New Revision: 1144287

URL: http://svn.apache.org/viewvc?rev=1144287&view=rev
Log:
FIX - Fix a small issue with the JNDI registration

Modified:
    ofbiz/branches/jackrabbit20100709/framework/jcr/src/org/ofbiz/jcr/JCRContainer.java

Modified: ofbiz/branches/jackrabbit20100709/framework/jcr/src/org/ofbiz/jcr/JCRContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/jcr/src/org/ofbiz/jcr/JCRContainer.java?rev=1144287&r1=1144286&r2=1144287&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/jcr/src/org/ofbiz/jcr/JCRContainer.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/jcr/src/org/ofbiz/jcr/JCRContainer.java Fri Jul  8 12:27:27 2011
@@ -19,7 +19,6 @@
 package org.ofbiz.jcr;
 
 import javax.jcr.RepositoryException;
-import javax.jcr.RepositoryFactory;
 import javax.naming.Context;
 import javax.naming.NamingException;
 import javax.naming.Reference;
@@ -88,6 +87,7 @@ public class JCRContainer implements Con
             throw new ContainerException("No jcr configuration found in file " + configFilePath);
         }
 
+        homeDir = UtilXml.childElementAttribute(configRootElement, "home-dir", "path", "runtime/data/jcr/");
         Element childElement = UtilXml.firstChildElement(configRootElement, "jcr-context");
         jcrContextName = UtilXml.elementAttribute(childElement, "name", "default");
 
@@ -95,7 +95,6 @@ public class JCRContainer implements Con
         for (Element curElement : UtilXml.childElementList(configRootElement, "jcr")) {
             if (jcrContextName.equals(curElement.getAttribute("name"))) {
                 factoryClassName = curElement.getAttribute("class");
-                homeDir = curElement.getAttribute("home-dir");
                 jndiName = curElement.getAttribute("jndi-name");
                 break;
             }
@@ -182,7 +181,7 @@ public class JCRContainer implements Con
     protected void bindRepository() {
         if (this.jndiContext != null) {
             try {
-                Reference ref = new Reference(Repository.class.getName(), RepositoryFactory.class.getName(), null);
+                Reference ref = new Reference(Repository.class.getName(), org.ofbiz.jcr.RepositoryFactory.class.getName(), null);
                 ref.add(new StringRefAddr(REP_HOME_DIR, homeDir));
                 ref.add(new StringRefAddr(CONFIG_FILE_PATH, configFilePath));
                 this.jndiContext.bind(jndiName, ref);