[jboss-cvs] JBossAS SVN: r96792 - in projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources: hibernate and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Nov 24 01:39:32 EST 2009
Author: marius.bogoevici
Date: 2009-11-24 01:39:32 -0500 (Tue, 24 Nov 2009)
New Revision: 96792
Added:
projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/context.properties
projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.properties
projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/infrastructure.xml
Modified:
projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/dao-context.xml
projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.cfg.xml
Log:
Package renaming, adding some test infrastructure (last part) - committed in chunks b/c of conflicts ...
Added: projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/context.properties
===================================================================
--- projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/context.properties (rev 0)
+++ projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/context.properties 2009-11-24 06:39:32 UTC (rev 96792)
@@ -0,0 +1 @@
+hibernate.properties.location=classpath:/hibernate/hibernate.properties
Modified: projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/dao-context.xml
===================================================================
--- projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/dao-context.xml 2009-11-24 06:29:23 UTC (rev 96791)
+++ projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/dao-context.xml 2009-11-24 06:39:32 UTC (rev 96792)
@@ -2,11 +2,14 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:util="http://www.springframework.org/schema/util"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd">
@@ -14,9 +17,7 @@
<property name="dataSource" ref="stayFitDS"/>
<property name="configLocation" value="classpath:/hibernate/hibernate.cfg.xml"/>
<property name="hibernateProperties">
- <value>
- hibernate.hbm2ddl.auto=create-drop
- </value>
+ <util:properties location="${hibernate.properties.location}"/>
</property>
</bean>
@@ -42,8 +43,5 @@
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
- <jee:jndi-lookup jndi-name="java:/StayFitDS" id="stayFitDS"/>
- <tx:jta-transaction-manager/>
-
-</beans>
\ No newline at end of file
+</beans>
Modified: projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.cfg.xml
===================================================================
--- projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.cfg.xml 2009-11-24 06:29:23 UTC (rev 96791)
+++ projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.cfg.xml 2009-11-24 06:39:32 UTC (rev 96792)
@@ -17,11 +17,7 @@
<property name="hibernate.format_sql">true</property>
<property name="hibernate.use_sql_comments">true</property>
<property name="hibernate.show_sql">true</property>
- <property name="hibernate.current_session_context_class">jta</property>
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
-
<mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Account"/>
<mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Address"/>
<mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Equipment"/>
@@ -32,4 +28,4 @@
<mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Reservation"/>
</session-factory>
-</hibernate-configuration>
\ No newline at end of file
+</hibernate-configuration>
Added: projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.properties
===================================================================
--- projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.properties (rev 0)
+++ projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.properties 2009-11-24 06:39:32 UTC (rev 96792)
@@ -0,0 +1,4 @@
+hibernate.hbm2ddl.auto=create-drop
+hibernate.current_session_context_class=jta
+hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
+hibernate.transaction.factory_class=org.hibernate.transaction.CMTTransactionFactory
Added: projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/infrastructure.xml
===================================================================
--- projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/infrastructure.xml (rev 0)
+++ projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/src/main/resources/infrastructure.xml 2009-11-24 06:39:32 UTC (rev 96792)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:jee="http://www.springframework.org/schema/jee"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/jee
+ http://www.springframework.org/schema/jee/spring-jee.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd
+ http://www.springframework.org/schema/tx
+ http://www.springframework.org/schema/tx/spring-tx.xsd">
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="location" value="classpath:context.properties"/>
+ <property name="ignoreUnresolvablePlaceholders" value="true"/>
+ </bean>
+
+ <jee:jndi-lookup jndi-name="java:/StayFitDS" id="stayFitDS"/>
+
+ <tx:jta-transaction-manager/>
+
+</beans>
More information about the jboss-cvs-commits
mailing list