Seam SVN: r7264 - trunk/doc/reference/en.
by seam-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2008-01-28 16:44:12 -0500 (Mon, 28 Jan 2008)
New Revision: 7264
Added:
trunk/doc/reference/en/master.xml
Log:
reverted back from deleted master.xml
and updated with websphere chapter.
Copied: trunk/doc/reference/en/master.xml (from rev 7262, trunk/doc/reference/en/master.xml)
===================================================================
--- trunk/doc/reference/en/master.xml (rev 0)
+++ trunk/doc/reference/en/master.xml 2008-01-28 21:44:12 UTC (rev 7264)
@@ -0,0 +1,377 @@
+<?xml version='1.0' encoding="iso-8859-1"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+ "../support/docbook-dtd/docbookx.dtd"
+[
+<!ENTITY tutorial SYSTEM "modules/tutorial.xml">
+<!ENTITY gettingstarted SYSTEM "modules/gettingstarted.xml">
+<!ENTITY concepts SYSTEM "modules/concepts.xml">
+<!ENTITY xml SYSTEM "modules/xml.xml">
+<!ENTITY events SYSTEM "modules/events.xml">
+<!ENTITY conversations SYSTEM "modules/conversations.xml">
+<!ENTITY jbpm SYSTEM "modules/jbpm.xml">
+<!ENTITY persistence SYSTEM "modules/persistence.xml">
+<!ENTITY validation SYSTEM "modules/validation.xml">
+<!ENTITY groovy SYSTEM "modules/groovy.xml">
+<!ENTITY framework SYSTEM "modules/framework.xml">
+<!ENTITY drools SYSTEM "modules/drools.xml">
+<!ENTITY security SYSTEM "modules/security.xml">
+<!ENTITY i18n SYSTEM "modules/i18n.xml">
+<!ENTITY text SYSTEM "modules/text.xml">
+<!ENTITY itext SYSTEM "modules/itext.xml">
+<!ENTITY mail SYSTEM "modules/mail.xml">
+<!ENTITY jms SYSTEM "modules/jms.xml">
+<!ENTITY cache SYSTEM "modules/cache.xml">
+<!ENTITY webservices SYSTEM "modules/webservices.xml">
+<!ENTITY remoting SYSTEM "modules/remoting.xml">
+<!ENTITY gwt SYSTEM "modules/gwt.xml">
+<!ENTITY spring SYSTEM "modules/spring.xml">
+<!ENTITY hsearch SYSTEM "modules/hsearch.xml">
+<!ENTITY configuration SYSTEM "modules/configuration.xml">
+<!ENTITY annotations SYSTEM "modules/annotations.xml">
+<!ENTITY components SYSTEM "modules/components.xml">
+<!ENTITY controls SYSTEM "modules/controls.xml">
+<!ENTITY elenhancements SYSTEM "modules/elenhancements.xml">
+<!ENTITY testing SYSTEM "modules/testing.xml">
+<!ENTITY tools SYSTEM "modules/tools.xml">
+<!ENTITY oc4j SYSTEM "modules/oc4j.xml">
+<!ENTITY weblogic SYSTEM "modules/weblogic.xml">
+<!ENTITY websphere SYSTEM "modules/websphere.xml">
+<!ENTITY dependencies SYSTEM "modules/dependencies.xml">
+]>
+
+<book lang="en">
+ <bookinfo>
+ <title>Seam - Contextual Components</title>
+ <subtitle>A Framework for Enterprise Java</subtitle>
+ <releaseinfo>@version@</releaseinfo>
+ </bookinfo>
+
+ <toc/>
+
+ <preface>
+ <title>Introduction to JBoss Seam</title>
+
+ <para>
+ Seam is an application framework for Enterprise Java. It is inspired by the following principles:
+ </para>
+
+ <variablelist>
+
+ <varlistentry>
+ <term><emphasis>One kind of "stuff"</emphasis></term>
+ <listitem>
+ <para>
+ Seam defines a uniform component model for all business logic in your application.
+ A Seam component may be stateful, with the state associated with any one of several
+ well-defined contexts, including the long-running, persistent, <emphasis>business process
+ context</emphasis> and the <emphasis>conversation context</emphasis>, which is
+ preserved across multiple web requests in a user interaction.
+ </para>
+ <para>
+ There is no distinction between presentation tier components and business logic
+ components in Seam. You can layer your application according to whatever architecture
+ you devise, rather than being forced to shoehorn your application logic into an
+ unnatural layering scheme forced upon you by whatever combination of stovepipe
+ frameworks you're using today.
+ </para>
+ <para>
+ Unlike plain Java EE or J2EE components, Seam components may <emphasis>simultaneously</emphasis>
+ access state associated with the web request and state held in transactional resources (without
+ the need to propagate web request state manually via method parameters). You might object
+ that the application layering imposed upon you by the old J2EE platform was a Good Thing.
+ Well, nothing stops you creating an equivalent layered architecture using Seam—the difference
+ is that <emphasis>you</emphasis> get to architect your own application and decide what the
+ layers are and how they work together.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>Integrate JSF with EJB 3.0</emphasis></term>
+ <listitem>
+ <para>
+ JSF and EJB 3.0 are two of the best new features of Java EE 5. EJB3 is a brand new
+ component model for server side business and persistence logic. Meanwhile, JSF is a
+ great component model for the presentation tier. Unfortunately, neither component
+ model is able to solve all problems in computing by itself. Indeed, JSF and EJB3
+ work best used together. But the Java EE 5 specification provides no standard way
+ to integrate the two component models. Fortunately, the creators of both models
+ foresaw this situation and provided standard extension points to allow extension
+ and integration with other frameworks.
+ </para>
+ <para>
+ Seam unifies the component models of JSF and EJB3, eliminating glue code, and letting
+ the developer think about the business problem.
+ </para>
+ <para>
+ It is possible to write Seam applications where "everything" is an EJB. This may come
+ as a surprise if you're used to thinking of EJBs as coarse-grained, so-called
+ "heavyweight" objects. However, version 3.0 has completely changed the nature of EJB
+ from the point of view of the developer. An EJB is a fine-grained object—nothing
+ more complex than an annotated JavaBean. Seam even encourages you to use session beans
+ as JSF action listeners!
+ </para>
+ <para>
+ On the other hand, if you prefer not to adopt EJB 3.0 at this time, you don't have to.
+ Virtually any Java class may be a Seam component, and Seam provides all the functionality
+ that you expect from a "lightweight" container, and more, for any component, EJB or
+ otherwise.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>Integrated AJAX</emphasis></term>
+ <listitem>
+ <para>
+ Seam supports the best open source JSF-based AJAX solutions: JBoss RichFaces and
+ ICEfaces. These solutions let you add AJAX capability to your user interface without
+ the need to write any JavaScript code.
+ </para>
+ <para>
+ Alternatively, Seam provides a built-in JavaScript remoting layer that lets you call
+ components asynchronously from client-side JavaScript without the need for an intermediate
+ action layer. You can even subscribe to server-side JMS topics and receive messages via AJAX
+ push.
+ </para>
+ <para>
+ Neither of these approaches would work well, were it not for Seam's built-in concurrency
+ and state management, which ensures that many concurrent fine-grained, asynchronous AJAX
+ requests are handled safely and efficiently on the server side.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>Business process as a first class construct</emphasis></term>
+ <listitem>
+ <para>
+ Optionally, Seam provides transparent business process management via jBPM. You won't
+ believe how easy it is to implement complex workflows, collaboration and and task management
+ using jBPM and Seam.
+ </para>
+ <para>
+ Seam even allows you to define presentation tier pageflow using the same language (jPDL)
+ that jBPM uses for business process definition.
+ </para>
+ <para>
+ JSF provides an incredibly rich event model for the presentation tier. Seam enhances this
+ model by exposing jBPM's business process related events via exactly the same event handling
+ mechanism, providing a uniform event model for Seam's uniform component model.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>Declarative state management</emphasis></term>
+ <listitem>
+ <para>
+ We're all used to the concept of declarative transaction management and declarative
+ security from the early days of EJB. EJB 3.0 even introduces declarative persistence context
+ management. These are three examples of a broader problem of managing state that is
+ associated with a particular <emphasis>context</emphasis>, while ensuring that all needed
+ cleanup occurs when the context ends. Seam takes the concept of declarative state
+ management much further and applies it to <emphasis>application state</emphasis>.
+ Traditionally, J2EE applications implement state management manually, by getting
+ and setting servlet session and request attributes. This approach to state management is the
+ source of many bugs and memory leaks when applications fail to clean up session attributes,
+ or when session data associated with different workflows collides in a multi-window
+ application. Seam has the potential to almost entirely eliminate this class of bugs.
+ </para>
+ <para>
+ Declarative application state management is made possible by the richness of the
+ <emphasis>context model</emphasis> defined by Seam. Seam extends the context model defined
+ by the servlet spec—request, session, application—with two new
+ contexts—conversation and business process—that are more meaningful from the
+ point of view of the business logic.
+ </para>
+ <para>
+ You'll be amazed at how many things become easier once you start using conversations.
+ Have you ever suffered pain dealing with lazy association fetching in an ORM solution
+ like Hibernate or JPA? Seam's conversation-scoped persistence contexts mean you'll
+ rarely have to see a <literal>LazyInitializationException</literal>. Have you ever
+ had problems with the refresh button? The back button? With duplicate form submission?
+ With propagating messages across a post-then-redirect? Seam's conversation management
+ solves these problems without you even needing to really think about them. They're all
+ symptoms of the broken state management architecture that has been prevalent since the
+ earliest days of the web.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>Bijection</emphasis></term>
+ <listitem>
+ <para>
+ The notion of <emphasis>Inversion of Control</emphasis> or <emphasis>dependency injection</emphasis>
+ exists in both JSF and EJB3, as well as in numerous so-called "lightweight containers". Most of
+ these containers emphasize injection of components that implement <emphasis>stateless services</emphasis>.
+ Even when injection of stateful components is supported (such as in JSF), it is virtually useless
+ for handling application state because the scope of the stateful component cannot be defined with
+ sufficient flexibility, and because components belonging to wider scopes may not be injected into
+ components belonging to narrower scopes.
+ </para>
+ <para>
+ <emphasis>Bijection</emphasis> differs from IoC in that it is <emphasis>dynamic</emphasis>,
+ <emphasis>contextual</emphasis>, and <emphasis>bidirectional</emphasis>.
+ You can think of it as a mechanism for aliasing contextual variables (names in the various contexts
+ bound to the current thread) to attributes of the component. Bijection allows auto-assembly of stateful
+ components by the container. It even allows a component to safely and easily manipulate the
+ value of a context variable, just by assigning it to an attribute of the component.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>Workspace management and multi-window browsing</emphasis></term>
+ <listitem>
+ <para>
+ Seam applications let the user freely switch between multiple browser tabs, each associated with a
+ different, safely isolated, conversation. Applications may even take advantage of <emphasis>workspace
+ management</emphasis>, allowing the user to switch between conversations (workspaces) in a single
+ browser tab. Seam provides not only correct multi-window operation, but also multi-window-like
+ operation in a single window!
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>Prefer annotations to XML</emphasis></term>
+ <listitem>
+ <para>
+ Traditionally, the Java community has been in a state of deep confusion about precisely
+ what kinds of meta-information counts as configuration. J2EE and popular "lightweight"
+ containers have provided XML-based deployment descriptors both for things which are
+ truly configurable between different deployments of the system, and for any other kinds
+ or declaration which can not easily be expressed in Java. Java 5 annotations changed
+ all this.
+ </para>
+ <para>
+ EJB 3.0 embraces annotations and "configuration by exception" as the easiest way to provide
+ information to the container in a declarative form. Unfortunately, JSF is still heavily
+ dependent on verbose XML configuration files. Seam extends the annotations provided by
+ EJB 3.0 with a set of annotations for declarative state management and declarative
+ context demarcation. This lets you eliminate the noisy JSF managed bean declarations
+ and reduce the required XML to just that information which truly belongs in XML
+ (the JSF navigation rules).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>Integration testing is easy</emphasis></term>
+ <listitem>
+ <para>
+ Seam components, being plain Java classes, are by nature unit testable. But for complex applications,
+ unit testing alone is insufficient. Integration testing has traditionally been a messy and
+ difficult task for Java web applications. Therefore, Seam provides for testability of Seam
+ applications as a core feature of the framework. You can easily write JUnit or TestNG tests
+ that reproduce a whole interaction with a user, exercising all components of the system
+ apart from the view (the JSP or Facelets page). You can run these tests directly inside your
+ IDE, where Seam will automatically deploy EJB components using JBoss Embedded.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>The specs ain't perfect</emphasis></term>
+ <listitem>
+ <para>
+ We think the latest incarnation of Java EE is great. But we know it's never going to be
+ perfect. Where there are holes in the specifications (for example, limitations in the
+ JSF lifecycle for GET requests), Seam fixes them. And the authors of Seam are working
+ with the JCP expert groups to make sure those fixes make their way back into the next
+ revision of the standards.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>There's more to a web application than serving HTML pages</emphasis></term>
+ <listitem>
+ <para>
+ Today's web frameworks think too small. They let you get user input off a form and
+ into your Java objects. And then they leave you hanging. A truly complete web application
+ framework should address problems like persistence, concurrency, asynchronicity, state
+ management, security, email, messaging, PDF and chart generation, workflow, wikitext
+ rendering, webservices, caching and more. Once you scratch the surface of Seam, you'll
+ be amazed at how many problems become simpler...
+ </para>
+ <para>
+ Seam integrates JPA and Hibernate3 for persistence, the EJB Timer Service and Quartz
+ for lightweight asychronicity, jBPM for workflow, JBoss Rules for business rules, Meldware
+ Mail for email, Hibernate Search and Lucene for full text search, JMS for messaging and JBoss
+ Cache for page fragment caching. Seam layers an innovative rule-based security framework over
+ JAAS and JBoss Rules. There's even JSF tag libraries for rendering PDF, outgoing email, charts
+ and wikitext. Seam components may be called synchronously as a Web Service, asynchronously
+ from client-side JavaScript or Google Web Toolkit or, of course, directly from JSF.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><emphasis>Get started now!</emphasis></term>
+ <listitem>
+ <para>
+ Seam works in any Java EE application server, and even works in Tomcat. If your environment
+ supports EJB 3.0, great! If it doesn't, no problem, you can use Seam's built-in transaction
+ management with JPA or Hibernate3 for persistence. Or, you can deploy JBoss Embedded in
+ Tomcat, and get full support for EJB 3.0.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/architecture.png" align="center"/>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata fileref="../shared/images/architecture.png" align="center"/>
+ </imageobject>
+ </mediaobject>
+
+ <para>
+ It turns out that the combination of Seam, JSF and EJB3 is <emphasis>the</emphasis> simplest way
+ to write a complex web application in Java. You won't believe how little code is required!
+ </para>
+
+ </preface>
+
+ &tutorial;
+ &gettingstarted;
+ &concepts;
+ &xml;
+ &events;
+ &conversations;
+ &jbpm;
+ &persistence;
+ &validation;
+ &groovy;
+ &framework;
+ &drools;
+ &security;
+ &i18n;
+ &text;
+ &itext;
+ &mail;
+ &jms;
+ &cache;
+ &webservices;
+ &remoting;
+ &gwt;
+ &spring;
+ &hsearch;
+ &configuration;
+ &oc4j;
+ &weblogic;
+ &websphere;
+ &annotations;
+ &components;
+ &controls;
+ &elenhancements;
+ &testing;
+ &tools;
+ &dependencies;
+</book>
+
Property changes on: trunk/doc/reference/en/master.xml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
16 years, 11 months
Seam SVN: r7263 - trunk/doc/reference/en.
by seam-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2008-01-28 16:26:54 -0500 (Mon, 28 Jan 2008)
New Revision: 7263
Removed:
trunk/doc/reference/en/master.xml
Log:
added websphere chapter
Deleted: trunk/doc/reference/en/master.xml
===================================================================
--- trunk/doc/reference/en/master.xml 2008-01-28 21:02:44 UTC (rev 7262)
+++ trunk/doc/reference/en/master.xml 2008-01-28 21:26:54 UTC (rev 7263)
@@ -1,375 +0,0 @@
-<?xml version='1.0' encoding="iso-8859-1"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
- "../support/docbook-dtd/docbookx.dtd"
-[
-<!ENTITY tutorial SYSTEM "modules/tutorial.xml">
-<!ENTITY gettingstarted SYSTEM "modules/gettingstarted.xml">
-<!ENTITY concepts SYSTEM "modules/concepts.xml">
-<!ENTITY xml SYSTEM "modules/xml.xml">
-<!ENTITY events SYSTEM "modules/events.xml">
-<!ENTITY conversations SYSTEM "modules/conversations.xml">
-<!ENTITY jbpm SYSTEM "modules/jbpm.xml">
-<!ENTITY persistence SYSTEM "modules/persistence.xml">
-<!ENTITY validation SYSTEM "modules/validation.xml">
-<!ENTITY groovy SYSTEM "modules/groovy.xml">
-<!ENTITY framework SYSTEM "modules/framework.xml">
-<!ENTITY drools SYSTEM "modules/drools.xml">
-<!ENTITY security SYSTEM "modules/security.xml">
-<!ENTITY i18n SYSTEM "modules/i18n.xml">
-<!ENTITY text SYSTEM "modules/text.xml">
-<!ENTITY itext SYSTEM "modules/itext.xml">
-<!ENTITY mail SYSTEM "modules/mail.xml">
-<!ENTITY jms SYSTEM "modules/jms.xml">
-<!ENTITY cache SYSTEM "modules/cache.xml">
-<!ENTITY webservices SYSTEM "modules/webservices.xml">
-<!ENTITY remoting SYSTEM "modules/remoting.xml">
-<!ENTITY gwt SYSTEM "modules/gwt.xml">
-<!ENTITY spring SYSTEM "modules/spring.xml">
-<!ENTITY hsearch SYSTEM "modules/hsearch.xml">
-<!ENTITY configuration SYSTEM "modules/configuration.xml">
-<!ENTITY annotations SYSTEM "modules/annotations.xml">
-<!ENTITY components SYSTEM "modules/components.xml">
-<!ENTITY controls SYSTEM "modules/controls.xml">
-<!ENTITY elenhancements SYSTEM "modules/elenhancements.xml">
-<!ENTITY testing SYSTEM "modules/testing.xml">
-<!ENTITY tools SYSTEM "modules/tools.xml">
-<!ENTITY oc4j SYSTEM "modules/oc4j.xml">
-<!ENTITY weblogic SYSTEM "modules/weblogic.xml">
-<!ENTITY dependencies SYSTEM "modules/dependencies.xml">
-]>
-
-<book lang="en">
- <bookinfo>
- <title>Seam - Contextual Components</title>
- <subtitle>A Framework for Enterprise Java</subtitle>
- <releaseinfo>@version@</releaseinfo>
- </bookinfo>
-
- <toc/>
-
- <preface>
- <title>Introduction to JBoss Seam</title>
-
- <para>
- Seam is an application framework for Enterprise Java. It is inspired by the following principles:
- </para>
-
- <variablelist>
-
- <varlistentry>
- <term><emphasis>One kind of "stuff"</emphasis></term>
- <listitem>
- <para>
- Seam defines a uniform component model for all business logic in your application.
- A Seam component may be stateful, with the state associated with any one of several
- well-defined contexts, including the long-running, persistent, <emphasis>business process
- context</emphasis> and the <emphasis>conversation context</emphasis>, which is
- preserved across multiple web requests in a user interaction.
- </para>
- <para>
- There is no distinction between presentation tier components and business logic
- components in Seam. You can layer your application according to whatever architecture
- you devise, rather than being forced to shoehorn your application logic into an
- unnatural layering scheme forced upon you by whatever combination of stovepipe
- frameworks you're using today.
- </para>
- <para>
- Unlike plain Java EE or J2EE components, Seam components may <emphasis>simultaneously</emphasis>
- access state associated with the web request and state held in transactional resources (without
- the need to propagate web request state manually via method parameters). You might object
- that the application layering imposed upon you by the old J2EE platform was a Good Thing.
- Well, nothing stops you creating an equivalent layered architecture using Seam—the difference
- is that <emphasis>you</emphasis> get to architect your own application and decide what the
- layers are and how they work together.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><emphasis>Integrate JSF with EJB 3.0</emphasis></term>
- <listitem>
- <para>
- JSF and EJB 3.0 are two of the best new features of Java EE 5. EJB3 is a brand new
- component model for server side business and persistence logic. Meanwhile, JSF is a
- great component model for the presentation tier. Unfortunately, neither component
- model is able to solve all problems in computing by itself. Indeed, JSF and EJB3
- work best used together. But the Java EE 5 specification provides no standard way
- to integrate the two component models. Fortunately, the creators of both models
- foresaw this situation and provided standard extension points to allow extension
- and integration with other frameworks.
- </para>
- <para>
- Seam unifies the component models of JSF and EJB3, eliminating glue code, and letting
- the developer think about the business problem.
- </para>
- <para>
- It is possible to write Seam applications where "everything" is an EJB. This may come
- as a surprise if you're used to thinking of EJBs as coarse-grained, so-called
- "heavyweight" objects. However, version 3.0 has completely changed the nature of EJB
- from the point of view of the developer. An EJB is a fine-grained object—nothing
- more complex than an annotated JavaBean. Seam even encourages you to use session beans
- as JSF action listeners!
- </para>
- <para>
- On the other hand, if you prefer not to adopt EJB 3.0 at this time, you don't have to.
- Virtually any Java class may be a Seam component, and Seam provides all the functionality
- that you expect from a "lightweight" container, and more, for any component, EJB or
- otherwise.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><emphasis>Integrated AJAX</emphasis></term>
- <listitem>
- <para>
- Seam supports the best open source JSF-based AJAX solutions: JBoss RichFaces and
- ICEfaces. These solutions let you add AJAX capability to your user interface without
- the need to write any JavaScript code.
- </para>
- <para>
- Alternatively, Seam provides a built-in JavaScript remoting layer that lets you call
- components asynchronously from client-side JavaScript without the need for an intermediate
- action layer. You can even subscribe to server-side JMS topics and receive messages via AJAX
- push.
- </para>
- <para>
- Neither of these approaches would work well, were it not for Seam's built-in concurrency
- and state management, which ensures that many concurrent fine-grained, asynchronous AJAX
- requests are handled safely and efficiently on the server side.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><emphasis>Business process as a first class construct</emphasis></term>
- <listitem>
- <para>
- Optionally, Seam provides transparent business process management via jBPM. You won't
- believe how easy it is to implement complex workflows, collaboration and and task management
- using jBPM and Seam.
- </para>
- <para>
- Seam even allows you to define presentation tier pageflow using the same language (jPDL)
- that jBPM uses for business process definition.
- </para>
- <para>
- JSF provides an incredibly rich event model for the presentation tier. Seam enhances this
- model by exposing jBPM's business process related events via exactly the same event handling
- mechanism, providing a uniform event model for Seam's uniform component model.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><emphasis>Declarative state management</emphasis></term>
- <listitem>
- <para>
- We're all used to the concept of declarative transaction management and declarative
- security from the early days of EJB. EJB 3.0 even introduces declarative persistence context
- management. These are three examples of a broader problem of managing state that is
- associated with a particular <emphasis>context</emphasis>, while ensuring that all needed
- cleanup occurs when the context ends. Seam takes the concept of declarative state
- management much further and applies it to <emphasis>application state</emphasis>.
- Traditionally, J2EE applications implement state management manually, by getting
- and setting servlet session and request attributes. This approach to state management is the
- source of many bugs and memory leaks when applications fail to clean up session attributes,
- or when session data associated with different workflows collides in a multi-window
- application. Seam has the potential to almost entirely eliminate this class of bugs.
- </para>
- <para>
- Declarative application state management is made possible by the richness of the
- <emphasis>context model</emphasis> defined by Seam. Seam extends the context model defined
- by the servlet spec—request, session, application—with two new
- contexts—conversation and business process—that are more meaningful from the
- point of view of the business logic.
- </para>
- <para>
- You'll be amazed at how many things become easier once you start using conversations.
- Have you ever suffered pain dealing with lazy association fetching in an ORM solution
- like Hibernate or JPA? Seam's conversation-scoped persistence contexts mean you'll
- rarely have to see a <literal>LazyInitializationException</literal>. Have you ever
- had problems with the refresh button? The back button? With duplicate form submission?
- With propagating messages across a post-then-redirect? Seam's conversation management
- solves these problems without you even needing to really think about them. They're all
- symptoms of the broken state management architecture that has been prevalent since the
- earliest days of the web.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><emphasis>Bijection</emphasis></term>
- <listitem>
- <para>
- The notion of <emphasis>Inversion of Control</emphasis> or <emphasis>dependency injection</emphasis>
- exists in both JSF and EJB3, as well as in numerous so-called "lightweight containers". Most of
- these containers emphasize injection of components that implement <emphasis>stateless services</emphasis>.
- Even when injection of stateful components is supported (such as in JSF), it is virtually useless
- for handling application state because the scope of the stateful component cannot be defined with
- sufficient flexibility, and because components belonging to wider scopes may not be injected into
- components belonging to narrower scopes.
- </para>
- <para>
- <emphasis>Bijection</emphasis> differs from IoC in that it is <emphasis>dynamic</emphasis>,
- <emphasis>contextual</emphasis>, and <emphasis>bidirectional</emphasis>.
- You can think of it as a mechanism for aliasing contextual variables (names in the various contexts
- bound to the current thread) to attributes of the component. Bijection allows auto-assembly of stateful
- components by the container. It even allows a component to safely and easily manipulate the
- value of a context variable, just by assigning it to an attribute of the component.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><emphasis>Workspace management and multi-window browsing</emphasis></term>
- <listitem>
- <para>
- Seam applications let the user freely switch between multiple browser tabs, each associated with a
- different, safely isolated, conversation. Applications may even take advantage of <emphasis>workspace
- management</emphasis>, allowing the user to switch between conversations (workspaces) in a single
- browser tab. Seam provides not only correct multi-window operation, but also multi-window-like
- operation in a single window!
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><emphasis>Prefer annotations to XML</emphasis></term>
- <listitem>
- <para>
- Traditionally, the Java community has been in a state of deep confusion about precisely
- what kinds of meta-information counts as configuration. J2EE and popular "lightweight"
- containers have provided XML-based deployment descriptors both for things which are
- truly configurable between different deployments of the system, and for any other kinds
- or declaration which can not easily be expressed in Java. Java 5 annotations changed
- all this.
- </para>
- <para>
- EJB 3.0 embraces annotations and "configuration by exception" as the easiest way to provide
- information to the container in a declarative form. Unfortunately, JSF is still heavily
- dependent on verbose XML configuration files. Seam extends the annotations provided by
- EJB 3.0 with a set of annotations for declarative state management and declarative
- context demarcation. This lets you eliminate the noisy JSF managed bean declarations
- and reduce the required XML to just that information which truly belongs in XML
- (the JSF navigation rules).
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><emphasis>Integration testing is easy</emphasis></term>
- <listitem>
- <para>
- Seam components, being plain Java classes, are by nature unit testable. But for complex applications,
- unit testing alone is insufficient. Integration testing has traditionally been a messy and
- difficult task for Java web applications. Therefore, Seam provides for testability of Seam
- applications as a core feature of the framework. You can easily write JUnit or TestNG tests
- that reproduce a whole interaction with a user, exercising all components of the system
- apart from the view (the JSP or Facelets page). You can run these tests directly inside your
- IDE, where Seam will automatically deploy EJB components using JBoss Embedded.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><emphasis>The specs ain't perfect</emphasis></term>
- <listitem>
- <para>
- We think the latest incarnation of Java EE is great. But we know it's never going to be
- perfect. Where there are holes in the specifications (for example, limitations in the
- JSF lifecycle for GET requests), Seam fixes them. And the authors of Seam are working
- with the JCP expert groups to make sure those fixes make their way back into the next
- revision of the standards.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><emphasis>There's more to a web application than serving HTML pages</emphasis></term>
- <listitem>
- <para>
- Today's web frameworks think too small. They let you get user input off a form and
- into your Java objects. And then they leave you hanging. A truly complete web application
- framework should address problems like persistence, concurrency, asynchronicity, state
- management, security, email, messaging, PDF and chart generation, workflow, wikitext
- rendering, webservices, caching and more. Once you scratch the surface of Seam, you'll
- be amazed at how many problems become simpler...
- </para>
- <para>
- Seam integrates JPA and Hibernate3 for persistence, the EJB Timer Service and Quartz
- for lightweight asychronicity, jBPM for workflow, JBoss Rules for business rules, Meldware
- Mail for email, Hibernate Search and Lucene for full text search, JMS for messaging and JBoss
- Cache for page fragment caching. Seam layers an innovative rule-based security framework over
- JAAS and JBoss Rules. There's even JSF tag libraries for rendering PDF, outgoing email, charts
- and wikitext. Seam components may be called synchronously as a Web Service, asynchronously
- from client-side JavaScript or Google Web Toolkit or, of course, directly from JSF.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><emphasis>Get started now!</emphasis></term>
- <listitem>
- <para>
- Seam works in any Java EE application server, and even works in Tomcat. If your environment
- supports EJB 3.0, great! If it doesn't, no problem, you can use Seam's built-in transaction
- management with JPA or Hibernate3 for persistence. Or, you can deploy JBoss Embedded in
- Tomcat, and get full support for EJB 3.0.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/architecture.png" align="center"/>
- </imageobject>
- <imageobject role="html">
- <imagedata fileref="../shared/images/architecture.png" align="center"/>
- </imageobject>
- </mediaobject>
-
- <para>
- It turns out that the combination of Seam, JSF and EJB3 is <emphasis>the</emphasis> simplest way
- to write a complex web application in Java. You won't believe how little code is required!
- </para>
-
- </preface>
-
- &tutorial;
- &gettingstarted;
- &concepts;
- &xml;
- &events;
- &conversations;
- &jbpm;
- &persistence;
- &validation;
- &groovy;
- &framework;
- &drools;
- &security;
- &i18n;
- &text;
- &itext;
- &mail;
- &jms;
- &cache;
- &webservices;
- &remoting;
- &gwt;
- &spring;
- &hsearch;
- &configuration;
- &oc4j;
- &weblogic;
- &annotations;
- &components;
- &controls;
- &elenhancements;
- &testing;
- &tools;
- &dependencies;
-</book>
-
16 years, 11 months
Seam SVN: r7262 - trunk/doc/reference/en/modules.
by seam-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2008-01-28 16:02:44 -0500 (Mon, 28 Jan 2008)
New Revision: 7262
Added:
trunk/doc/reference/en/modules/websphere.xml
Log:
Initial implementation of Websphere chapter
Added: trunk/doc/reference/en/modules/websphere.xml
===================================================================
--- trunk/doc/reference/en/modules/websphere.xml (rev 0)
+++ trunk/doc/reference/en/modules/websphere.xml 2008-01-28 21:02:44 UTC (rev 7262)
@@ -0,0 +1,946 @@
+<chapter id="websphere">
+ <title>Seam on IBM's Websphere</title>
+
+ <para>Websphere 6.1.x is IBM's application server offering. The latest
+ release is 6.1.0.13 which does not have <literal>EJB3</literal> or
+ <literal>JEE5</literal> support. There is a recently released (Nov 07)
+ <literal>EJB3</literal> feature pack which provides some support for
+ <literal>EJB3</literal> and <literal>JPA</literal>. Currently there
+ is no true <literal>JEE5</literal> offering from IBM. This causes some
+ issues with Seam integration with applications that use EJB3.</para>
+
+ <para>First we will go over some basic information about the Websphere
+ environment that we used for these examples. After a good deal of research
+ and work we were able to get EJB3 applications to function correctly. We will
+ go over the details of those steps with the jee5 example. We will also deploy
+ the the JPA example application. </para>
+
+ <section>
+ <title>Websphere environment and deployment information</title>
+
+ <para>Websphere is a commercial product and so we will not discuss the
+ details of its installation other than to say follow the directions
+ provided by your particular installation type and license. This
+ section will detail the exact server versions used, installation tips,
+ and some custom properties that are needed for all of the
+ examples.</para>
+
+ <section>
+ <title>Installation versions and tips</title>
+ <para>All of the examples and information in this chapter are based on
+ the the latest version of Websphere at the time of this writing.
+ <itemizedlist>
+ <listitem>
+ <para><ulink
+ url="http://www.ibm.com/developerworks/websphere/zones/was/">
+ Websphere Application Server 6.1.0.13</ulink></para>
+ </listitem>
+ <listitem>
+ <para><ulink
+ url="http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg21287579">
+ Feature Pack for EJB 3.0 for Websphere Application Server
+ V6.1 (3.0.6.1.0.13)</ulink></para>
+ </listitem>
+ </itemizedlist> </para>
+
+ <para>The EJB3 feature pack that we installed came with the 6.1.0.13
+ patch version of Websphere. Installing the feature pack does not
+ ensure that your server will have the proper environment for EJB3
+ applications. Be sure that as part of the installation of the feature
+ pack you follow the instructions to create a new server
+ profile with the EJB3 feature pack enabled, or augment one of your
+ existing ones. This can also be done after the installation
+ by running the profile managment tool.</para>
+ </section>
+
+ <section>
+ <title>Required custom properties</title>
+ <para>There are a couple of Websphere custom properties that are required
+ for Seam integration. These properties are not needed specifically
+ for seam, but work around some issues with Websphere. These are
+ set following the instructions here : <ulink
+ url="http://www-1.ibm.com/support/docview.wss?rss=180&uid=swg21284395">
+ Setting web container custom properties</ulink></para>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>prependSlashToResource = "true"</literal>
+ — This solves a fairly common issue with Websphere
+ where applications are not using a leading "/" when
+ attempting to access resources. If this is not set then a
+ <literal>java.net.MalformedURLException</literal>
+ will be thrown. With this property set you will still see
+ warnings, but the resources will be retrieved as expected.
+ <note>
+ <title>Detailed can be found at:</title>
+ <para><ulink
+ url="http://www-1.ibm.com/support/docview.wss?uid=swg21190234">
+ SRVE0238E: Resource paths must have a leading
+ slash</ulink></para> </note> </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>com.ibm.ws.webcontainer.invokefilterscompatibility
+ = "true"</literal> — This solves an issue with
+ Websphere where it throws a
+ <literal>FileNotFoundException</literal> when a web
+ application attempts to access a file resource that does not
+ actually exist on disk. This is a common practice in modern web
+ applications where filters or servlets are used to process
+ resource requests like these. This issue manifests itself as
+ failures to retrieve JavaScript, CSS, images, etc... when
+ requesting a web page. <note>
+ <title>Detailed can be found at:</title>
+ <para><ulink
+ url="http://www-1.ibm.com/support/docview.wss?uid=swg24014758">
+ PK33090; 6.1: A filter that serves a file does not pop-up an
+ alert message</ulink></para> </note></para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
+ <section id="jee5-websphere-section">
+ <title> The <literal>jee5/booking</literal> example </title>
+
+ <para> The <literal>jee5/booking</literal> example is based on the Hotel
+ Booking example (which runs on JBoss AS). Out of the box it is designed
+ to run on Glassfish, but with the steps below it can be deployed to
+ Websphere. It is located in the
+ <literal>$SEAM_DIST/examples/jee5/booking</literal> directory.
+ </para>
+
+ <para>As stated before the <literal>EJB3</literal> feature pack does not
+ provide a full <literal>jee5</literal> implementation. This means
+ that there are some tricks to getting an application deployed and
+ functioning. </para>
+
+ <section>
+ <title>Configuration file changes</title>
+
+ <para>Below are the configuration file changes that are need to the base
+ example.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term>
+ <literal>resources/WEB-INF/components.xml</literal>
+ </term>
+ <listitem>
+ <para>We need to change the way that we look up EJBs for
+ Websphere. We need to remove the
+ <literal>/local</literal> from the end of the
+ <literal>jndi-pattern</literal> attribute. It should
+ look like this: </para>
+
+
+ <programlisting><![CDATA[
+<core:init jndi-pattern="java:comp/env/jboss-seam-jee5/#{ejbName}" debug="true"/>
+ ]]></programlisting>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term> <literal>resources/WEB-INF/web.xml</literal>
+ </term>
+ <listitem>
+ <para>This is the first place that we notice an unexpected
+ change because this is not full <literal>jee5</literal>
+ implementation. </para>
+ <para> Websphere does not support <literal>Servlet
+ 2.5</literal>, it required <literal>Servlet
+ 2.4</literal>. For this change we need to adjust the top of
+ the <literal>web.xml</literal> file to look like the
+ following:</para>
+
+
+ <programlisting><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ ]]></programlisting>
+ <para>Next you have to make some changes to the EJB references
+ in the <literal>web.xml</literal>. These changes are
+ what will allow Websphere to bind the EJB2 references in
+ the web module to the the actual EJB3 beans in the EAR
+ module. Replace all of the
+ <literal>ejb-local-refs</literal> when the values
+ below.</para>
+
+
+ <programlisting><![CDATA[
+ <!-- JEE5 EJB3 names -->
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/AuthenticatorAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local-home></local-home>
+ <local>org.jboss.seam.example.booking.Authenticator</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/BookingListAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local-home></local-home>
+ <local>org.jboss.seam.example.booking.BookingList</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/RegisterAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local-home></local-home>
+ <local>org.jboss.seam.example.booking.Register</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/ChangePasswordAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local-home></local-home>
+ <local>org.jboss.seam.example.booking.ChangePassword</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/HotelBookingAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local-home></local-home>
+ <local>org.jboss.seam.example.booking.HotelBooking</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/HotelSearchingAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local-home></local-home>
+ <local>org.jboss.seam.example.booking.HotelSAll of the examples and informaearching</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/EjbSynchronizations</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local-home></local-home>
+ <local>org.jboss.seam.transaction.LocalEjbSynchronizations</local>
+ </ejb-local-ref>]]></programlisting>
+ <para>The important changes are that there is an empty
+ <literal>local-home</literal> element for each EJB.
+ This is the signal to Websphere so that it will make the
+ correct bindings behind the scenes between the web module
+ and the EJB3 beans. The <literal>ejb-link</literal>
+ element is simply not used. </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <literal>resources/META-INF/persistence.xml</literal>
+ </term>
+ <listitem>
+ <para>For this example we will be using the default
+ datasource that comes with Websphere. To do this change the
+ <literal>jta-data-source</literal> element like below.</para>
+ <programlisting><![CDATA[
+<jta-data-source>DefaultDatasource</jta-data-source>
+ ]]></programlisting>
+ <para>Then we need to adjust some of the hibernate
+ properties. First comment out the Glassfish properties.
+ Next you need to add/change the properties below. </para>
+
+
+ <programlisting><![CDATA[
+<!--<property name="hibernate.transaction.flush_before_completion" value="true"/>-->
+<property name="hibernate.cache.provider_class"
+ value="org.hibernate.cache.HashtableCacheProvider"/>
+<property name="hibernate.dialect" value="GlassfishDerbyDialect"/>
+<property name="hibernate.transaction.manager_lookup_class"
+ value="org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"/>
+ ]]></programlisting>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>hibernate.transaction.manager_lookup_class</literal>
+ — Standard hibernate transaction
+ manager property for Websphere 6.X</para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>hibernate.transaction.flush_before_completion</literal>
+ — This is commented out because we want
+ the container to manage the transactions. Also
+ if this is set to <literal>true</literal> an
+ exception will be thrown by Websphere when the
+ EJBContext is looked up.
+
+
+ <programlisting><![CDATA[
+com.ibm.wsspi.injectionengine.InjectionException:
+ EJBContext may only be looked up by or injected into an EJB
+ ]]></programlisting></para>
+ </listitem>
+ <listitem>
+ <para><literal>hibernate.dialect</literal>
+ — From WAS 6.1.0.9 on the embedded DB was
+ switched to the same Derby DB in
+ Glassfish.</para>
+ </listitem>
+ </itemizedlist></para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <literal>resources/GlassfishDerbyDialect.class</literal>
+ </term>
+ <listitem>
+ <para>You will need to get the
+ <literal>GlassfishDerbyDialect.class</literal> and
+ copy it into the <literal>/resources</literal>
+ directory. The class exists in the JPA example and can be
+ copied using the command below assuming you are in
+ <literal>jee5/booking</literal> directory:</para>
+
+
+ <programlisting><![CDATA[
+cp ../../jpa/resources-websphere61/WEB-INF/classes/GlassfishDerbyDialect.class
+ ./resources]]></programlisting>
+ <para>This class will be put into the
+ <literal>jboss-seam-jee5.jar</literal> file using
+ changes to the build.xml discussed later. </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term> <literal>resources/import.sql</literal>
+ </term>
+ <listitem>
+ <para>This file must also be copied from the JPA example
+ because either the Derby DB or the dialect does not support
+ changes to the <literal>ID</literal> column. The files
+ are identical except for the column difference. Use the
+ following command to make the copy
+
+
+ <programlisting><![CDATA[
+cp ../../jpa/resources-websphere61/import.sql ./resources]]></programlisting>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </section>
+
+ <section>
+ <title>Building the <literal>jee5/booking</literal>
+ example</title>
+
+ <para>In order to get the changes we have made into our application we
+ need to make some changes to the <literal>build.xml</literal>.
+ There are also some additional jars that are required by our
+ application in order to work with Websphere. This section will cover
+ what changes are needed to the <literal>build.xml</literal>.</para>
+
+ <section>
+ <title>New libraries dependencies</title>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>JSF libraries — Websphere 6.1 comes with
+ their own version of JSF 1.1 (Seam requires JSF 1.2). So
+ we must add these jars to our application.
+ <itemizedlist>
+ <listitem>
+ <para><literal>jsf-api.jar</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para><literal>jsf-impl.jar</literal>
+ </para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para>Since Websphere is not a fully compliant
+ <literal>JEE5</literal> implementation we need to
+ add these expression language libraries as well:
+ <itemizedlist>
+ <listitem>
+ <para><literal>el-api.jar</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para><literal>el-ri.jar</literal>
+ </para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para><literal>jboss-seam.jar</literal> — for
+ some reason when deploying the application through
+ the Websphere administration console it can not find
+ the <literal>jboss-seam.jar</literal> at the base
+ of the EAR archive. This means that we need to add it to
+ the <literal>/lib</literal> of the EAR.</para>
+ </listitem>
+ <listitem>
+ <para>Then finally by removing the
+ <literal>log4j.jar</literal> all of the log output
+ from our application will be added to the Websphere
+ logging. Addition steps are required to fully
+ configure log4j and those are outside of the scope of
+ this document.</para>
+ </listitem>
+ </itemizedlist> </para>
+
+ </section>
+
+ <section>
+ <title>Updating the <literal>build.xml</literal> file</title>
+
+ <para>Add the following entry to the bottom of the
+ <literal>build.xml</literal> file. This overrides the
+ default fileset that is used to populate the
+ <literal>jboss-seam-jee5.jar</literal>. The primary change
+ is the addition of the
+ <literal>GlassfishDerbyDialect.class</literal>.
+
+
+ <programlisting><![CDATA[
+ <fileset id="jar.resources" dir="${resources.dir}">
+ <include name="import.sql" />
+ <include name="seam.properties" />
+ <include name="GlassfishDerbyDialect.class" />
+ <include name="META-INF/persistence.xml" />
+ <include name="META-INF/ejb-jar.xml" />
+ </fileset>]]></programlisting>
+ </para>
+
+ <para>Next we need to add the library dependencies discussed above.
+ For this add the following to bottom of the
+ <literal>ear.lib.extras</literal> fileset entry.
+
+
+ <programlisting><![CDATA[
+ <!--<include name="lib/log4j.jar" />-->
+ <include name="lib/el-api.jar" />
+ <include name="examples/jpa/lib/el-ri.jar" />
+ <include name="lib/jsf-api.jar" />
+ <include name="lib/jsf-impl.jar" />
+ <include name="lib/jboss-seam.jar" />
+</fileset>]]></programlisting>
+ </para>
+
+ <para>Now all that is left is to execute the <literal>ant
+ archive</literal> task and your application files should be in
+ the <literal>jee5/booking/dist</literal> directory.
+ </para>
+ </section>
+
+ </section>
+
+ <section id="jee5-websphere-deploy">
+ <title>Deploying the application to Websphere</title>
+
+ <para>So now we have everything we need in place. All that is left is to
+ deploy it - just a few steps more ;) </para>
+ <para> For that we will use Websphere's administration console. As
+ before there are some tricks and tips that must be followed.</para>
+
+ <para>The steps below are for the Websphere version stated above, yours
+ may be slightly different.
+ <orderedlist>
+ <listitem>
+ <para>Log in to the administration console
+
+
+ <programlisting><![CDATA[
+https://localhost:9043/ibm/console]]></programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Access the <literal>Enterprise
+ Application</literal> menu option under the
+ <literal>Applications</literal> top menu. </para>
+ </listitem>
+ <listitem>
+ <para>At the top of the <literal>Enterprise
+ Application</literal> table select
+ <literal>Install</literal>. Below are installation
+ wizard pages and what needs to done on each.
+ <itemizedlist>
+ <listitem>
+ <para><literal>Preparing for the application
+ installation</literal>
+ <itemizedlist>
+ <listitem>
+ <para>Browse to the
+ <literal>examples/jee5/booking/dist/jboss-seam-jee5.ear</literal>
+ file using the file upload widget.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Select the
+ <literal>Next</literal>
+ button.</para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para><literal>Select installation
+ options</literal>
+ <itemizedlist>
+ <listitem>
+ <para>Select the <literal>Deploy
+ enterprise beans</literal>
+ check box. This is needed unless you
+ used a Websphere tool to package the
+ application. </para>
+ </listitem>
+ <listitem>
+ <para>Select the
+ <literal>Next</literal>
+ button.</para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para><literal>Map modules to
+ servers</literal>
+ <itemizedlist>
+ <listitem>
+ <para>No changes needed here as we only
+ have one server. Select the
+ <literal>Next</literal>
+ button.</para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para><literal>Map EJB references to
+ beans</literal> This page will list all of the
+ beans that we entered in the web.xml.
+ <itemizedlist>
+ <listitem>
+ <para>Make sure that <literal>Allow
+ EJB reference targets to resolve
+ automatically</literal> check box
+ is selected. This will tell
+ Websphere to bind our EJB3 beans to
+ the EJB references in the web
+ module.</para>
+ </listitem>
+ <listitem>
+ <para>Select the
+ <literal>Next</literal>
+ button.</para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para><literal>Map virtual hosts for Web
+ modules</literal>
+ <itemizedlist>
+ <listitem>
+ <para>No changes needed here. Select
+ the <literal>Next</literal>
+ button.</para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para><literal>Summary</literal>
+ <itemizedlist>
+ <listitem>
+ <para>No changes needed here. Select
+ the <literal>Finish</literal>
+ button.</para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para><literal>Installation</literal>
+ <itemizedlist>
+ <listitem>
+ <para>Now you will see it installing and
+ deploying your
+ application.</para>
+ </listitem>
+ <listitem>
+ <para>When if finishes select the
+ <literal>Save</literal> link and
+ you will be returned to the
+ <literal>Enterprise
+ Applications</literal>
+ table.</para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem id="websphere-app-adj-after-install" xreflabel="installation adjustments for jee5 example">
+ <para>Now that we have our application installed we need to
+ make some adjustments to it before we can start it.
+ <itemizedlist>
+ <listitem>
+ <para>Starting from the <literal>Enterprise
+ Applications</literal> table select the
+ <literal>Seam Booking</literal>
+ link.</para>
+ </listitem>
+ <listitem>
+ <para>Select the <literal>Manage
+ Modules</literal> link.</para>
+ </listitem>
+ <listitem>
+ <para>Select the
+ <literal>jboss-seam-jee5.war</literal>
+ link.</para>
+ </listitem>
+ <listitem>
+ <para>Change the <literal>Class loader
+ order</literal> combo box to say
+ <literal>Classes loaded with application
+ class loader first</literal>.</para>
+ </listitem>
+ <listitem>
+ <para>Select <literal>Apply</literal> and then
+ <literal>Save</literal> options.</para>
+ </listitem>
+ <listitem>
+ <para>Return the <literal>Seam
+ Booking</literal> page.</para>
+ </listitem>
+ <listitem>
+ <para>On this page select the <literal>Class
+ loading and update detection</literal>
+ link.</para>
+ </listitem>
+ <listitem>
+ <para>Select the radio button for
+ <literal>Classes loaded with application
+ class loader first</literal>.</para>
+ </listitem>
+ <listitem>
+ <para>Even though we are not enabling class reload
+ you must also enter a valid number in the
+ <literal>Polling interval for updated
+ files</literal> text area (zero works
+ fine).</para>
+ </listitem>
+ <listitem>
+ <para>Select <literal>Apply</literal> and then
+ <literal>Save</literal> options.</para>
+ </listitem>
+ <listitem>
+ <para>You should verify that the change you just
+ made has stuck. We had problems with the last
+ class loader change not taking effect - even
+ after a restart. If the change did not take you
+ will need to do it manually following these
+ directions
+ <itemizedlist>
+ <listitem>
+ <para> Open the following file in a text
+ editor of your choice:
+
+
+ <programlisting><![CDATA[
+$WebSphereInstall/$yourServerName/profiles/$yourProfileName/config/cells/
+ $yourCellName/applications/Seam Booking.ear/deployments/
+ Seam Booking/deployment.xml]]></programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para> Modify the following line so that
+ <literal>PARENT_FIRST</literal>
+ is now
+ <literal>PARENT_LAST</literal>:
+
+
+ <programlisting><![CDATA[
+<classloader xmi:id="Classloader_#######" mode="PARENT_FIRST"/>]]></programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para> Save the file and now when go to the
+ <literal>Class loading and update
+ detection</literal> page you
+ should see <literal>Classes loaded
+ with application class loader
+ first</literal> selected. </para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para>To start the application return to the
+ <literal>Enterprise Applications</literal> table and
+ select our application in the list. Then choose the
+ <literal>Start</literal> button at the top of the
+ table.</para>
+ </listitem>
+ <listitem>
+ <para>You can now access the application at
+ <literal>http://localhost:9080/seam-jee5/</literal>
+ .</para>
+ </listitem>
+ </orderedlist>
+ <note>
+ <title>A note about Websphere Stateful bean timeouts</title>
+ <para>The default timeout period for a Websphere 6.1 Stateful
+ EJB is 10 minutes. This means that you may see some EJB timeout
+ exceptions after some idle time. It is possible to adjust the
+ timeout of the Stateful EJBs on an individual basis, but
+ that is beyond the scope of this document. See the Websphere
+ documentation for details.
+ </para>
+ </note>
+ </para>
+ </section>
+
+ </section>
+
+ <section>
+ <title> The <literal>jpa</literal> booking example </title>
+ <para>Thankfully getting the <literal>jpa</literal> example to work is
+ much easier than the <literal>jee5</literal> example. This is the
+ Hotel Booking example implemented in Seam POJOs and using Hibernate JPA
+ with JPA transactions. It does not require EJB3 support to
+ run.</para>
+
+ <para> The example already has a breakout of configurations and build
+ scripts for many of the common containers including Websphere.</para>
+
+ <para>First thing we are going to do is build and deploy that example. Then
+ we'll go over some key changes that we needed.</para>
+
+ <section>
+ <title>Building the <literal>jpa</literal> example</title>
+ <para> Building it only requires running the correct ant command:
+ <programlisting>ant websphere61</programlisting>
+ This will create container specific distribution and exploded
+ archive directories with the <literal>websphere61</literal> label.</para>
+ </section>
+ <section>
+ <title>Deploying the <literal>jpa</literal> example</title>
+ <para>This is similar to the <literal>jee5</literal> example at
+ <xref linkend="jee5-websphere-deploy"/>, but without so many steps.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>From the <literal>Enterprise Applications</literal> table
+ select the <literal>Install</literal> button.
+ <itemizedlist>
+ <listitem>
+ <para><literal>Preparing for the application
+ installation</literal>
+ <itemizedlist>
+ <listitem>
+ <para>Browse to the
+ <literal>examples/jpa/dist-websphere61/jboss-seam-jpa.war</literal>
+ file using the file upload widget.
+ </para>
+ </listitem>
+ <listitem>
+ <para>In the <literal>Context root</literal> text box
+ enter <literal>jboss-seam-jpa</literal>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Select the <literal>Next</literal> button.
+ </para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para>Select the <literal>Next</literal> button for the next
+ three pages, no changes are needed.
+ </para>
+ </listitem>
+ <listitem>
+ <para><literal>Summary</literal> page
+ <itemizedlist>
+ <listitem>
+ <para>Review the settings if you wish and select
+ the <literal>Finish</literal> button to install
+ the application. When installation finished select the <literal>
+ Save</literal> link and you will be returned to the
+ <literal>Enterprise Applications</literal> table.
+ </para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
+ <listitem>
+ <para>As with the <literal>jee5</literal> example there are some
+ class loader changes needed before we start the application.
+ Follow the instructions at <xref linkend="websphere-app-adj-after-install"/>
+ but exchange <literal>jboss-seam-jpa</literal> for <literal>Seam Booking</literal>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Finally start the application by selecting it in the
+ <literal>Enterprise Applications</literal> table and clicking
+ the <literal>Start</literal> button.
+ </para>
+ </listitem>
+ <listitem>
+ <para>You can now access the application at the
+ <literal>http://localhost:9080/jboss-seam-jpa/index.html</literal>.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>Whats different for Websphere 6.1</title>
+ <para>The differences between the JPA examples that deploys to JBoss
+ 4.2 and Websphere 6.1 are mostly expected; library and
+ configuration file changes. </para>
+ <itemizedlist>
+ <listitem>
+ <para>Configuration file changes
+ <itemizedlist>
+ <listitem>
+ <para><literal>WEB-INF/web.xml</literal>
+ — the only significant change is that
+ Websphere 6.1 only support <literal>Servlet
+ 2.4</literal> so the top of this file was changed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>META-INF/persistence.xml</literal>
+ — the main changes here are for the
+ datasource JNDI path, switching to the Websphere
+ 6.1 transaction manager look up class, and
+ changing the hibernate dialect to be
+ <literal>GlassfishDerbyDialect</literal>
+ .</para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>WEB-INF/classes/GlassfishDerbyDialect.class
+ </literal> — this class is needed for the
+ hibernate dialect change to
+ <literal>GlassfishDerbyDialect</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para><literal>import.sql</literal> —
+ either for the dialect or Derby DB the
+ <literal>ID</literal> column can not be
+ populated by this file and was removed.
+ </para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para>Changes for dependent libraries</para>
+ <para><literal>WEB-INF/lib</literal> — The Websphere
+ version requires several library packages because they are
+ not included as they are with JBoss AS. These are primarily for
+ hibernate, JSF-RI support and their dependencies. Below are
+ listed only the additional jars needed above and beyond the JBoss
+ <literal>JPA</literal> example.
+ <itemizedlist>
+ <listitem>
+ <para> To use Hibernate as your JPA provider you need
+ the following jars:
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <literal>hibernate.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>hibernate-annotations.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>hibernate-commons-annotations.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>hibernate-entitymanager.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>hibernate-validator.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>commons-collections.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>jboss-archive-browsing.jar</literal>
+ </simpara>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para>Seam requires JSF 1.2 and these are the jars needed
+ for that. Websphere 6.1 ships with its own implementation
+ of JSF 1.1.
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <literal>jsf-api.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>jsf-impl.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara> <literal>el-ri.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara> <literal>el-api.jar</literal>
+ </simpara>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ <listitem>
+ <para>Various third party jars that Websphere needs:
+ <itemizedlist>
+ <listitem>
+ <simpara> <literal>antlr.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara> <literal>cglib.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara> <literal>asm.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara> <literal>dom4j.jar</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>javassist.jar</literal>
+ </simpara>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ </itemizedlist> </para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+
+
+ </section>
+
+</chapter>
16 years, 11 months
Seam SVN: r7261 - in trunk: ui/src/main/java/org/jboss/seam/ui/component and 1 other directories.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-01-28 15:52:35 -0500 (Mon, 28 Jan 2008)
New Revision: 7261
Modified:
trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
trunk/ui/src/main/java/org/jboss/seam/ui/component/UISeamCommandBase.java
trunk/ui/src/main/java/org/jboss/seam/ui/util/UrlBuilder.java
trunk/ui/src/main/java/org/jboss/seam/ui/util/ViewUrlBuilder.java
Log:
Initial work on portal compatibility from Alex Smirnov
Modified: trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
===================================================================
--- trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-01-28 14:06:34 UTC (rev 7260)
+++ trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-01-28 20:52:35 UTC (rev 7261)
@@ -151,18 +151,28 @@
FacesContext facesContext = event.getFacesContext();
- if ( event.getPhaseId() == RESTORE_VIEW || event.getPhaseId() == RENDER_RESPONSE )
+ boolean notInitialised=false;
+
+ if ( event.getPhaseId() == RESTORE_VIEW )
{
beforeRestoreView(facesContext);
}
+ if ( event.getPhaseId() == RENDER_RESPONSE && !Contexts.isApplicationContextActive() )
+ {
+ beforeRestoreView(facesContext);
+ notInitialised = true;
+ }
//delegate to subclass:
handleTransactionsBeforePhase(event);
- if ( event.getPhaseId() == RENDER_RESPONSE )
+ if (event.getPhaseId() == RENDER_RESPONSE)
{
- afterRestoreView(facesContext);
- beforeRenderResponse( event.getFacesContext() );
+ if (notInitialised)
+ {
+ afterRestoreView(facesContext);
+ }
+ beforeRenderResponse(event.getFacesContext());
}
}
@@ -242,46 +252,47 @@
private void afterPortletPhase(PhaseEvent event)
{
- FacesContext facesContext = event.getFacesContext();
-
- if ( event.getPhaseId() == RESTORE_VIEW )
+ Object portletPhase = event.getFacesContext().getExternalContext().getRequestMap().get("javax.portlet.faces.phase");
+
+ if (event.getPhaseId() == RESTORE_VIEW)
{
- afterRestoreView(facesContext);
+ afterRestoreView(event.getFacesContext());
}
- else if ( event.getPhaseId() == INVOKE_APPLICATION )
+ else if (event.getPhaseId() == INVOKE_APPLICATION)
{
afterInvokeApplication();
}
- else if ( event.getPhaseId() == PROCESS_VALIDATIONS )
+ else if (event.getPhaseId() == PROCESS_VALIDATIONS)
{
- afterProcessValidations(facesContext);
+ afterProcessValidations(event.getFacesContext());
}
-
+
FacesMessages.afterPhase();
-
- //delegate to subclass:
+
+ // delegate to subclass:
handleTransactionsAfterPhase(event);
-
- if ( event.getPhaseId() == RENDER_RESPONSE )
+
+ if (event.getPhaseId() == RENDER_RESPONSE)
{
- //writeConversationIdToResponse( facesContext.getExternalContext().getResponse() );
- afterRenderResponse(facesContext);
+ // writeConversationIdToResponse(
+ // facesContext.getExternalContext().getResponse() );
+ afterRenderResponse(event.getFacesContext());
}
- else if ( event.getPhaseId() == INVOKE_APPLICATION || facesContext.getRenderResponse() || facesContext.getResponseComplete() )
+ else if ( (null != portletPhase && "ActionPhase".equals(portletPhase.toString()) )
+ && (event.getPhaseId() == INVOKE_APPLICATION
+ || event.getFacesContext().getRenderResponse()
+ || event.getFacesContext().getResponseComplete()) )
{
- Manager manager = Manager.instance();
- manager.beforeRedirect();
- if ( manager.isLongRunningConversation() )
+ Manager.instance().beforeRedirect();
+ if ( Manager.instance().isLongRunningConversation() )
{
- setPortletRenderParameter(
- facesContext.getExternalContext().getResponse(),
- manager.getConversationIdParameter(),
- manager.getCurrentConversationId()
- );
+ setPortletRenderParameter(
+ event.getFacesContext().getExternalContext().getResponse(),
+ Manager.instance().getConversationIdParameter(),
+ Manager.instance().getCurrentConversationId() );
}
- afterResponseComplete(facesContext);
+ afterResponseComplete( event.getFacesContext() );
}
-
}
private static void setPortletRenderParameter(Object response, String conversationIdParameter, String conversationId)
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/component/UISeamCommandBase.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/component/UISeamCommandBase.java 2008-01-28 14:06:34 UTC (rev 7260)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/component/UISeamCommandBase.java 2008-01-28 20:52:35 UTC (rev 7261)
@@ -13,6 +13,7 @@
import javax.faces.component.UIParameter;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionListener;
+import javax.faces.event.PhaseEvent;
import javax.faces.model.DataModel;
import org.jboss.seam.navigation.Pages;
@@ -22,6 +23,17 @@
public abstract class UISeamCommandBase extends UIOutput implements ActionSource2
{
+ private static Class PORTLET_REQUEST;
+
+ static
+ {
+ try
+ {
+ PORTLET_REQUEST = Class.forName("javax.portlet.PortletRequest");
+ }
+ catch (Exception e) {}
+ }
+
public abstract String getView();
public String getUrl() throws UnsupportedEncodingException
@@ -34,7 +46,7 @@
viewId = Pages.getViewId(getFacesContext());
}
- ViewUrlBuilder url = new ViewUrlBuilder(viewId, getFragment());
+ ViewUrlBuilder url = new ViewUrlBuilder(viewId, getFragment(), !isPortletRequest(getFacesContext()));
Set<String> usedParameters = new HashSet<String>();
for (Object child : getChildren())
@@ -203,4 +215,10 @@
return new org.jboss.seam.ui.util.cdk.MethodExpressionToMethodBinding(getActionExpression());
}
+ private static boolean isPortletRequest(FacesContext facesContext)
+ {
+ return PORTLET_REQUEST !=null &&
+ PORTLET_REQUEST.isInstance( facesContext.getExternalContext().getRequest() );
+ }
+
}
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/util/UrlBuilder.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/util/UrlBuilder.java 2008-01-28 14:06:34 UTC (rev 7260)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/util/UrlBuilder.java 2008-01-28 20:52:35 UTC (rev 7261)
@@ -16,6 +16,8 @@
private String fragment;
private String characterEncoding;
+ private boolean urlEncodeParameters = true;
+
private Map<String, String> parameters;
protected UrlBuilder(String fragment, String characterEncoding)
@@ -25,12 +27,24 @@
this.characterEncoding = characterEncoding;
}
+ public UrlBuilder(String fragment, String characterEncoding, boolean urlEncodeParameters)
+ {
+ this(fragment, characterEncoding);
+ this.urlEncodeParameters = urlEncodeParameters;
+ }
+
public UrlBuilder(String url, String fragment, String characterEncoding)
{
this(fragment, characterEncoding);
setUrl(url);
}
+ public UrlBuilder(String url, String fragment, String characterEncoding, boolean urlEncodeParameters)
+ {
+ this(url, fragment, characterEncoding);
+ this.urlEncodeParameters = urlEncodeParameters;
+ }
+
protected void setUrl(String url)
{
if (url == null)
@@ -85,7 +99,7 @@
public void addParameter(String name, String value) throws UnsupportedEncodingException
{
- parameters.put(name, urlEncode(value));
+ parameters.put(name, urlEncodeParameters ? urlEncode(value) : value);
}
public void addParameter(UIParameter parameter) throws UnsupportedEncodingException
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/util/ViewUrlBuilder.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/util/ViewUrlBuilder.java 2008-01-28 14:06:34 UTC (rev 7260)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/util/ViewUrlBuilder.java 2008-01-28 20:52:35 UTC (rev 7261)
@@ -14,9 +14,9 @@
private Page page;
- public ViewUrlBuilder(String viewId, String fragment)
+ public ViewUrlBuilder(String viewId, String fragment, boolean urlEncodeParameters)
{
- super(fragment, FacesContext.getCurrentInstance().getResponseWriter().getCharacterEncoding());
+ super(fragment, FacesContext.getCurrentInstance().getResponseWriter().getCharacterEncoding(), urlEncodeParameters);
if (viewId == null)
{
throw new NullPointerException("viewId must not be null");
@@ -29,6 +29,12 @@
page = Pages.instance().getPage(viewId);
}
+
+ public ViewUrlBuilder(String viewId, String fragment)
+ {
+ this(viewId, fragment, true);
+
+ }
@Override
public void addParameter(UIParameter parameter) throws UnsupportedEncodingException
16 years, 11 months
Seam SVN: r7260 - trunk/doc/reference/en/modules.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-01-28 09:06:34 -0500 (Mon, 28 Jan 2008)
New Revision: 7260
Modified:
trunk/doc/reference/en/modules/testing.xml
Log:
JBSEAM-2543
Modified: trunk/doc/reference/en/modules/testing.xml
===================================================================
--- trunk/doc/reference/en/modules/testing.xml 2008-01-28 14:04:50 UTC (rev 7259)
+++ trunk/doc/reference/en/modules/testing.xml 2008-01-28 14:06:34 UTC (rev 7260)
@@ -158,7 +158,7 @@
<programlisting><![CDATA[@Name("paymentProcessor")
@Install(precedence=MOCK)
public class MockPaymentProcessor extends PaymentProcessor {
- public void processPayment(Payment payment) {
+ public boolean processPayment(Payment payment) {
return true;
}
}]]></programlisting>
16 years, 11 months
Seam SVN: r7259 - branches/Seam_2_0/doc/reference/en/modules.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-01-28 09:04:50 -0500 (Mon, 28 Jan 2008)
New Revision: 7259
Modified:
branches/Seam_2_0/doc/reference/en/modules/drools.xml
branches/Seam_2_0/doc/reference/en/modules/testing.xml
Log:
JBSEAM-2543
Modified: branches/Seam_2_0/doc/reference/en/modules/drools.xml
===================================================================
--- branches/Seam_2_0/doc/reference/en/modules/drools.xml 2008-01-28 13:59:29 UTC (rev 7258)
+++ branches/Seam_2_0/doc/reference/en/modules/drools.xml 2008-01-28 14:04:50 UTC (rev 7259)
@@ -18,7 +18,7 @@
<programlisting><![CDATA[<drools:rule-base name="policyPricingRules">
<drools:rule-files>
- <value>policyPricingRules</value>
+ <value>policyPricingRules.drl</value>
</drools:rule-files>
</drools:rule-base>]]></programlisting>
@@ -37,7 +37,7 @@
<programlisting><![CDATA[<drools:rule-base name="policyPricingRules" dsl-file="policyPricing.dsl">
<drools:rule-files>
- <value>policyPricingRules</value>
+ <value>policyPricingRules.drl</value>
</drools:rule-files>
</drools:rule-base>]]></programlisting>
Modified: branches/Seam_2_0/doc/reference/en/modules/testing.xml
===================================================================
--- branches/Seam_2_0/doc/reference/en/modules/testing.xml 2008-01-28 13:59:29 UTC (rev 7258)
+++ branches/Seam_2_0/doc/reference/en/modules/testing.xml 2008-01-28 14:04:50 UTC (rev 7259)
@@ -158,7 +158,7 @@
<programlisting><![CDATA[@Name("paymentProcessor")
@Install(precedence=MOCK)
public class MockPaymentProcessor extends PaymentProcessor {
- public void processPayment(Payment payment) {
+ public boolean processPayment(Payment payment) {
return true;
}
}]]></programlisting>
16 years, 11 months
Seam SVN: r7258 - trunk/doc/reference/en/modules.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-01-28 08:59:29 -0500 (Mon, 28 Jan 2008)
New Revision: 7258
Modified:
trunk/doc/reference/en/modules/drools.xml
Log:
JBSEAM-2543
Modified: trunk/doc/reference/en/modules/drools.xml
===================================================================
--- trunk/doc/reference/en/modules/drools.xml 2008-01-28 13:56:59 UTC (rev 7257)
+++ trunk/doc/reference/en/modules/drools.xml 2008-01-28 13:59:29 UTC (rev 7258)
@@ -18,7 +18,7 @@
<programlisting><![CDATA[<drools:rule-base name="policyPricingRules">
<drools:rule-files>
- <value>policyPricingRules</value>
+ <value>policyPricingRules.drl</value>
</drools:rule-files>
</drools:rule-base>]]></programlisting>
@@ -37,7 +37,7 @@
<programlisting><![CDATA[<drools:rule-base name="policyPricingRules" dsl-file="policyPricing.dsl">
<drools:rule-files>
- <value>policyPricingRules</value>
+ <value>policyPricingRules.drl</value>
</drools:rule-files>
</drools:rule-base>]]></programlisting>
16 years, 11 months
Seam SVN: r7257 - trunk/doc/reference/en/modules.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-01-28 08:56:59 -0500 (Mon, 28 Jan 2008)
New Revision: 7257
Modified:
trunk/doc/reference/en/modules/jbpm.xml
Log:
Port of JBSEAM-1034 from 2.0 branch
Modified: trunk/doc/reference/en/modules/jbpm.xml
===================================================================
--- trunk/doc/reference/en/modules/jbpm.xml 2008-01-28 13:52:33 UTC (rev 7256)
+++ trunk/doc/reference/en/modules/jbpm.xml 2008-01-28 13:56:59 UTC (rev 7257)
@@ -666,6 +666,16 @@
</bpm:process-definitions>
</bpm:jbpm>]]></programlisting>
+ <para>
+ As jBPM processes are persistent across application restarts,
+ when using Seam in a production environment you won't want to
+ install the process definition every time the application starts.
+ Therefore, in a production environment, you'll need to deploy
+ the process to jBPM outside of Seam. In other words, only install
+ process definitions from <literal>components.xml</literal> when
+ developing your application.
+ </para>
+
</section>
<section>
16 years, 11 months
Seam SVN: r7256 - branches/Seam_2_0/doc/reference/en/modules.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-01-28 08:52:33 -0500 (Mon, 28 Jan 2008)
New Revision: 7256
Modified:
branches/Seam_2_0/doc/reference/en/modules/jbpm.xml
Log:
JBSEAM-1034
Modified: branches/Seam_2_0/doc/reference/en/modules/jbpm.xml
===================================================================
--- branches/Seam_2_0/doc/reference/en/modules/jbpm.xml 2008-01-28 13:46:53 UTC (rev 7255)
+++ branches/Seam_2_0/doc/reference/en/modules/jbpm.xml 2008-01-28 13:52:33 UTC (rev 7256)
@@ -666,6 +666,16 @@
</bpm:process-definitions>
</bpm:jbpm>]]></programlisting>
+ <para>
+ As jBPM processes are persistent across application restarts,
+ when using Seam in a production environment you won't want to
+ install the process definition every time the application starts.
+ Therefore, in a production environment, you'll need to deploy
+ the process to jBPM outside of Seam. In other words, only install
+ process definitions from <literal>components.xml</literal> when
+ developing your application.
+ </para>
+
</section>
<section>
16 years, 11 months
Seam SVN: r7255 - branches/Seam_2_0/doc/reference/en/modules.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-01-28 08:46:53 -0500 (Mon, 28 Jan 2008)
New Revision: 7255
Modified:
branches/Seam_2_0/doc/reference/en/modules/controls.xml
Log:
Backport of JBSEAM-2542
Modified: branches/Seam_2_0/doc/reference/en/modules/controls.xml
===================================================================
--- branches/Seam_2_0/doc/reference/en/modules/controls.xml 2008-01-28 13:40:00 UTC (rev 7254)
+++ branches/Seam_2_0/doc/reference/en/modules/controls.xml 2008-01-28 13:46:53 UTC (rev 7255)
@@ -90,6 +90,12 @@
<para><emphasis>Usage</emphasis></para>
<programlisting><![CDATA[<s:button id="cancel" value="Cancel"
action="#{hotelBooking.cancel}"/>]]></programlisting>
+ <para>
+ You can specify both <literal>view</literal> and <literal>action</literal>
+ on <literal><s:link /></literal>. In this case, the action
+ will be called once the redirect to the specified view has
+ occured.
+ </para>
</entry>
</row>
@@ -833,6 +839,12 @@
<para><emphasis>Usage</emphasis></para>
<programlisting><![CDATA[<s:link id="register" view="/register.xhtml"
value="Register New User"/>]]></programlisting>
+ <para>
+ You can specify both <literal>view</literal> and <literal>action</literal>
+ on <literal><s:link /></literal>. In this case, the action
+ will be called once the redirect to the specified view has
+ occured.
+ </para>
</entry>
</row>
16 years, 11 months