[jboss-cvs] JBossAS SVN: r100776 - in projects/snowdrop/examples/trunk/sportsclub: database and 24 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 9 15:51:36 EST 2010
Author: marius.bogoevici
Date: 2010-02-09 15:51:34 -0500 (Tue, 09 Feb 2010)
New Revision: 100776
Added:
projects/snowdrop/examples/trunk/sportsclub/database/resetdb.sh
projects/snowdrop/examples/trunk/sportsclub/database/startdb.sh
projects/snowdrop/examples/trunk/sportsclub/jbossconf/add.to.destination-services.xml
projects/snowdrop/examples/trunk/sportsclub/readme.txt
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/test/java/org/jboss/spring/samples/sportsclub/invoicing/services/TestBillingServiceHibernateIntegration.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/java/org/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/java/org/jboss/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/java/org/jboss/snowdrop/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/java/org/jboss/snowdrop/samples/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/java/org/jboss/snowdrop/samples/sportsclub/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/java/org/jboss/snowdrop/samples/sportsclub/test/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/java/org/jboss/snowdrop/samples/sportsclub/test/TestDatasourceFactoryBean.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/dbsetup.sql
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-db-infrastructure.xml
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-hibernate-infrastructure.xml
Removed:
projects/snowdrop/examples/trunk/sportsclub/database/sportsclubdb-startup.sh
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/test/java/org/jboss/spring/samples/sportsclub/invoicing/services/TestBillingService.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-infrastructure.xml
Modified:
projects/snowdrop/examples/trunk/sportsclub/database/db-setup.sql
projects/snowdrop/examples/trunk/sportsclub/pom.xml
projects/snowdrop/examples/trunk/sportsclub/sportsclub-domain/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-ear/
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-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateAccountRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateEquipmentRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateInvoiceRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateMembershipRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernatePersonRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateReservationRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaAccountRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaEquipmentRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaInvoiceRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaMembershipRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaPersonRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaReservationRepository.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-ear/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-reservations-spring/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-reservations-web/src/test/java/org/jboss/snowdrop/samples/sportsclub/jsf/beans/converter/AccountConverterHelperTest.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-reservations-web/src/test/java/org/jboss/snowdrop/samples/sportsclub/jsf/beans/converter/EquipmentConverterHelperTest.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-subscriptions-ejb/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-subscriptions-web/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/pom.xml
projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/hibernate/test-hibernate.properties
Log:
Use sql-based initialization instead of DatabaseInitializer.
Create scripts to set up/reset the DB when running the application.
Modified: projects/snowdrop/examples/trunk/sportsclub/database/db-setup.sql
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/database/db-setup.sql 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/database/db-setup.sql 2010-02-09 20:51:34 UTC (rev 100776)
@@ -1,57 +1,63 @@
-alter table Account
- drop constraint FK1D0C220DBC471BC1;
-
- drop table Account if exists;
-
- drop table Equipment if exists;
-
- drop table Person if exists;
-
- create table Account (
- id bigint generated by default as identity (start with 1),
- subscriber_id bigint,
- primary key (id)
- );
-
- create table Equipment (
- id bigint not null,
- description varchar(255),
- name varchar(255),
- primary key (id)
- );
-
- create table Person (
- id bigint generated by default as identity (start with 1),
- city varchar(255),
- country varchar(255),
- postalCode varchar(255),
- provinceOrState varchar(255),
- streetAddress varchar(255),
- firstName varchar(255),
- lastName varchar(255),
- middleName varchar(255),
- primary key (id)
- );
-
- alter table Account
- add constraint FK1D0C220DBC471BC1
- foreign key (subscriber_id)
- references Person;
-
-
-
-
-insert into PUBLIC.PERSON (PERSON.CITY, PERSON.PROVINCEORSTATE, PERSON.STREETADDRESS, PERSON.FIRSTNAME, PERSON.LASTNAME, PERSON.MIDDLENAME)
-values ('Toronto', 'Ontario', '1 Yonge', 'Samuel', 'Vimes', '');
-
-insert into PUBLIC.PERSON (PERSON.CITY, PERSON.PROVINCEORSTATE, PERSON.STREETADDRESS, PERSON.FIRSTNAME, PERSON.LASTNAME, PERSON.MIDDLENAME)
-values ('Toronto', 'Ontario', '1 Bloor', 'Havelock', 'Vetinari', '');
-
-insert into PUBLIC.PERSON (PERSON.CITY, PERSON.PROVINCEORSTATE, PERSON.STREETADDRESS, PERSON.FIRSTNAME, PERSON.LASTNAME, PERSON.MIDDLENAME)
-values ('Toronto', 'Ontario', '1 Yonge', 'Sybil', 'Vimes', '');
-
-insert into PUBLIC.ACCOUNT(ACCOUNT.SUBSCRIBER_ID) VALUES (1);
-
-insert into PUBLIC.ACCOUNT(ACCOUNT.SUBSCRIBER_ID) VALUES (2);
-
-insert into PUBLIC.ACCOUNT(ACCOUNT.SUBSCRIBER_ID) VALUES (3);
\ No newline at end of file
+DROP TABLE ACCOUNT IF EXISTS CASCADE;
+DROP TABLE EQUIPMENT IF EXISTS CASCADE;
+DROP TABLE INVOICE IF EXISTS CASCADE;
+DROP TABLE MEMBERSHIP IF EXISTS CASCADE;
+DROP TABLE PAYMENT IF EXISTS CASCADE;
+DROP TABLE PERSON IF EXISTS CASCADE;
+DROP TABLE RESERVATION IF EXISTS CASCADE;
+CREATE TABLE ACCOUNT(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,AMOUNT NUMERIC,BILLINGTYPE INTEGER,CLOSEDATE TIMESTAMP,CLOSED BOOLEAN NOT NULL,CREATIONDATE TIMESTAMP,MEMBERSHIP_CODE VARCHAR(255),SUBSCRIBER_ID BIGINT);
+CREATE TABLE EQUIPMENT(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,DESCRIPTION VARCHAR(255),EQP_TYPE_ID INTEGER NOT NULL,NAME VARCHAR(255));
+CREATE TABLE INVOICE(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,AMOUNT NUMERIC,ENDDATE TIMESTAMP,STARTDATE TIMESTAMP,ISSUEDATE TIMESTAMP,ACCOUNT_ID BIGINT,CONSTRAINT FKD80EDB0D249215C0 FOREIGN KEY(ACCOUNT_ID) REFERENCES ACCOUNT(ID));
+CREATE TABLE MEMBERSHIP(CODE VARCHAR(255) NOT NULL PRIMARY KEY,ACTIVE BOOLEAN NOT NULL,ANNUALFEE NUMERIC);
+CREATE TABLE PAYMENT(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,AMOUNT NUMERIC,DATE TIMESTAMP,ACCOUNT_ID BIGINT,CONSTRAINT FK3454C9E6249215C0 FOREIGN KEY(ACCOUNT_ID) REFERENCES ACCOUNT(ID));
+CREATE TABLE PERSON(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,CITY VARCHAR(255),COUNTRY VARCHAR(255),POSTALCODE VARCHAR(255),PROVINCEORSTATE VARCHAR(255),STREETADDRESS VARCHAR(255),FIRSTNAME VARCHAR(255),LASTNAME VARCHAR(255),MIDDLENAME VARCHAR(255));
+CREATE TABLE RESERVATION(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,FROMDT TIMESTAMP NOT NULL,TODT TIMESTAMP NOT NULL,ACCOUNT_ID BIGINT,EQUIPMENT_ID BIGINT,CONSTRAINT FK63EEBAC973D1CA0 FOREIGN KEY(EQUIPMENT_ID) REFERENCES EQUIPMENT(ID),CONSTRAINT FK63EEBAC249215C0 FOREIGN KEY(ACCOUNT_ID) REFERENCES ACCOUNT(ID));
+ALTER TABLE ACCOUNT ADD CONSTRAINT FK1D0C220DBC471BC1 FOREIGN KEY(SUBSCRIBER_ID) REFERENCES PERSON(ID);
+ALTER TABLE ACCOUNT ADD CONSTRAINT FK1D0C220D6ED953A6 FOREIGN KEY(MEMBERSHIP_CODE) REFERENCES MEMBERSHIP(CODE);
+ALTER TABLE ACCOUNT ALTER COLUMN ID RESTART WITH 13;
+ALTER TABLE EQUIPMENT ALTER COLUMN ID RESTART WITH 7;
+ALTER TABLE PAYMENT ALTER COLUMN ID RESTART WITH 1;
+ALTER TABLE PERSON ALTER COLUMN ID RESTART WITH 13;
+ALTER TABLE RESERVATION ALTER COLUMN ID RESTART WITH 7;
+ALTER TABLE INVOICE ALTER COLUMN ID RESTART WITH 2;
+INSERT INTO PERSON VALUES(1,'Ankh Morpork','Discworld','A0A0A0','Ankh Morpork','1 King','Carrot','Ironfoundersson',NULL);
+INSERT INTO PERSON VALUES(2,'Ankh Morpork','Discworld','A0A0A0','Ankh Morpork','1 Bloor','Havelock','Vetinari',NULL);
+INSERT INTO PERSON VALUES(3,'Lancre','Discworld','H0H0H0','Ramtops','1 King','Magrat','Garlick',NULL);
+INSERT INTO PERSON VALUES(4,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','1 Dufferin','Nobby','Nobbs',NULL);
+INSERT INTO PERSON VALUES(5,'Lancre','Ramtops','H0H0H0','Ramtops','1 King','Gytha','Ogg',NULL);
+INSERT INTO PERSON VALUES(6,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','1 Yonge','Samuel','Vimes',NULL);
+INSERT INTO PERSON VALUES(7,'Lancre','Ramtops','H0H0H0','Ramtops','1 King','Esmerelda','Weatherwax',NULL);
+INSERT INTO PERSON VALUES(8,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','2 Yonge','Sibyl','Vimes','');
+INSERT INTO PERSON VALUES(9,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','1 University','Mustrum','Ridcully',NULL);
+INSERT INTO PERSON VALUES(10,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','1 King','Angua','von Uberwald',NULL);
+INSERT INTO PERSON VALUES(11,'Lancre','Ramtops','H0H0H0','Ramtops','1 King','Bill','Door',NULL);
+INSERT INTO PERSON VALUES(12,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','1 King','Claude','Dibbler',NULL);
+INSERT INTO EQUIPMENT VALUES(1,'MTN 740 by NordicTrack',1,'MTN');
+INSERT INTO EQUIPMENT VALUES(2,'by Cyberwalk',0,'Omnidirectional');
+INSERT INTO EQUIPMENT VALUES(3,'95T Inclusive by LifeFitness',0,'Inclusive');
+INSERT INTO EQUIPMENT VALUES(4,'FreeMotion s5.6 by NordicTrack',1,'FreeMotion');
+INSERT INTO EQUIPMENT VALUES(5,'by Court Company',2,'Squash');
+INSERT INTO EQUIPMENT VALUES(6,'95T Engage by LifeFitness',0,'Engage');
+INSERT INTO MEMBERSHIP VALUES('GOLD',TRUE,900.0);
+INSERT INTO MEMBERSHIP VALUES('PLATINUM',TRUE,1200.0);
+INSERT INTO MEMBERSHIP VALUES('SILVER',TRUE,600.0);
+INSERT INTO ACCOUNT VALUES(1,0,0,NULL,FALSE,'2010-02-01 00:00:00.833000000','GOLD',8);
+INSERT INTO ACCOUNT VALUES(2,0,0,NULL,FALSE,'2010-02-01 00:00:00.832000000','SILVER',6);
+INSERT INTO ACCOUNT VALUES(3,0,2,NULL,FALSE,'2010-02-01 00:00:00.833000000','GOLD',4);
+INSERT INTO ACCOUNT VALUES(4,0,2,NULL,FALSE,'2010-02-01 00:00:00.833000000','PLATINUM',2);
+INSERT INTO ACCOUNT VALUES(5,0,2,NULL,FALSE,'2010-02-01 00:00:00.833000000','PLATINUM',3);
+INSERT INTO ACCOUNT VALUES(6,0,2,NULL,FALSE,'2010-02-01 00:00:00.833000000','PLATINUM',1);
+INSERT INTO ACCOUNT VALUES(7,0,0,NULL,FALSE,'2010-02-01 00:00:00.833000000','PLATINUM',7);
+INSERT INTO ACCOUNT VALUES(8,0,2,NULL,FALSE,'2010-02-01 00:00:00.833000000','PLATINUM',5);
+INSERT INTO ACCOUNT VALUES(9,0,2,NULL,FALSE,'2010-02-01 00:00:00.834000000','PLATINUM',12);
+INSERT INTO ACCOUNT VALUES(10,0,2,NULL,FALSE,'2010-02-01 00:00:00.834000000','PLATINUM',9);
+INSERT INTO ACCOUNT VALUES(11,0,2,NULL,FALSE,'2010-02-01 00:00:00.834000000','PLATINUM',10);
+INSERT INTO ACCOUNT VALUES(12,0,2,NULL,FALSE,'2010-02-01 00:00:00.834000000','PLATINUM',11);
+INSERT INTO RESERVATION VALUES(1,'2009-05-01 00:00:00.000000000','2009-10-31 00:00:00.000000000',4,2);
+INSERT INTO RESERVATION VALUES(2,'2009-01-01 00:00:00.000000000','2009-12-31 00:00:00.000000000',1,3);
+INSERT INTO RESERVATION VALUES(3,'2009-02-01 00:00:00.000000000','2009-10-31 00:00:00.000000000',2,6);
+INSERT INTO RESERVATION VALUES(4,'2009-07-01 00:00:00.000000000','2009-07-02 00:00:00.000000000',5,1);
+INSERT INTO RESERVATION VALUES(5,'2009-07-01 00:00:00.000000000','2009-07-02 00:00:00.000000000',6,4);
+INSERT INTO RESERVATION VALUES(6,'2009-07-01 00:00:00.000000000','2009-07-02 00:00:00.000000000',3,5);
+INSERT INTO INVOICE VALUES(1,50.0,'2010-02-14 00:00:00.000000000','2010-02-01 00:00:00.000000000', '2010-02-04 00:00:00.000000000',2);
+COMMIT;
Added: projects/snowdrop/examples/trunk/sportsclub/database/resetdb.sh
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/database/resetdb.sh (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/database/resetdb.sh 2010-02-09 20:51:34 UTC (rev 100776)
@@ -0,0 +1,8 @@
+if [ "x$HSQLDB_JAR_LOCATION" = "x" ]; then
+ if [ "x$HSQLDB_HOME" = "x" ]; then
+ HSQLDB_JAR_LOCATION=$HOME/.m2/repository/hsqldb/hsqldb/1.8.0.10/hsqldb-1.8.0.10.jar
+ else
+ HSQLDB_JAR_LOCATION=$HSQLDB_HOME/lib/hsqldb.jar
+ fi
+fi
+java -jar $HSQLDB_JAR_LOCATION --inlineRc URL=jdbc:hsqldb:hsql://localhost/sportsclubdb,USER=sa,PASSWORD= db-setup.sql
\ No newline at end of file
Property changes on: projects/snowdrop/examples/trunk/sportsclub/database/resetdb.sh
___________________________________________________________________
Name: svn:executable
+ *
Deleted: projects/snowdrop/examples/trunk/sportsclub/database/sportsclubdb-startup.sh
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/database/sportsclubdb-startup.sh 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/database/sportsclubdb-startup.sh 2010-02-09 20:51:34 UTC (rev 100776)
@@ -1 +0,0 @@
-java -cp $HSQLDB_HOME/lib/hsqldb.jar org.hsqldb.Server -database.0 file:data/sportsclubdb -dbname.0 sportsclubdb
\ No newline at end of file
Copied: projects/snowdrop/examples/trunk/sportsclub/database/startdb.sh (from rev 100767, projects/snowdrop/examples/trunk/sportsclub/database/sportsclubdb-startup.sh)
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/database/startdb.sh (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/database/startdb.sh 2010-02-09 20:51:34 UTC (rev 100776)
@@ -0,0 +1,8 @@
+if [ "x$HSQLDB_JAR_LOCATION" = "x" ]; then
+ if [ "x$HSQLDB_HOME" = "x" ]; then
+ HSQLDB_JAR_LOCATION=$HOME/.m2/repository/hsqldb/hsqldb/1.8.0.10/hsqldb-1.8.0.10.jar
+ else
+ HSQLDB_JAR_LOCATION=$HSQLDB_HOME/lib/hsqldb.jar
+ fi
+fi
+java -cp $HSQLDB_JAR_LOCATION org.hsqldb.Server -database.0 file:data/sportsclubdb -dbname.0 sportsclubdb db-setup.sql
\ No newline at end of file
Added: projects/snowdrop/examples/trunk/sportsclub/jbossconf/add.to.destination-services.xml
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/jbossconf/add.to.destination-services.xml (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/jbossconf/add.to.destination-services.xml 2010-02-09 20:51:34 UTC (rev 100776)
@@ -0,0 +1,5 @@
+<mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=sportsclub" xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+</mbean>
\ No newline at end of file
Modified: projects/snowdrop/examples/trunk/sportsclub/pom.xml
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/pom.xml 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/pom.xml 2010-02-09 20:51:34 UTC (rev 100776)
@@ -229,6 +229,45 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
+ <artifactId>hibernate3-maven-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <components>
+ <component>
+ <name>hbm2ddl</name>
+ <implementation>annotationconfiguration</implementation>
+ </component>
+ </components>
+ <componentProperties>
+ <configurationfile>/src/main/resources/hibernate/hibernate.cfg.xml</configurationfile>
+ <outputfilename>schema.ddl</outputfilename>
+ <drop>true</drop>
+ <create>true</create>
+ <export>false</export>
+ </componentProperties>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>oracle</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <version>10.2.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.10</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.4</version>
<inherited>false</inherited>
@@ -333,4 +372,4 @@
</pluginRepository>
</pluginRepositories>
-</project>
\ No newline at end of file
+</project>
Added: projects/snowdrop/examples/trunk/sportsclub/readme.txt
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/readme.txt (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/readme.txt 2010-02-09 20:51:34 UTC (rev 100776)
@@ -0,0 +1,20 @@
+Sportsclub Spring JBoss Integration example
+
+For building & running the application:
+
+1. Execute a Maven build from the root folder of the example
+
+mvn clean package
+
+2. Setup the JBoss data source:
+
+cp database/sportsclub-ds.xml <JBOSS_HOME>/server/default/deploy
+
+3. Start the database
+
+database/startdb.sh
+
+4. Reset the database (with the database started)
+
+database/resetdb.sh
+
Property changes on: projects/snowdrop/examples/trunk/sportsclub/sportsclub-domain
___________________________________________________________________
Name: svn:ignore
- target
.settings
.project
.classpath
+ target
.settings
.project
.classpath
*.iml
Property changes on: projects/snowdrop/examples/trunk/sportsclub/sportsclub-ear
___________________________________________________________________
Name: svn:ignore
+ *.iml
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-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/dao-context.xml 2010-02-09 20:51:34 UTC (rev 100776)
@@ -21,13 +21,6 @@
</property>
</bean>
- <bean class="org.jboss.snowdrop.samples.sportsclub.dao.hibernate.initializer.DatabaseInitializer">
- <property name="sessionFactory" ref="sessionFactory"/>
- <property name="transactionManager" ref="transactionManager"/>
-
- </bean>
-
-
<bean id="accountRepository" class="org.jboss.snowdrop.samples.sportsclub.dao.hibernate.HibernateAccountRepository">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
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-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/main/resources/hibernate/hibernate.properties 2010-02-09 20:51:34 UTC (rev 100776)
@@ -1,4 +1,4 @@
-hibernate.hbm2ddl.auto=create-drop
+#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.JTATransactionFactory
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateAccountRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateAccountRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateAccountRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -19,7 +19,9 @@
/**
* @author <a href="mailto:mariusb at redhat.com">Marius Bogoevici</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml", "classpath:dao-context.xml"})
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
+ "classpath:test-hibernate-infrastructure.xml",
+ "classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
@Transactional
public class TestHibernateAccountRepository
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateEquipmentRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateEquipmentRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateEquipmentRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -13,7 +13,9 @@
/**
* @author <a href="mailto:lvlcek at redhat.com">Lukas Vlcek</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml", "classpath:dao-context.xml"})
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
+ "classpath:test-hibernate-infrastructure.xml",
+ "classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
@Transactional
public class TestHibernateEquipmentRepository
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateInvoiceRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateInvoiceRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateInvoiceRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -17,7 +17,9 @@
/**
* @author <a href="mailto:lvlcek at redhat.com">Lukas Vlcek</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml", "classpath:dao-context.xml"})
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
+ "classpath:test-hibernate-infrastructure.xml",
+ "classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
@Transactional
public class TestHibernateInvoiceRepository
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateMembershipRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateMembershipRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateMembershipRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -16,7 +16,9 @@
/**
* @author <a href="mailto:lvlcek at redhat.com">Lukas Vlcek</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml", "classpath:dao-context.xml"})
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
+ "classpath:test-hibernate-infrastructure.xml",
+ "classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
@Transactional
public class TestHibernateMembershipRepository
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernatePersonRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernatePersonRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernatePersonRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -12,7 +12,9 @@
/**
* @author <a href="mailto:lvlcek at redhat.com">Lukas Vlcek</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml", "classpath:dao-context.xml"})
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
+ "classpath:test-hibernate-infrastructure.xml",
+ "classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
@Transactional
public class TestHibernatePersonRepository
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateReservationRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateReservationRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-hibernate-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/hibernate/TestHibernateReservationRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -14,7 +14,9 @@
import java.util.*;
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml", "classpath:dao-context.xml"})
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
+ "classpath:test-hibernate-infrastructure.xml",
+ "classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
@Transactional
public class TestHibernateReservationRepository
Deleted: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/test/java/org/jboss/spring/samples/sportsclub/invoicing/services/TestBillingService.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/test/java/org/jboss/spring/samples/sportsclub/invoicing/services/TestBillingService.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/test/java/org/jboss/spring/samples/sportsclub/invoicing/services/TestBillingService.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -1,62 +0,0 @@
-package org.jboss.spring.samples.sportsclub.invoicing.services;
-
-import junit.framework.Assert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.TransactionStatus;
-import org.springframework.transaction.annotation.Transactional;
-
-import org.jboss.snowdrop.samples.sportsclub.domain.entity.Account;
-import org.jboss.snowdrop.samples.sportsclub.domain.entity.Invoice;
-import org.jboss.snowdrop.samples.sportsclub.domain.repository.AccountRepository;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.transaction.support.TransactionCallback;
-import org.springframework.transaction.support.TransactionTemplate;
-
-/**
- * @author Marius Bogoevici
- */
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml", "classpath:dao-context.xml", "classpath:service-context.xml"})
- at RunWith(SpringJUnit4ClassRunner.class)
-public class TestBillingService
-{
-
- @Autowired
- BillingService billingService;
-
- @Autowired
- AccountRepository accountRepository;
-
- @Autowired
- private PlatformTransactionManager transactionManager;
-
- @Test
- public void testBillingService()
- {
-
- final Invoice invoice = (Invoice)new TransactionTemplate(transactionManager).execute(new TransactionCallback()
- {
- public Object doInTransaction(TransactionStatus status)
- {
- Account account = accountRepository.findById(1l);
- Invoice invoice = billingService.generateInvoice(account);
- return invoice;
- }
- });
-
-
- new TransactionTemplate(transactionManager).execute(new TransactionCallback()
- {
- public Object doInTransaction(TransactionStatus status)
- {
- Account account = accountRepository.findById(1l);
- Assert.assertEquals(account.getBalance().getAmount(), invoice.getAmount());
- return null;
- }
- });
- }
-
-}
Copied: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/test/java/org/jboss/spring/samples/sportsclub/invoicing/services/TestBillingServiceHibernateIntegration.java (from rev 100767, projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/test/java/org/jboss/spring/samples/sportsclub/invoicing/services/TestBillingService.java)
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/test/java/org/jboss/spring/samples/sportsclub/invoicing/services/TestBillingServiceHibernateIntegration.java (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-ejb/src/test/java/org/jboss/spring/samples/sportsclub/invoicing/services/TestBillingServiceHibernateIntegration.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -0,0 +1,65 @@
+package org.jboss.spring.samples.sportsclub.invoicing.services;
+
+import junit.framework.Assert;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.TransactionStatus;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.jboss.snowdrop.samples.sportsclub.domain.entity.Account;
+import org.jboss.snowdrop.samples.sportsclub.domain.entity.Invoice;
+import org.jboss.snowdrop.samples.sportsclub.domain.repository.AccountRepository;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.transaction.support.TransactionCallback;
+import org.springframework.transaction.support.TransactionTemplate;
+
+/**
+ * @author Marius Bogoevici
+ */
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
+ "classpath:dao-context.xml",
+ "classpath:test-hibernate-infrastructure.xml",
+ "classpath:service-context.xml"})
+ at RunWith(SpringJUnit4ClassRunner.class)
+public class TestBillingServiceHibernateIntegration
+{
+
+ @Autowired
+ BillingService billingService;
+
+ @Autowired
+ AccountRepository accountRepository;
+
+ @Autowired
+ private PlatformTransactionManager transactionManager;
+
+ @Test
+ public void testBillingService()
+ {
+
+ final Invoice invoice = (Invoice)new TransactionTemplate(transactionManager).execute(new TransactionCallback()
+ {
+ public Object doInTransaction(TransactionStatus status)
+ {
+ Account account = accountRepository.findById(1l);
+ Invoice invoice = billingService.generateInvoice(account);
+ return invoice;
+ }
+ });
+
+
+ new TransactionTemplate(transactionManager).execute(new TransactionCallback()
+ {
+ public Object doInTransaction(TransactionStatus status)
+ {
+ Account account = accountRepository.findById(1l);
+ Assert.assertEquals(account.getBalance().getAmount(), invoice.getAmount());
+ return null;
+ }
+ });
+ }
+
+}
Property changes on: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc
___________________________________________________________________
Name: svn:ignore
+ *.iml
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaAccountRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaAccountRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaAccountRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -21,7 +21,7 @@
/**
* @author <a href="mailto:lvlcek at redhat.com">Lukas Vlcek</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml",
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
"classpath:TEST-jpa-infrastructure.xml",
"classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaEquipmentRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaEquipmentRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaEquipmentRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -12,7 +12,7 @@
/**
* @author <a href="mailto:lvlcek at redhat.com">Lukas Vlcek</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml",
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
"classpath:TEST-jpa-infrastructure.xml",
"classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaInvoiceRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaInvoiceRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaInvoiceRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -17,7 +17,7 @@
/**
* @author <a href="mailto:lvlcek at redhat.com">Lukas Vlcek</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml",
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
"classpath:TEST-jpa-infrastructure.xml",
"classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaMembershipRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaMembershipRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaMembershipRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -15,7 +15,7 @@
/**
* @author <a href="mailto:lvlcek at redhat.com">Lukas Vlcek</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml",
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
"classpath:TEST-jpa-infrastructure.xml",
"classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaPersonRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaPersonRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaPersonRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -14,7 +14,7 @@
/**
* @author Marius Bogoevici
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml",
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
"classpath:TEST-jpa-infrastructure.xml",
"classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaReservationRepository.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaReservationRepository.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-dao/src/test/java/org/jboss/snowdrop/samples/sportsclub/dao/jpa/TestJpaReservationRepository.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -16,7 +16,7 @@
/**
* @author <a href="mailto:lvlcek at redhat.com">Lukas Vlcek</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml",
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
"classpath:TEST-jpa-infrastructure.xml",
"classpath:dao-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
Property changes on: projects/snowdrop/examples/trunk/sportsclub/sportsclub-jpa-ear
___________________________________________________________________
Name: svn:ignore
+ *.iml
Property changes on: projects/snowdrop/examples/trunk/sportsclub/sportsclub-reservations-spring
___________________________________________________________________
Name: svn:ignore
+ *.iml
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-reservations-web/src/test/java/org/jboss/snowdrop/samples/sportsclub/jsf/beans/converter/AccountConverterHelperTest.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-reservations-web/src/test/java/org/jboss/snowdrop/samples/sportsclub/jsf/beans/converter/AccountConverterHelperTest.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-reservations-web/src/test/java/org/jboss/snowdrop/samples/sportsclub/jsf/beans/converter/AccountConverterHelperTest.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -11,7 +11,11 @@
/**
* @author <a href="mailto:lvlcek at redhat.com">Lukas Vlcek</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml", "classpath:dao-context.xml", "classpath:spring-converterHelpers.xml"})
+ at ContextConfiguration(locations = {
+ "classpath:test-db-infrastructure.xml",
+ "classpath:test-hibernate-infrastructure.xml",
+ "classpath:dao-context.xml",
+ "classpath:spring-converterHelpers.xml"})
public class AccountConverterHelperTest extends AbstractTestNGSpringContextTests
{
@Autowired
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-reservations-web/src/test/java/org/jboss/snowdrop/samples/sportsclub/jsf/beans/converter/EquipmentConverterHelperTest.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-reservations-web/src/test/java/org/jboss/snowdrop/samples/sportsclub/jsf/beans/converter/EquipmentConverterHelperTest.java 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-reservations-web/src/test/java/org/jboss/snowdrop/samples/sportsclub/jsf/beans/converter/EquipmentConverterHelperTest.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -11,7 +11,10 @@
/**
* @author <a href="mailto:lvlcek at redhat.com">Lukas Vlcek</a>
*/
- at ContextConfiguration(locations = {"classpath:test-infrastructure.xml", "classpath:dao-context.xml", "classpath:spring-converterHelpers.xml"})
+ at ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
+ "classpath:test-hibernate-infrastructure.xml",
+ "classpath:dao-context.xml",
+ "classpath:spring-converterHelpers.xml"})
public class EquipmentConverterHelperTest extends AbstractTestNGSpringContextTests
{
Property changes on: projects/snowdrop/examples/trunk/sportsclub/sportsclub-subscriptions-ejb
___________________________________________________________________
Name: svn:ignore
+ *.iml
Property changes on: projects/snowdrop/examples/trunk/sportsclub/sportsclub-subscriptions-web
___________________________________________________________________
Name: svn:ignore
+ *.iml
Property changes on: projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure
___________________________________________________________________
Name: svn:ignore
+ *.iml
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/pom.xml
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/pom.xml 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/pom.xml 2010-02-09 20:51:34 UTC (rev 100776)
@@ -16,15 +16,30 @@
<dependencies>
+
<dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ </dependency>
+ <dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
@@ -66,4 +81,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
Added: projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/java/org/jboss/snowdrop/samples/sportsclub/test/TestDatasourceFactoryBean.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/java/org/jboss/snowdrop/samples/sportsclub/test/TestDatasourceFactoryBean.java (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/java/org/jboss/snowdrop/samples/sportsclub/test/TestDatasourceFactoryBean.java 2010-02-09 20:51:34 UTC (rev 100776)
@@ -0,0 +1,141 @@
+package org.jboss.snowdrop.samples.sportsclub.test;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.sql.DataSource;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.sql.SQLException;
+
+import org.springframework.beans.factory.FactoryBean;
+import org.springframework.context.ResourceLoaderAware;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.ResourceLoader;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.TransactionStatus;
+import org.springframework.transaction.support.TransactionCallback;
+import org.springframework.transaction.support.TransactionTemplate;
+
+import org.apache.commons.dbcp.BasicDataSource;
+
+/**
+ * @author Marius Bogoevici
+ */
+public class TestDatasourceFactoryBean implements FactoryBean, ResourceLoaderAware
+{
+
+ private Resource databaseSetupFile;
+
+ private String url;
+ private String driverClassName;
+ private String username;
+ private String password;
+ private BasicDataSource dataSource;
+ private ResourceLoader resourceLoader;
+ private String databaseSetupFileName;
+
+ public void setUrl(String url)
+ {
+ this.url = url;
+
+ }
+
+ /*public void setDatabaseSetupFile(Resource databaseSetupFile)
+ {
+ this.databaseSetupFile = databaseSetupFile;
+ }*/
+
+
+ public void setResourceLoader(ResourceLoader resourceLoader)
+ {
+ this.resourceLoader = resourceLoader;
+ }
+
+ public void setDatabaseSetupFile(String databaseSetupFileName)
+ {
+ this.databaseSetupFileName = databaseSetupFileName;
+ }
+
+ public void setDriverClassName(String driverClassName)
+ {
+ this.driverClassName = driverClassName;
+ }
+
+ public void setUsername(String username)
+ {
+ this.username = username;
+ }
+
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+
+ public Object getObject() throws Exception
+ {
+ return dataSource;
+ }
+
+ public Class getObjectType()
+ {
+ return DataSource.class;
+ }
+
+ public boolean isSingleton()
+ {
+ return true;
+ }
+
+ @PostConstruct
+ public void doAfterConstruction()
+ {
+ this.databaseSetupFile = resourceLoader.getResource(databaseSetupFileName);
+ dataSource = new BasicDataSource();
+ dataSource.setUrl(url);
+ dataSource.setUsername(username);
+ dataSource.setDriverClassName(driverClassName);
+ dataSource.setPassword(password);
+
+ PlatformTransactionManager transactionManager = new DataSourceTransactionManager(dataSource);
+ final JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
+
+ new TransactionTemplate(transactionManager).execute(new TransactionCallback()
+ {
+ public Object doInTransaction(TransactionStatus status)
+ {
+ try
+ {
+ BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(databaseSetupFile.getInputStream()));
+ String sqlCommand;
+ while ((sqlCommand = bufferedReader.readLine()) != null)
+ {
+ jdbcTemplate.execute(sqlCommand);
+ }
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+ return null;
+ }
+ });
+ }
+
+ @PreDestroy
+ public void doBeforeShutdown()
+ {
+ try
+ {
+ dataSource.close();
+ }
+ catch (SQLException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
Added: projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/dbsetup.sql
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/dbsetup.sql (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/dbsetup.sql 2010-02-09 20:51:34 UTC (rev 100776)
@@ -0,0 +1,63 @@
+DROP TABLE ACCOUNT IF EXISTS CASCADE;
+DROP TABLE EQUIPMENT IF EXISTS CASCADE;
+DROP TABLE INVOICE IF EXISTS CASCADE;
+DROP TABLE MEMBERSHIP IF EXISTS CASCADE;
+DROP TABLE PAYMENT IF EXISTS CASCADE;
+DROP TABLE PERSON IF EXISTS CASCADE;
+DROP TABLE RESERVATION IF EXISTS CASCADE;
+CREATE TABLE ACCOUNT(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,AMOUNT NUMERIC,BILLINGTYPE INTEGER,CLOSEDATE TIMESTAMP,CLOSED BOOLEAN NOT NULL,CREATIONDATE TIMESTAMP,MEMBERSHIP_CODE VARCHAR(255),SUBSCRIBER_ID BIGINT);
+CREATE TABLE EQUIPMENT(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,DESCRIPTION VARCHAR(255),EQP_TYPE_ID INTEGER NOT NULL,NAME VARCHAR(255));
+CREATE TABLE INVOICE(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,AMOUNT NUMERIC,ENDDATE TIMESTAMP,STARTDATE TIMESTAMP,ISSUEDATE TIMESTAMP,ACCOUNT_ID BIGINT,CONSTRAINT FKD80EDB0D249215C0 FOREIGN KEY(ACCOUNT_ID) REFERENCES ACCOUNT(ID));
+CREATE TABLE MEMBERSHIP(CODE VARCHAR(255) NOT NULL PRIMARY KEY,ACTIVE BOOLEAN NOT NULL,ANNUALFEE NUMERIC);
+CREATE TABLE PAYMENT(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,AMOUNT NUMERIC,DATE TIMESTAMP,ACCOUNT_ID BIGINT,CONSTRAINT FK3454C9E6249215C0 FOREIGN KEY(ACCOUNT_ID) REFERENCES ACCOUNT(ID));
+CREATE TABLE PERSON(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,CITY VARCHAR(255),COUNTRY VARCHAR(255),POSTALCODE VARCHAR(255),PROVINCEORSTATE VARCHAR(255),STREETADDRESS VARCHAR(255),FIRSTNAME VARCHAR(255),LASTNAME VARCHAR(255),MIDDLENAME VARCHAR(255));
+CREATE TABLE RESERVATION(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,FROMDT TIMESTAMP NOT NULL,TODT TIMESTAMP NOT NULL,ACCOUNT_ID BIGINT,EQUIPMENT_ID BIGINT,CONSTRAINT FK63EEBAC973D1CA0 FOREIGN KEY(EQUIPMENT_ID) REFERENCES EQUIPMENT(ID),CONSTRAINT FK63EEBAC249215C0 FOREIGN KEY(ACCOUNT_ID) REFERENCES ACCOUNT(ID));
+ALTER TABLE ACCOUNT ADD CONSTRAINT FK1D0C220DBC471BC1 FOREIGN KEY(SUBSCRIBER_ID) REFERENCES PERSON(ID);
+ALTER TABLE ACCOUNT ADD CONSTRAINT FK1D0C220D6ED953A6 FOREIGN KEY(MEMBERSHIP_CODE) REFERENCES MEMBERSHIP(CODE);
+ALTER TABLE ACCOUNT ALTER COLUMN ID RESTART WITH 13;
+ALTER TABLE EQUIPMENT ALTER COLUMN ID RESTART WITH 7;
+ALTER TABLE PAYMENT ALTER COLUMN ID RESTART WITH 1;
+ALTER TABLE PERSON ALTER COLUMN ID RESTART WITH 13;
+ALTER TABLE RESERVATION ALTER COLUMN ID RESTART WITH 7;
+ALTER TABLE INVOICE ALTER COLUMN ID RESTART WITH 2;
+INSERT INTO PERSON VALUES(1,'Ankh Morpork','Discworld','A0A0A0','Ankh Morpork','1 King','Carrot','Ironfoundersson',NULL);
+INSERT INTO PERSON VALUES(2,'Ankh Morpork','Discworld','A0A0A0','Ankh Morpork','1 Bloor','Havelock','Vetinari',NULL);
+INSERT INTO PERSON VALUES(3,'Lancre','Discworld','H0H0H0','Ramtops','1 King','Magrat','Garlick',NULL);
+INSERT INTO PERSON VALUES(4,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','1 Dufferin','Nobby','Nobbs',NULL);
+INSERT INTO PERSON VALUES(5,'Lancre','Ramtops','H0H0H0','Ramtops','1 King','Gytha','Ogg',NULL);
+INSERT INTO PERSON VALUES(6,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','1 Yonge','Samuel','Vimes',NULL);
+INSERT INTO PERSON VALUES(7,'Lancre','Ramtops','H0H0H0','Ramtops','1 King','Esmerelda','Weatherwax',NULL);
+INSERT INTO PERSON VALUES(8,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','2 Yonge','Sibyl','Vimes','');
+INSERT INTO PERSON VALUES(9,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','1 University','Mustrum','Ridcully',NULL);
+INSERT INTO PERSON VALUES(10,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','1 King','Angua','von Uberwald',NULL);
+INSERT INTO PERSON VALUES(11,'Lancre','Ramtops','H0H0H0','Ramtops','1 King','Bill','Door',NULL);
+INSERT INTO PERSON VALUES(12,'Ankh Morpork','Ankh Morpork','A0A0A0','Ankh Morpork','1 King','Claude','Dibbler',NULL);
+INSERT INTO EQUIPMENT VALUES(1,'MTN 740 by NordicTrack',1,'MTN');
+INSERT INTO EQUIPMENT VALUES(2,'by Cyberwalk',0,'Omnidirectional');
+INSERT INTO EQUIPMENT VALUES(3,'95T Inclusive by LifeFitness',0,'Inclusive');
+INSERT INTO EQUIPMENT VALUES(4,'FreeMotion s5.6 by NordicTrack',1,'FreeMotion');
+INSERT INTO EQUIPMENT VALUES(5,'by Court Company',2,'Squash');
+INSERT INTO EQUIPMENT VALUES(6,'95T Engage by LifeFitness',0,'Engage');
+INSERT INTO MEMBERSHIP VALUES('GOLD',TRUE,900.0);
+INSERT INTO MEMBERSHIP VALUES('PLATINUM',TRUE,1200.0);
+INSERT INTO MEMBERSHIP VALUES('SILVER',TRUE,600.0);
+INSERT INTO ACCOUNT VALUES(1,0,0,NULL,FALSE,'2010-02-01 00:00:00.833000000','GOLD',8);
+INSERT INTO ACCOUNT VALUES(2,0,0,NULL,FALSE,'2010-02-01 00:00:00.832000000','SILVER',6);
+INSERT INTO ACCOUNT VALUES(3,0,2,NULL,FALSE,'2010-02-01 00:00:00.833000000','GOLD',4);
+INSERT INTO ACCOUNT VALUES(4,0,2,NULL,FALSE,'2010-02-01 00:00:00.833000000','PLATINUM',2);
+INSERT INTO ACCOUNT VALUES(5,0,2,NULL,FALSE,'2010-02-01 00:00:00.833000000','PLATINUM',3);
+INSERT INTO ACCOUNT VALUES(6,0,2,NULL,FALSE,'2010-02-01 00:00:00.833000000','PLATINUM',1);
+INSERT INTO ACCOUNT VALUES(7,0,0,NULL,FALSE,'2010-02-01 00:00:00.833000000','PLATINUM',7);
+INSERT INTO ACCOUNT VALUES(8,0,2,NULL,FALSE,'2010-02-01 00:00:00.833000000','PLATINUM',5);
+INSERT INTO ACCOUNT VALUES(9,0,2,NULL,FALSE,'2010-02-01 00:00:00.834000000','PLATINUM',12);
+INSERT INTO ACCOUNT VALUES(10,0,2,NULL,FALSE,'2010-02-01 00:00:00.834000000','PLATINUM',9);
+INSERT INTO ACCOUNT VALUES(11,0,2,NULL,FALSE,'2010-02-01 00:00:00.834000000','PLATINUM',10);
+INSERT INTO ACCOUNT VALUES(12,0,2,NULL,FALSE,'2010-02-01 00:00:00.834000000','PLATINUM',11);
+INSERT INTO RESERVATION VALUES(1,'2009-05-01 00:00:00.000000000','2009-10-31 00:00:00.000000000',4,2);
+INSERT INTO RESERVATION VALUES(2,'2009-01-01 00:00:00.000000000','2009-12-31 00:00:00.000000000',1,3);
+INSERT INTO RESERVATION VALUES(3,'2009-02-01 00:00:00.000000000','2009-10-31 00:00:00.000000000',2,6);
+INSERT INTO RESERVATION VALUES(4,'2009-07-01 00:00:00.000000000','2009-07-02 00:00:00.000000000',5,1);
+INSERT INTO RESERVATION VALUES(5,'2009-07-01 00:00:00.000000000','2009-07-02 00:00:00.000000000',6,4);
+INSERT INTO RESERVATION VALUES(6,'2009-07-01 00:00:00.000000000','2009-07-02 00:00:00.000000000',3,5);
+INSERT INTO INVOICE VALUES(1,50.0,'2010-02-14 00:00:00.000000000','2010-02-01 00:00:00.000000000', '2010-02-04 00:00:00.000000000',2);
+COMMIT;
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-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/hibernate/test-hibernate.properties 2010-02-09 20:51:34 UTC (rev 100776)
@@ -1 +1 @@
-hibernate.hbm2ddl.auto=create-drop
\ No newline at end of file
+#hibernate.hbm2ddl.auto=validate
\ No newline at end of file
Copied: projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-db-infrastructure.xml (from rev 100767, projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-infrastructure.xml)
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-db-infrastructure.xml (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-db-infrastructure.xml 2010-02-09 20:51:34 UTC (rev 100776)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ 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/context
+ http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/tx
+ http://www.springframework.org/schema/tx/spring-tx.xsd">
+
+ <context:annotation-config/>
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="location" value="classpath:test-context.properties"/>
+ <property name="ignoreUnresolvablePlaceholders" value="true"/>
+ </bean>
+
+
+ <bean id="stayFitDS" class="org.jboss.snowdrop.samples.sportsclub.test.TestDatasourceFactoryBean">
+ <property name="databaseSetupFile" value="classpath:dbsetup.sql"/>
+ <property name="url" value="jdbc:hsqldb:mem:sportsClubDS"/>
+ <property name="driverClassName" value="${sportsclub.db.driver}"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </bean>
+
+</beans>
\ No newline at end of file
Added: projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-hibernate-infrastructure.xml
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-hibernate-infrastructure.xml (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-hibernate-infrastructure.xml 2010-02-09 20:51:34 UTC (rev 100776)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ 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">
+
+ <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
+ <property name="sessionFactory" ref="sessionFactory"/>
+ </bean>
+
+</beans>
Deleted: projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-infrastructure.xml
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-infrastructure.xml 2010-02-09 19:19:29 UTC (rev 100775)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-test-infrastructure/src/main/resources/test-infrastructure.xml 2010-02-09 20:51:34 UTC (rev 100776)
@@ -1,29 +0,0 @@
-<?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: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/tx
- http://www.springframework.org/schema/tx/spring-tx.xsd">
-
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
- <property name="location" value="classpath:test-context.properties"/>
- <property name="ignoreUnresolvablePlaceholders" value="true"/>
- </bean>
-
- <bean id="stayFitDS" class="org.apache.commons.dbcp.BasicDataSource">
- <property name="url" value="jdbc:hsqldb:mem:sportsClubDS"/>
- <property name="driverClassName" value="${sportsclub.db.driver}"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </bean>
-
- <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
-
-</beans>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list