diff --git a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/BookingService.java b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/BookingService.java
index 363182ec..5fc793d7 100755
--- a/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/BookingService.java
+++ b/spring-webflow-samples/booking-jsf/src/main/java/org/springframework/webflow/samples/booking/BookingService.java
@@ -11,4 +11,6 @@ public interface BookingService {
public Hotel readHotelById(Long id);
public Booking bookHotel(Hotel hotel, User user);
+
+ public void cancelBooking(Long 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 f8b8e5ae..6cb99058 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
@@ -44,6 +44,14 @@ public class JpaBookingService implements BookingService {
return booking;
}
+ @Transactional
+ public void cancelBooking(Long id) {
+ Booking booking = em.find(Booking.class, id);
+ if (booking != null) {
+ em.remove(booking);
+ }
+ }
+
@PersistenceContext
public void setEntityManager(EntityManager em) {
this.em = em;
diff --git a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/login-flow.xml b/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/login-flow.xml
deleted file mode 100755
index a658e268..00000000
--- a/spring-webflow-samples/booking-jsf/src/main/webapp/WEB-INF/flows/login-flow.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-

- As you can see, Seam makes it easy to work in multiple windows or multiple browser - tabs. But you can even switch between multiple tasks inside a single browser tab! - The "Workspaces" section showcases this advanced feature. -
- - -- When you click "Confirm", the new booking is written to the database, the - conversation ends, and state associated with the conversation is automatically - destroyed by Seam. After you confirm your booking, try hitting the back button - on your web browser and clicking "Confirm" again. Seam makes it easy implement - applications that behave elegantly in response to the back, forward and refresh - buttons. -
- -- Keeping conversational state in memory in the middle tier is a great way to - improve your application's scalability. It saves hitting the database every - time we refresh a page, to re-read the data we were just looking at five - seconds ago. By using Seam's conversation context, we get a natural cache - of data associated with the what the user is currently doing. By nature, - this cache has a more efficient eviction policy than the MRU-type algorithms - used by a typical second-level data cache in an O/R mapping engine like - Hibernate (at least for some kinds of data). Of course, you should use - a clever combination of second-level caching and conversational data - caching to achieve the best performance for your application. -
- - -- State in Seam is contextual. When you click "Find Hotels", the application - retrieves a list of hotels from the database and caches it in the session context. When you - navigate to one of the hotel records by clicking the "View Hotel" link, a conversation - begins. The conversation is attached to a particular tab, in a particular browser window. You can - navigate to multiple hotels using "open in new tab" or "open in new window" in your web browser. - Each window will execute in the context of a different conversation. The application keeps state - associated with your hotel booking in the conversation context, which ensures that the concurrent - conversations do not interfere with each other. -
- - - -
- This sample application demonstrates how easy it is to develop stateful web - applications using Spring Web Flow. Just register, login, and book a room to see - SWF in action. -
- -- Note: Please do NOT enter personal information or your credit card number in - this sample application. -
-- Book Hotels (launch with a regular anchor tag) + Book Hotels (launch with a regular anchor tag)
-- This Spring Web Flow sample application is the JSF-based version of the familiar "Sell item" sample. - It illustrates the following concepts: -
-- (And so should some complex things.) You shouldn't have to write four different classes - just to change a password. Traditional J2EE architectures require that developers spend - more time writing code to make the frameworks happy, than they ever get to spend writing - code to make the user happy. Seam lets you reduce the size of your code dramatically. - And that reduces bugs. And it makes refactoring easier. And it makes delivering new - functionality quicker. Productivity matters. But with Seam, JSF, EJB 3.0 and jBPM, you - don't need to sacrifice the ability to handle complex problems just to achieve great - productivity. -
-

