6. A Simple Stateful Application

In Chapter 5, An Introduction to Stateful Framework, we discussed the benefits of automatic state management in Seam. We mentioned that the “conversation” stateful context is probably the most important for most web application developers. However, the conversation context is also a little difficult to grasp for beginners. To make the learning curve as gentle as possible, let’s start from the stateful context everyone is already familiar with—the HTTP session context. In this chapter, we describe how a Seam stateful component is declared, constructed, and managed.

To illustrate how a stateful component works, we refactor the hello world example from Chapter 2, Seam Hello World, into a stateful three-page application. ...

Get JBoss® Seam: Simplicity and Power Beyond Java™ EE now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.