Chapter 8. JBoss Seam and [fleXive]

Table of Contents

Integration guide
Programming [fleXive] in Seam
Authorization and Authentication

JBoss Seam is a widespread framework for rapid development of applications with JavaEE 5. It provides a neat wrapper around JSF and EJB that removes most of the "glue code" prevalent in many JSF applications that use EJB. Main features include a close integration of EJB persistence (JPA), a conversation scope for JSF, or business process management via jBPM.

This chapter is a quick guide to integrating [fleXive] into an existing Seam application.

Integration guide

To integrate [fleXive] with Seam, you need to

  1. modify your build file to add the [fleXive] libraries to the packages EAR file, and

  2. modify your web.xml and application.xml deployment descriptors.

Both tasks shouldn't take you more than a few minutes, and both are easy to undo.

First of all, you need unpack a [fleXive] distribution as described in Chapter 4, Writing [fleXive] applications . You don't need to actually start [fleXive], but you need access to the distribution directory.

When you have a local [fleXive] distribution installed, go to you Seam project directory and perform the following tasks:

To test if the [fleXive] integration was sucessful, add the following code snippet to one of your front-end pages:

#{fxSystemBean.buildInfoVerbose}

It should render the [fleXive] version and build number. If no text is rendered, please check the logfile for error messages during the application startup. [fleXive] writes several status log messages on application startup, so you should see at least some messages originating from [fleXive].

When using [fleXive] UI tags on your pages, be sure to declare the fx namespace in your XHTML root element:

xmlns:fx="http://www.flexive.com/jsf/core"