diff --git a/spring-hibernate4/.classpath b/spring-hibernate4/.classpath
index 593395a46e..10115292f4 100644
--- a/spring-hibernate4/.classpath
+++ b/spring-hibernate4/.classpath
@@ -16,6 +16,12 @@
+
+
+
+
+
+
@@ -24,7 +30,6 @@
-
diff --git a/spring-hibernate4/.settings/org.eclipse.wst.common.component b/spring-hibernate4/.settings/org.eclipse.wst.common.component
index 6192602079..59f6da9f95 100644
--- a/spring-hibernate4/.settings/org.eclipse.wst.common.component
+++ b/spring-hibernate4/.settings/org.eclipse.wst.common.component
@@ -4,6 +4,7 @@
+
diff --git a/spring-hibernate4/pom.xml b/spring-hibernate4/pom.xml
index c7171e0acd..61129e1a47 100644
--- a/spring-hibernate4/pom.xml
+++ b/spring-hibernate4/pom.xml
@@ -1,157 +1,164 @@
-
- 4.0.0
- org.baeldung
- spring-hibernate4
- 0.1-SNAPSHOT
+
+ 4.0.0
+ org.baeldung
+ spring-hibernate4
+ 0.1-SNAPSHOT
- spring-hibernate4
- war
+ spring-hibernate4
+ war
-
+
-
+
-
- org.springframework
- spring-web
- ${org.springframework.version}
-
-
- org.springframework
- spring-orm
- ${org.springframework.version}
-
-
- org.springframework
- spring-context
- ${org.springframework.version}
-
+
+ org.springframework
+ spring-web
+ ${org.springframework.version}
+
+
+ org.springframework
+ spring-orm
+ ${org.springframework.version}
+
+
+ org.springframework
+ spring-context
+ ${org.springframework.version}
+
-
+
-
- org.hibernate
- hibernate-core
- 4.2.1.Final
-
-
- org.javassist
- javassist
- 3.17.1-GA
-
-
- mysql
- mysql-connector-java
- 5.1.25
- runtime
-
+
+ org.hibernate
+ hibernate-core
+ 4.2.1.Final
+
+
+ org.javassist
+ javassist
+ 3.17.1-GA
+
+
+ mysql
+ mysql-connector-java
+ 5.1.25
+ runtime
+
-
+
-
- com.google.guava
- guava
- 14.0.1
-
+
+ com.google.guava
+ guava
+ 14.0.1
+
-
+
+
+ org.springframework
+ spring-test
+ ${org.springframework.version}
+ test
+
-
- junit
- junit-dep
- ${junit.version}
- test
-
+
+ junit
+ junit-dep
+ ${junit.version}
+ test
+
-
- org.hamcrest
- hamcrest-core
- ${org.hamcrest.version}
- test
-
-
- org.hamcrest
- hamcrest-library
- ${org.hamcrest.version}
- test
-
+
+ org.hamcrest
+ hamcrest-core
+ ${org.hamcrest.version}
+ test
+
+
+ org.hamcrest
+ hamcrest-library
+ ${org.hamcrest.version}
+ test
+
-
- org.mockito
- mockito-core
- ${mockito.version}
- test
-
+
+ org.mockito
+ mockito-core
+ ${mockito.version}
+ test
+
-
+
-
- spring-hibernate4
-
-
- src/main/resources
- true
-
-
+
+ spring-hibernate4
+
+
+ src/main/resources
+ true
+
+
-
+
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
-
-
-
-
-
-
-
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+
+
+
+
+
+
+
-
- org.codehaus.cargo
- cargo-maven2-plugin
-
- true
-
- jetty8x
- embedded
-
-
-
-
-
-
- 8082
-
-
-
-
+
+ org.codehaus.cargo
+ cargo-maven2-plugin
+
+ true
+
+ jetty8x
+ embedded
+
+
+
+
+
+
+ 8082
+
+
+
+
-
+
-
+
-
-
- 3.2.2.RELEASE
+
+
+ 3.2.2.RELEASE
-
- 1.7.5
- 1.0.11
+
+ 1.7.5
+ 1.0.11
-
- 1.3
- 4.11
- 1.9.5
+
+ 1.3
+ 4.11
+ 1.9.5
- 4.2.4
- 4.2.4
+ 4.2.4
+ 4.2.4
- 1.8.0
- 1.8.9
+ 1.8.0
+ 1.8.9
-
+
\ No newline at end of file
diff --git a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/FooService.java b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/FooService.java
index cda31a0e86..896e2795ff 100644
--- a/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/FooService.java
+++ b/spring-hibernate4/src/main/java/org/baeldung/spring/persistence/service/FooService.java
@@ -3,8 +3,10 @@ package org.baeldung.spring.persistence.service;
import org.baeldung.spring.persistence.dao.IFooDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
@Service
+@Transactional
public class FooService {
@Autowired
diff --git a/spring-hibernate4/src/test/java/org/baeldung/spring/persistence/service/FooServicePersistenceIntegrationTest.java b/spring-hibernate4/src/test/java/org/baeldung/spring/persistence/service/FooServicePersistenceIntegrationTest.java
new file mode 100644
index 0000000000..5d23f5354c
--- /dev/null
+++ b/spring-hibernate4/src/test/java/org/baeldung/spring/persistence/service/FooServicePersistenceIntegrationTest.java
@@ -0,0 +1,13 @@
+package org.baeldung.spring.persistence.service;
+
+import org.baeldung.spring.persistence.config.PersistenceConfig;
+import org.junit.runner.RunWith;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.support.AnnotationConfigContextLoader;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = { PersistenceConfig.class }, loader = AnnotationConfigContextLoader.class)
+public class FooServicePersistenceIntegrationTest {
+ //
+}