[jboss-cvs] JBossAS SVN: r103494 - in projects/snowdrop/examples/trunk/sportsclub: sportsclub-hibernate-dao/src/main/resources/hibernate and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Apr 3 01:22:21 EDT 2010


Author: marius.bogoevici
Date: 2010-04-03 01:22:21 -0400 (Sat, 03 Apr 2010)
New Revision: 103494

Removed:
   projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.cfg.xml
Modified:
   projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/dao-context.xml
   projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.properties
   projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/main/java/org/jboss/spring/samples/sportsclub/invoicing/services/BillingServiceImpl.java
   projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/audit/PaymentAuditor.java
   projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/hibernate/test-hibernate.properties
Log:
Fixes

Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/dao-context.xml
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/dao-context.xml	2010-04-03 03:56:15 UTC (rev 103493)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/dao-context.xml	2010-04-03 05:22:21 UTC (rev 103494)
@@ -15,7 +15,18 @@
 
     <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
         <property name="dataSource" ref="stayFitDS"/>
-        <property name="configLocation" value="classpath:/hibernate/hibernate.cfg.xml"/>
+        <property name="annotatedClasses">
+        	<list>
+        		<value>org.jboss.snowdrop.samples.sportsclub.domain.entity.Account</value>
+        		<value>org.jboss.snowdrop.samples.sportsclub.domain.entity.Equipment</value>
+        		<value>org.jboss.snowdrop.samples.sportsclub.domain.entity.Invoice</value>
+        		<value>org.jboss.snowdrop.samples.sportsclub.domain.entity.Balance</value>
+        		<value>org.jboss.snowdrop.samples.sportsclub.domain.entity.Payment</value>
+        		<value>org.jboss.snowdrop.samples.sportsclub.domain.entity.Membership</value>
+        		<value>org.jboss.snowdrop.samples.sportsclub.domain.entity.Person</value>
+        		<value>org.jboss.snowdrop.samples.sportsclub.domain.entity.Reservation</value>
+        	</list>
+        </property>
         <property name="hibernateProperties">
             <util:properties location="${hibernate.properties.location}"/>
         </property>

Deleted: projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.cfg.xml
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.cfg.xml	2010-04-03 03:56:15 UTC (rev 103493)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.cfg.xml	2010-04-03 05:22:21 UTC (rev 103494)
@@ -1,33 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!DOCTYPE hibernate-configuration PUBLIC
-"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
-"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
-<session-factory>
-
-    <!-- hibernate dialect -->
-    <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
-
-    <!-- Simple memory-only cache -->
-    <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-
-    <!-- logging properties -->
-    <property name="hibernate.format_sql">true</property>
-    <property name="hibernate.use_sql_comments">true</property>
-    <property name="hibernate.show_sql">true</property>
-
-    <mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Account"/>
-    <!--<mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Address"/>--> <!-- Embedded class -->
-    <mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Equipment"/>
-    <!--<mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Name"/>--> <!-- Embedded class -->
-    <mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Invoice"/>
-    <mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Balance"/>
-    <mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Payment"/>
-    <mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Membership"/>
-    <mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Person"/>
-    <mapping class="org.jboss.snowdrop.samples.sportsclub.domain.entity.Reservation"/>
-
-</session-factory>
-</hibernate-configuration>

Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.properties
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.properties	2010-04-03 03:56:15 UTC (rev 103493)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.properties	2010-04-03 05:22:21 UTC (rev 103494)
@@ -2,3 +2,5 @@
 hibernate.current_session_context_class=jta
 hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
 hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
+hibernate.dialect=org.hibernate.dialect.HSQLDialect
+hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider

Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/main/java/org/jboss/spring/samples/sportsclub/invoicing/services/BillingServiceImpl.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/main/java/org/jboss/spring/samples/sportsclub/invoicing/services/BillingServiceImpl.java	2010-04-03 03:56:15 UTC (rev 103493)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/main/java/org/jboss/spring/samples/sportsclub/invoicing/services/BillingServiceImpl.java	2010-04-03 05:22:21 UTC (rev 103494)
@@ -1,5 +1,11 @@
 package org.jboss.spring.samples.sportsclub.invoicing.services;
 
+import java.util.Date;
+import java.util.List;
+
+import javax.ejb.Stateless;
+import javax.interceptor.Interceptors;
+
 import org.jboss.annotation.spring.Spring;
 import org.jboss.ejb3.annotation.LocalBinding;
 import org.jboss.snowdrop.samples.sportsclub.domain.entity.Account;
@@ -11,11 +17,6 @@
 import org.jboss.snowdrop.samples.sportsclub.domain.repository.PaymentRepository;
 import org.jboss.spring.callback.SpringLifecycleInterceptor;
 
-import javax.ejb.Stateless;
-import javax.interceptor.Interceptors;
-import java.util.Date;
-import java.util.List;
-
 @Stateless
 @Interceptors(SpringLifecycleInterceptor.class)
 @LocalBinding(jndiBinding="sportsclub/BillingService")

Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/audit/PaymentAuditor.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/audit/PaymentAuditor.java	2010-04-03 03:56:15 UTC (rev 103493)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/audit/PaymentAuditor.java	2010-04-03 05:22:21 UTC (rev 103494)
@@ -33,5 +33,9 @@
       {
          System.out.println("AUDIT ENABLED! A payment has been made to account " + accountId + " for the amount of " + amount);
       }
+      else
+      { 
+    	  System.out.println("AUDIT DISABLED!");   	  
+      }
    }
 }

Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/hibernate/test-hibernate.properties
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/hibernate/test-hibernate.properties	2010-04-03 03:56:15 UTC (rev 103493)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/hibernate/test-hibernate.properties	2010-04-03 05:22:21 UTC (rev 103494)
@@ -1 +1,2 @@
-#hibernate.hbm2ddl.auto=validate
\ No newline at end of file
+hibernate.dialect=org.hibernate.dialect.HSQLDialect
+hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
\ No newline at end of file




More information about the jboss-cvs-commits mailing list