diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/Booking.java b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/Booking.java index 1fd33b69..08d498e5 100755 --- a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/Booking.java +++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/Booking.java @@ -9,6 +9,7 @@ import java.util.Date; import javax.persistence.Basic; import javax.persistence.Entity; import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.Temporal; @@ -57,7 +58,7 @@ public class Booking implements Serializable { } @Id - @GeneratedValue + @GeneratedValue(strategy = GenerationType.TABLE) public Long getId() { return id; } diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/JpaBookingService.java b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/JpaBookingService.java index eb59943b..f8b8e5ae 100755 --- a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/JpaBookingService.java +++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/JpaBookingService.java @@ -40,6 +40,7 @@ public class JpaBookingService implements BookingService { @Transactional(readOnly = true) public Booking bookHotel(Hotel hotel, User user) { Booking booking = new Booking(hotel, user); + em.persist(booking); return booking; } diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/services-config-jpa.xml b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/services-config-jpa.xml index 5559dd37..f3cfae27 100755 --- a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/services-config-jpa.xml +++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/services-config-jpa.xml @@ -30,6 +30,9 @@ + + + %n # Enable web flow logging log4j.category.org.springframework.webflow=DEBUG -log4j.category.org.springframework.binding=DEBUG \ No newline at end of file +log4j.category.org.springframework.binding=DEBUG +log4j.category.org.springframework.transaction=DEBUG \ No newline at end of file diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/bookHotel-flow.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/bookHotel-flow.xml index 4a456246..13d7bb94 100755 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/bookHotel-flow.xml +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/bookHotel-flow.xml @@ -18,7 +18,7 @@ - + @@ -30,8 +30,8 @@ - - + + diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/main-flow.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/main-flow.xml index dfd76217..7bfd4d2f 100755 --- a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/main-flow.xml +++ b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/main-flow.xml @@ -27,7 +27,7 @@ - +