From: <vga...@us...> - 2010-04-29 19:03:14
|
Revision: 695 http://treebase.svn.sourceforge.net/treebase/?rev=695&view=rev Author: vgapeyev Date: 2010-04-29 19:03:07 +0000 (Thu, 29 Apr 2010) Log Message: ----------- Making sure that jdbc.properties is not referenced by the web application. (We do not have jdbc.properties in svn anymore, but there still was one reference to it, which prevented a clean (svn co; mvn package) build) Modified Paths: -------------- trunk/treebase-core/src/main/resources/applicationContext-dao.xml trunk/treebase-core/src/main/resources/applicationContext-db-standalone.xml trunk/treebase-core/src/main/resources/applicationContext-db-webapp.xml trunk/treebase-core/src/main/resources/jdbc.properties.example trunk/treebase-core/src/main/resources/treebase.properties Modified: trunk/treebase-core/src/main/resources/applicationContext-dao.xml =================================================================== --- trunk/treebase-core/src/main/resources/applicationContext-dao.xml 2010-04-24 15:01:14 UTC (rev 694) +++ trunk/treebase-core/src/main/resources/applicationContext-dao.xml 2010-04-29 19:03:07 UTC (rev 695) @@ -11,6 +11,8 @@ +<!-- VG 2010-01-11, 1010-04-29 instead, see applicationContext-db-webapp.xml and applicationContext-db-standalone.xml + <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="ignoreUnresolvablePlaceholders" value="true" /> @@ -22,8 +24,6 @@ </property> </bean> - -<!-- VG 2010-01-11 instead, see applicationContext-db-webapp.xml and applicationContext-db-standalone.xml <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass" value="${jdbc.driverClassName}" /> <property name="jdbcUrl" value="${jdbc.url}" /> Modified: trunk/treebase-core/src/main/resources/applicationContext-db-standalone.xml =================================================================== --- trunk/treebase-core/src/main/resources/applicationContext-db-standalone.xml 2010-04-24 15:01:14 UTC (rev 694) +++ trunk/treebase-core/src/main/resources/applicationContext-db-standalone.xml 2010-04-29 19:03:07 UTC (rev 695) @@ -9,6 +9,18 @@ http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd" default-autowire="no"> + + <bean id="propertyConfigurer" + class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="ignoreUnresolvablePlaceholders" value="true" /> + <property name="locations"> + <list> + <value>classpath:jdbc.properties</value> + <value>classpath:treebase.properties</value> + </list> + </property> + </bean> + <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass" value="${jdbc.driverClassName}" /> <property name="jdbcUrl" value="${jdbc.url}" /> Modified: trunk/treebase-core/src/main/resources/applicationContext-db-webapp.xml =================================================================== --- trunk/treebase-core/src/main/resources/applicationContext-db-webapp.xml 2010-04-24 15:01:14 UTC (rev 694) +++ trunk/treebase-core/src/main/resources/applicationContext-db-webapp.xml 2010-04-29 19:03:07 UTC (rev 695) @@ -9,6 +9,17 @@ http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd" default-autowire="no"> + + <bean id="propertyConfigurer" + class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="ignoreUnresolvablePlaceholders" value="true" /> + <property name="locations"> + <list> + <value>classpath:treebase.properties</value> + </list> + </property> + </bean> + <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="java:comp/env/jdbc/TreebaseDB"/> </bean> Modified: trunk/treebase-core/src/main/resources/jdbc.properties.example =================================================================== --- trunk/treebase-core/src/main/resources/jdbc.properties.example 2010-04-24 15:01:14 UTC (rev 694) +++ trunk/treebase-core/src/main/resources/jdbc.properties.example 2010-04-29 19:03:07 UTC (rev 695) @@ -1,21 +1,10 @@ -# This tells our object-relational mapping libraries -# to use postgres-specific SQL dialect -hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +# If needed, copy this to jdbc.properties and supply appropriate values. -# for development only: -hibernate.show_sql=false -hibernate.format_sql=true -hibernate.generate_statistics=false +# As of 2010-04-29, jdbc.properties should only contain counterparts of JNDI parameters +# specified in /treebase-web/src/main/webapp/META-INF/context.xml or in the Tomcat installation. +# jdbc.properties is not read by the web application; it is only used by locally-run tools +# such as unit tests, data importers (in cipres.teebase.util) and data checkers. -# options are: validate | update | create | create-drop -hibernate.hbm2ddl.auto= - - -#### VG 2010-02-07 Properties below are not read by the webapp anymore. -#### Instead, equivalent resources are looked up through JNDI -- see /treebase-web/src/main/webapp/META-INF/context.xml -#### These properties are only read by tests and, possibly, by data importing classes in cipres.teebase.util -#### (see treebase-core/src/main/java/org/cipres/treebase/core/CoreServiceLauncher.java) - jdbc.driverClassName=org.postgresql.Driver # Login credentials, obtain the actual values from Modified: trunk/treebase-core/src/main/resources/treebase.properties =================================================================== --- trunk/treebase-core/src/main/resources/treebase.properties 2010-04-24 15:01:14 UTC (rev 694) +++ trunk/treebase-core/src/main/resources/treebase.properties 2010-04-29 19:03:07 UTC (rev 695) @@ -1,2 +1,26 @@ #options are: NexusServiceMesquite | NexusServiceNCL nexus.parser.impl=NexusServiceMesquite + +######################################################################## +### Prior to 2010-04-29, these were in jdbc.properties, +### which now contains only properties not used by the web app +### and is not read by the web app. +### In case the below properties are not used by the web app either +### (I don't know --VG), they should be moved back to jdbc.properties. +######################################################################## + +# This tells our object-relational mapping libraries +# to use postgres-specific SQL dialect +hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect + +# for development only: +hibernate.show_sql=false +hibernate.format_sql=true +hibernate.generate_statistics=false + +# options are: validate | update | create | create-drop +hibernate.hbm2ddl.auto= + +######################################################################## +### end old jdbc.properties +######################################################################## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |