From 08603326c92bd6d65fb1619064f21d4054f2604c Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Fri, 29 Jun 2012 16:31:52 -0700 Subject: [PATCH] CSPACE-5340: Removed all hard coded references to "localhost" from our setting and config files. --- 3rdparty/nuxeo/build.xml | 3 ++- .../5.5/config/default-repo-config.xml | 1 + .../main/resources/META-INF/persistence.xml | 19 +------------------ .../src/main/webapp/META-INF/context.xml | 4 ++-- .../test/resources/META-INF/persistence.xml | 2 +- .../test/resources/META-INF/persistence.xml | 2 +- .../test/resources/META-INF/persistence.xml | 2 +- .../test/resources/META-INF/persistence.xml | 2 +- .../test/resources/META-INF/persistence.xml | 2 +- .../main/resources/META-INF/persistence.xml | 2 +- .../src/main/resources/log4j.properties | 1 + .../test/resources/META-INF/persistence.xml | 2 +- .../applicationContext-authorization.xml | 11 +---------- .../common/storage/jpa/JpaStorageUtils.java | 2 +- .../test/resources/META-INF/persistence.xml | 2 +- 15 files changed, 17 insertions(+), 40 deletions(-) diff --git a/3rdparty/nuxeo/build.xml b/3rdparty/nuxeo/build.xml index e29826f69..3e5b9ac6f 100644 --- a/3rdparty/nuxeo/build.xml +++ b/3rdparty/nuxeo/build.xml @@ -122,7 +122,8 @@ - + + diff --git a/3rdparty/nuxeo/nuxeo-server/5.5/config/default-repo-config.xml b/3rdparty/nuxeo/nuxeo-server/5.5/config/default-repo-config.xml index 82eaf4c3c..2c1b6d4b4 100644 --- a/3rdparty/nuxeo/nuxeo-server/5.5/config/default-repo-config.xml +++ b/3rdparty/nuxeo/nuxeo-server/5.5/config/default-repo-config.xml @@ -10,6 +10,7 @@ @XA_DATASOURCE@ @DB_URL@ + @DB_SERVER_HOSTNAME@ nuxeo @NUXEO_USER@ @NUXEO_PW@ diff --git a/services/JaxRsServiceProvider/src/main/resources/META-INF/persistence.xml b/services/JaxRsServiceProvider/src/main/resources/META-INF/persistence.xml index d454ed04b..f53667570 100644 --- a/services/JaxRsServiceProvider/src/main/resources/META-INF/persistence.xml +++ b/services/JaxRsServiceProvider/src/main/resources/META-INF/persistence.xml @@ -17,23 +17,6 @@ org.collectionspace.services.authorization.Role org.collectionspace.services.authorization.AccountRoleRel - - - - - - @@ -41,7 +24,7 @@ - + diff --git a/services/JaxRsServiceProvider/src/main/webapp/META-INF/context.xml b/services/JaxRsServiceProvider/src/main/webapp/META-INF/context.xml index 56226e29a..de1031dcb 100644 --- a/services/JaxRsServiceProvider/src/main/webapp/META-INF/context.xml +++ b/services/JaxRsServiceProvider/src/main/webapp/META-INF/context.xml @@ -75,7 +75,7 @@ username="${db.user}" password="${db.user.password}" driverClassName="${db.jdbc.driver.class}" - url="jdbc:${db}://localhost:${db.port}/cspace" + url="jdbc:${db}://${db.host}:${db.port}/cspace" maxActive="8" maxIdle="4"/> @@ -85,7 +85,7 @@ username="${db.user}" password="${db.user.password}" driverClassName="${db.jdbc.driver.class}" - url="jdbc:${db}://localhost:${db.port}/nuxeo" + url="jdbc:${db}://${db.host}:${db.port}/nuxeo" maxActive="8" maxIdle="4"/> diff --git a/services/account/client/src/test/resources/META-INF/persistence.xml b/services/account/client/src/test/resources/META-INF/persistence.xml index 0b6711432..8c4188508 100644 --- a/services/account/client/src/test/resources/META-INF/persistence.xml +++ b/services/account/client/src/test/resources/META-INF/persistence.xml @@ -16,7 +16,7 @@ - + diff --git a/services/account/pstore/src/test/resources/META-INF/persistence.xml b/services/account/pstore/src/test/resources/META-INF/persistence.xml index f332caa05..f6e45ccfe 100644 --- a/services/account/pstore/src/test/resources/META-INF/persistence.xml +++ b/services/account/pstore/src/test/resources/META-INF/persistence.xml @@ -14,7 +14,7 @@ - + diff --git a/services/authentication/client/src/test/resources/META-INF/persistence.xml b/services/authentication/client/src/test/resources/META-INF/persistence.xml index 97d00a01d..61ab30d52 100644 --- a/services/authentication/client/src/test/resources/META-INF/persistence.xml +++ b/services/authentication/client/src/test/resources/META-INF/persistence.xml @@ -13,7 +13,7 @@ http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistenc - + diff --git a/services/authentication/jaxb/src/test/resources/META-INF/persistence.xml b/services/authentication/jaxb/src/test/resources/META-INF/persistence.xml index c46723c6b..a9564d02d 100644 --- a/services/authentication/jaxb/src/test/resources/META-INF/persistence.xml +++ b/services/authentication/jaxb/src/test/resources/META-INF/persistence.xml @@ -11,7 +11,7 @@ http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistenc - + diff --git a/services/authentication/pstore/src/test/resources/META-INF/persistence.xml b/services/authentication/pstore/src/test/resources/META-INF/persistence.xml index 05b2b43df..59673d1db 100644 --- a/services/authentication/pstore/src/test/resources/META-INF/persistence.xml +++ b/services/authentication/pstore/src/test/resources/META-INF/persistence.xml @@ -11,7 +11,7 @@ http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistenc - + diff --git a/services/authorization-mgt/import/src/main/resources/META-INF/persistence.xml b/services/authorization-mgt/import/src/main/resources/META-INF/persistence.xml index 911f05335..52fe747e8 100644 --- a/services/authorization-mgt/import/src/main/resources/META-INF/persistence.xml +++ b/services/authorization-mgt/import/src/main/resources/META-INF/persistence.xml @@ -15,7 +15,7 @@ - + diff --git a/services/authorization-mgt/import/src/main/resources/log4j.properties b/services/authorization-mgt/import/src/main/resources/log4j.properties index 7eab9d9f1..b24525085 100644 --- a/services/authorization-mgt/import/src/main/resources/log4j.properties +++ b/services/authorization-mgt/import/src/main/resources/log4j.properties @@ -28,3 +28,4 @@ log4j.logger.org.hibernate.cfg=WARN log4j.logger.org.springframework=INFO log4j.logger.ch.elca.el4j.services.xmlmerge=INFO log4j.logger.com.sun.xml.bind.v2.runtime=DEBUG +log4j.logger.javax.persistence.PersistenceException=TRACE diff --git a/services/authorization/pstore/src/test/resources/META-INF/persistence.xml b/services/authorization/pstore/src/test/resources/META-INF/persistence.xml index ec517f79d..8fcff4b37 100644 --- a/services/authorization/pstore/src/test/resources/META-INF/persistence.xml +++ b/services/authorization/pstore/src/test/resources/META-INF/persistence.xml @@ -15,7 +15,7 @@ - + diff --git a/services/authorization/service/src/main/resources/applicationContext-authorization.xml b/services/authorization/service/src/main/resources/applicationContext-authorization.xml index dac9c386e..816f5b6f7 100644 --- a/services/authorization/service/src/main/resources/applicationContext-authorization.xml +++ b/services/authorization/service/src/main/resources/applicationContext-authorization.xml @@ -41,18 +41,9 @@ --> - - - + diff --git a/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageUtils.java b/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageUtils.java index 9013358da..b15f910c7 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageUtils.java +++ b/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageUtils.java @@ -566,7 +566,7 @@ public class JpaStorageUtils { if (result == null && !persistenceUnit.equalsIgnoreCase(CS_AUTHZ_PERSISTENCE_UNIT)) try { result = Persistence.createEntityManagerFactory(CS_AUTHZ_PERSISTENCE_UNIT); } catch (javax.persistence.PersistenceException e) { - logger.warn("Could not find a persistence unit for: " + CS_AUTHZ_PERSISTENCE_UNIT); + logger.warn("Problem with the persistence unit for: " + CS_AUTHZ_PERSISTENCE_UNIT, e); } return result; diff --git a/services/security/client/src/test/resources/META-INF/persistence.xml b/services/security/client/src/test/resources/META-INF/persistence.xml index 97d00a01d..61ab30d52 100644 --- a/services/security/client/src/test/resources/META-INF/persistence.xml +++ b/services/security/client/src/test/resources/META-INF/persistence.xml @@ -13,7 +13,7 @@ http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistenc - + -- 2.47.3