From: <jos...@us...> - 2009-08-12 13:18:48
|
Revision: 4879 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=4879&view=rev Author: josegar74 Date: 2009-08-12 13:18:35 +0000 (Wed, 12 Aug 2009) Log Message: ----------- Config files Added Paths: ----------- sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/applicationContext-gn-web-gaap.xml sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.h2 sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.mysql sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.postgres sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/log4j.properties Added: sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/applicationContext-gn-web-gaap.xml =================================================================== --- sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/applicationContext-gn-web-gaap.xml (rev 0) +++ sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/applicationContext-gn-web-gaap.xml 2009-08-12 13:18:35 UTC (rev 4879) @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" + xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd + http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> + + <!-- ========================= RESOURCE DEFINITIONS ========================= --> + + <!-- Configurer that replaces ${...} placeholders with values from a properties file --> + <!-- (in this case, JDBC-related settings for the dataSource definition below) --> + <context:property-placeholder location="classpath:jdbc.properties" /> + <!-- + Uses Apache Commons DBCP for connection pooling. See Commons DBCP documentation for the required JAR files. + Alternatively you can use another connection pool such as C3P0, similarly configured using Spring. + --> + <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" p:driverClassName="${jdbc.driverClassName}" + p:url="${jdbc.url}" p:username="${jdbc.username}" p:password="${jdbc.password}" /> + + <!-- Hibernate SessionFactory --> + <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" p:dataSource-ref="dataSource"> + <property name="hibernateProperties"> + <map> + <entry key="hibernate.hbm2ddl.auto" value="${hibernateHbm2ddlAuto}" /> + <entry key="hibernate.dialect" value="${hibernate.dialect}" /> + <entry key="hibernate.show_sql" value="${hibernate.show_sql}" /> + <entry key="hibernate.generate_statistics" value="${hibernate.generate_statistics}" /> + <entry key="hibernate.search.default.directory_provider" value="${hibernate.search.default.directory_provider}" /> + <entry key="hibernate.search.default.indexBase" value="${hibernate.search.default.indexBase}" /> + </map> + </property> + <property name="mappingResources"> + <value> + org/geonetwork/gaap/domain/group/Group.hbm.xml, + org/geonetwork/gaap/domain/operation/Operation.hbm.xml, + org/geonetwork/gaap/domain/operation/Permission.hbm.xml, + org/geonetwork/gaap/domain/user/User.hbm.xml + </value> + </property> + <property name="eventListeners"> + <map> + <entry key="merge"> + <bean class="org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener" /> + </entry> + <entry key="post-insert"> + <bean class="org.hibernate.search.event.FullTextIndexEventListener" /> + </entry> + <entry key="post-update"> + <bean class="org.hibernate.search.event.FullTextIndexEventListener" /> + </entry> + <entry key="post-delete"> + <bean class="org.hibernate.search.event.FullTextIndexEventListener" /> + </entry> + <entry key="post-collection-recreate"> + <bean class="org.hibernate.search.event.FullTextIndexCollectionEventListener" /> + </entry> + <entry key="post-collection-remove"> + <bean class="org.hibernate.search.event.FullTextIndexCollectionEventListener" /> + </entry> + <entry key="post-collection-update"> + <bean class="org.hibernate.search.event.FullTextIndexCollectionEventListener" /> + </entry> + </map> + </property> + </bean> + + + + <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) --> + <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager" + p:sessionFactory-ref="sessionFactory" /> + + + + <!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= --> + <!-- + Activates various annotations to be detected in bean classes: Spring's @Required and @Autowired, as well as JSR 250's + @Resource. + --> + <context:annotation-config /> + + <!-- + Instruct Spring to perform declarative transaction management automatically on annotated classes. Erik: currently no + interfaces are used for the Dao layer. Therefore the target class needs to be proxied. + --> + <tx:annotation-driven proxy-target-class="true" /> + + <!-- + Exporter that exposes the Hibernate statistics service via JMX. Autodetects the service MBean, using its bean name as + JMX object name. + --> + <context:mbean-export /> + + <!-- Config for web services --> +</beans> \ No newline at end of file Added: sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties =================================================================== --- sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties (rev 0) +++ sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties 2009-08-12 13:18:35 UTC (rev 4879) @@ -0,0 +1,28 @@ +# Connection properties for the h2 database +hibernate.dialect=org.hibernate.dialect.HSQLDialect +jdbc.driverClassName=org.hsqldb.jdbcDriver +jdbc.url=jdbc:hsqldb:mem:geonetwork-gaap-test +jdbc.username=sa +jdbc.password= + + +# While testing, use "create-drop" instead of "update" +# In production use update not to loose your data! +hibernateHbm2ddlAuto=update + +# If you want to see hibernate statistics, set this to true. For performance set this to false +hibernate.generate_statistics=true + +# If you want to see SQL logs, set this to true. For performance set this to false +hibernate.show_sql=false + +# For testing purposes you can use the in memory indexes. +# Uncomment the following line and comment the ones related to the File System below +#hibernate.search.default.directory_provider=org.hibernate.search.store.RAMDirectoryProvider + +# In production use, use the File System instead: +# You can configure the Lucene indexes directory to an absolute path instead of a relative one +# the location of the relative directory is relative to the directory your application starts from +# for the embedded Jetty that is inside the jetty directory +hibernate.search.default.directory_provider=org.hibernate.search.store.FSDirectoryProvider +hibernate.search.default.indexBase=C:/tmp/gaap Added: sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.h2 =================================================================== --- sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.h2 (rev 0) +++ sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.h2 2009-08-12 13:18:35 UTC (rev 4879) @@ -0,0 +1,28 @@ +# Connection properties for the h2 database +hibernate.dialect=org.hibernate.dialect.H2Dialect +jdbc.driverClassName=org.h2.Driver +jdbc.url=jdbc:h2:tcp://localhost/geonetwork-gaap +jdbc.username=sa +jdbc.password= + + +# While testing, use "create-drop" instead of "update" +# In production use update not to loose your data! +hibernateHbm2ddlAuto=update + +# If you want to see hibernate statistics, set this to true. For performance set this to false +hibernate.generate_statistics=true + +# If you want to see SQL logs, set this to true. For performance set this to false +hibernate.show_sql=false + +# For testing purposes you can use the in memory indexes. +# Uncomment the following line and comment the ones related to the File System below +#hibernate.search.default.directory_provider=org.hibernate.search.store.RAMDirectoryProvider + +# In production use, use the File System instead: +# You can configure the Lucene indexes directory to an absolute path instead of a relative one +# the location of the relative directory is relative to the directory your application starts from +# for the embedded Jetty that is inside the jetty directory +hibernate.search.default.directory_provider=org.hibernate.search.store.FSDirectoryProvider +hibernate.search.default.indexBase=C:/tmp/gaap Added: sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.mysql =================================================================== --- sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.mysql (rev 0) +++ sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.mysql 2009-08-12 13:18:35 UTC (rev 4879) @@ -0,0 +1,28 @@ +# Connection properties for the h2 database +hibernate.dialect=org.hibernate.dialect.MySQLDialect +jdbc.driverClassName=com.mysql.jdbc.Driver +jdbc.url=jdbc:mysql://localhost/geonetwork-gaap +jdbc.username=root +jdbc.password=root + + +# While testing, use "create-drop" instead of "update" +# In production use update not to loose your data! +hibernateHbm2ddlAuto=update + +# If you want to see hibernate statistics, set this to true. For performance set this to false +hibernate.generate_statistics=true + +# If you want to see SQL logs, set this to true. For performance set this to false +hibernate.show_sql=false + +# For testing purposes you can use the in memory indexes. +# Uncomment the following line and comment the ones related to the File System below +#hibernate.search.default.directory_provider=org.hibernate.search.store.RAMDirectoryProvider + +# In production use, use the File System instead: +# You can configure the Lucene indexes directory to an absolute path instead of a relative one +# the location of the relative directory is relative to the directory your application starts from +# for the embedded Jetty that is inside the jetty directory +hibernate.search.default.directory_provider=org.hibernate.search.store.FSDirectoryProvider +hibernate.search.default.indexBase=C:/tmp/gaap Added: sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.postgres =================================================================== --- sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.postgres (rev 0) +++ sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/jdbc.properties.postgres 2009-08-12 13:18:35 UTC (rev 4879) @@ -0,0 +1,28 @@ +# Connection properties for the h2 database +hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +jdbc.driverClassName=org.postgresql.Driver +jdbc.url=jdbc:postgresql://localhost/geonetwork-gaap +jdbc.username=gaap +jdbc.password=gaap + + +# While testing, use "create-drop" instead of "update" +# In production use update not to loose your data! +hibernateHbm2ddlAuto=update + +# If you want to see hibernate statistics, set this to true. For performance set this to false +hibernate.generate_statistics=true + +# If you want to see SQL logs, set this to true. For performance set this to false +hibernate.show_sql=false + +# For testing purposes you can use the in memory indexes. +# Uncomment the following line and comment the ones related to the File System below +#hibernate.search.default.directory_provider=org.hibernate.search.store.RAMDirectoryProvider + +# In production use, use the File System instead: +# You can configure the Lucene indexes directory to an absolute path instead of a relative one +# the location of the relative directory is relative to the directory your application starts from +# for the embedded Jetty that is inside the jetty directory +hibernate.search.default.directory_provider=org.hibernate.search.store.FSDirectoryProvider +hibernate.search.default.indexBase=C:/tmp/gaap Added: sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/log4j.properties =================================================================== --- sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/log4j.properties (rev 0) +++ sandbox/3.0.x/geonetwork-gaap/geonetwork-gaap-web/src/main/resources/log4j.properties 2009-08-12 13:18:35 UTC (rev 4879) @@ -0,0 +1,16 @@ +#LOGGER (levels are ALL, TRACE, DEBUG, INFO, WARN, ERROR and FATAL) +log4j.rootCategory=TRACE, APPENDER_OUT, APPENDER_FILE +log4j.logger.org.geonetwork=TRACE + + +#APPENDER_OUT +log4j.appender.APPENDER_OUT=org.apache.log4j.ConsoleAppender +log4j.appender.APPENDER_OUT.layout=org.apache.log4j.PatternLayout +log4j.appender.APPENDER_OUT.layout.ConversionPattern=%d{ISO8601} | %t | %-5p | %-20C{1} | %-15M | %3L | %m %n + +#APPENDER_FILE +log4j.appender.APPENDER_FILE=org.apache.log4j.DailyRollingFileAppender +log4j.appender.APPENDER_FILE.File=geonetwork-web-gaap-log.html +log4j.appender.APPENDER_FILE.DatePattern=.yyyyMMdd +log4j.appender.APPENDER_FILE.layout=org.apache.log4j.HTMLLayout + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |