[jboss-cvs] JBossAS SVN: r105466 - projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 1 02:51:52 EDT 2010


Author: misty at redhat.com
Date: 2010-06-01 02:51:52 -0400 (Tue, 01 Jun 2010)
New Revision: 105466

Modified:
   projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Configuration.xml
Log:
JBPAPP-4387

Modified: projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Configuration.xml
===================================================================
--- projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Configuration.xml	2010-06-01 06:48:22 UTC (rev 105465)
+++ projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Configuration.xml	2010-06-01 06:51:52 UTC (rev 105466)
@@ -18,7 +18,7 @@
 				First, define a Faces Servlet.
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<servlet>
+<programlisting language="XML" role="XML"><![CDATA[<servlet>
 	<servlet-name>Faces Servlet</servlet-name>
 	<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
 	<load-on-startup>1</load-on-startup>
@@ -37,7 +37,7 @@
 				Seam also requires the following entry in your <filename>web.xml</filename> file:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<listener> 
+<programlisting language="XML" role="XML"><![CDATA[<listener> 
   <listener-class>org.jboss.seam.servlet.SeamListener</listener-class> 
 </listener>
 ]]></programlisting>
@@ -48,7 +48,7 @@
 				Some JSF implementations do not implement server-side state saving correctly, which interferes with Seam&#39;s conversation propagation. If you have problems with conversation propagation during form submissions, try switching to client-side state saving. To do so, add the following to <filename>web.xml</filename>:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<context-param> 
+<programlisting language="XML" role="XML"><![CDATA[<context-param> 
   <param-name>javax.faces.STATE_SAVING_METHOD</param-name> 
   <param-value>client</param-value> 
 </context-param>
@@ -57,7 +57,7 @@
 				The JSF specification is unclear about the mutability of view state values. Since Seam uses the JSF view state to back its <literal>PAGE</literal> scope, this can be problematic. If you use server-side state saving with the JSF-RI (JSF Reference Implementation), and you want a page-scoped bean to retain its exact value for a given page view, you must specify the context parameter as follows:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<context-param> 
+<programlisting language="XML" role="XML"><![CDATA[<context-param> 
   <param-name>com.sun.faces.serializeServerState</param-name> 
   <param-value>true</param-value> 
 </context-param>
@@ -73,7 +73,7 @@
 				To use the recommended Facelets over JavaServer Pages (JSP), add the following lines to <filename>faces-config.xml</filename>:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<application> 
+<programlisting language="XML" role="XML"><![CDATA[<application> 
   <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> 
 </application>]]>
 </programlisting>
@@ -81,7 +81,7 @@
 				Then, add the following lines to <filename>web.xml</filename>:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<context-param> 
+<programlisting language="XML" role="XML"><![CDATA[<context-param> 
   <param-name>javax.faces.DEFAULT_SUFFIX</param-name> 
   <param-value>.xhtml</param-value> 
 </context-param>
@@ -99,7 +99,7 @@
 				The Seam Resource Servlet provides resources used by Seam Remoting, CAPTCHAs (see the Security chapter) and some JSF UI controls. Configuring the Seam Resource Servlet requires the following entry in <filename>web.xml</filename>:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<servlet> 
+<programlisting language="XML" role="XML"><![CDATA[<servlet> 
   <servlet-name>Seam Resource Servlet</servlet-name> 
   <servlet-class>
     org.jboss.seam.servlet.SeamResourceServlet
@@ -119,7 +119,7 @@
 				Seam does not require Servlet filters for basic operation, but there are several features that depend upon filter use. Seam lets you add and configure Servlet filters as you would configure other built-in Seam components. To use this configuration method, you must first install a master filter in <filename>web.xml</filename>:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<filter> 
+<programlisting language="XML" role="XML"><![CDATA[<filter> 
   <filter-name>Seam Filter</filter-name> 
   <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> 
 </filter> 
@@ -166,7 +166,7 @@
 					By default, the exception handling filter will process all requests, but you can adjust this behavior by adding a <literal><![CDATA[<web:exception-filter>]]></literal> entry to <filename>components.xml</filename>, like so:
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/components" 
+<programlisting language="XML" role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/components" 
             xmlns:web="http://jboss.com/products/seam/web"> 
   <web:exception-filter url-pattern="*.seam"/> 
 </components>]]>
@@ -182,7 +182,7 @@
 					The redirect filter processes all requests by default, but this behavior can also be adjusted in <filename>components.xml</filename>:
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<web:redirect-filter url-pattern="*.seam"/>]]>
+<programlisting language="XML" role="XML"><![CDATA[<web:redirect-filter url-pattern="*.seam"/>]]>
 </programlisting>
 			</section>
 			
@@ -192,7 +192,7 @@
 					This filter lets Seam apply URL rewriting for views, depending on its configuration in <filename>pages.xml</filename>. This filter is not active by default, but can be activated by adding the following configuration to <filename>components.xml</filename>:
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<web:rewrite-filter view-mapping="*.seam"/>]]>
+<programlisting language="XML" role="XML"><![CDATA[<web:rewrite-filter view-mapping="*.seam"/>]]>
 </programlisting>
 				 <para>
 					The <literal>view-mapping</literal> parameter must match the Servlet mapping defined for the Faces Servlet in the <filename>web.xml</filename> file. If omitted, the rewrite filter assumes the pattern <literal>*.seam</literal>.
@@ -205,7 +205,7 @@
 					This feature is required when you use the Seam <emphasis>file upload</emphasis> JSF control. It detects multipart form requests and processes them according the the multipart/form-data specification (RFC-2388). Add the following to <filename>components.xml</filename> to override settings:
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<web:multipart-filter create-temp-files="true" 
+<programlisting language="XML" role="XML"><![CDATA[<web:multipart-filter create-temp-files="true" 
      max-request-size="1000000" url-pattern="*.seam"/>
  ]]></programlisting>
 				 <itemizedlist>
@@ -228,7 +228,7 @@
 					This filter sets the character encoding of submitted form data. It is not installed by default, and requires an entry in <filename>components.xml</filename> to enable it:
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<web:character-encoding-filter encoding="UTF-16" 
+<programlisting language="XML" role="XML"><![CDATA[<web:character-encoding-filter encoding="UTF-16" 
      override-client="true" url-pattern="*.seam"/>]]>
 </programlisting>
 				 <itemizedlist>
@@ -257,7 +257,7 @@
 					To override the default settings, add the following entry to <filename>components.xml</filename>. The options are the same as those specified in the RichFaces Developer Guide:
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<web:ajax4jsf-filter force-parser="true" enable-cache="true" 
+<programlisting language="XML" role="XML"><![CDATA[<web:ajax4jsf-filter force-parser="true" enable-cache="true" 
      log4j-init-file="custom-log4j.xml" url-pattern="*.seam"/>
 ]]></programlisting>
 				 <itemizedlist>
@@ -288,7 +288,7 @@
 					By default, the logging filter processes all requests. You can adjust this behavior by adding a <literal><![CDATA[<web:logging-filter>]]></literal> entry to <filename>components.xml</filename>, like so:
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/components" 
+<programlisting language="XML" role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/components" 
             xmlns:web="http://jboss.com/products/seam/web"> 
   <web:logging-filter url-pattern="*.seam"/> 
 </components>
@@ -307,7 +307,7 @@
 					This filter is not installed by default, and must be enabled in <filename>components.xml</filename>:
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<web:context-filter url-pattern="/media/*"/>
+<programlisting language="XML" role="XML"><![CDATA[<web:context-filter url-pattern="/media/*"/>
 ]]></programlisting>
 				 <para>
 					The context filter expects the conversation ID of any conversation context to be defined in the <literal>conversationId</literal> request parameter. You are responsible for ensuring that this is included in the request.
@@ -323,13 +323,13 @@
 					Seam can install your filters for you. This allows you to specify your filter&#39;s placement in the chain &#8212; the Servlet specification does not provide a well-defined order when you specify your filters in <filename>web.xml</filename>. Add a <literal>@Filter</literal> annotation to your Seam component. (Your Seam component must implement <literal>javax.servlet.Filter</literal>.)
 				</para>
 				 
-<programlisting role="JAVA"><![CDATA[@Startup 
+<programlisting language="Java" role="JAVA">@Startup 
 @Scope(APPLICATION) 
 @Name("org.jboss.seam.web.multipartFilter") 
 @BypassInterceptors 
 @Filter(within="org.jboss.seam.web.ajax4jsfFilter") 
 public class MultipartFilter extends AbstractFilter {...}
-]]></programlisting>
+</programlisting>
 				 <para>
 					Adding the <literal>@Startup</literal> annotation makes the component available during Seam startup. Bijection is not available here (<literal>@BypassInterceptors</literal>), and the filter should be further down the chain than the RichFaces filter (<literal>@Filter(within="org.jboss.seam.web.ajax4jsfFilter")</literal>).
 				</para>
@@ -347,7 +347,7 @@
 				Apply the <literal>SeamInterceptor</literal> to your Seam EJB components. This interceptor delegates to a set of built-in server-side interceptors that handle operations like bijection, conversation demarcation, and business process signals. The simplest way to do this across an entire application is to add the following interceptor configuration in <filename>ejb-jar.xml</filename>:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<interceptors> 
+<programlisting language="XML" role="XML"><![CDATA[<interceptors> 
   <interceptor> 
     <interceptor-class>
       org.jboss.seam.ejb.SeamInterceptor
@@ -370,7 +370,7 @@
 				For JBoss AS, the following pattern is correct:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<core:init jndi-name="earName/#{ejbName}/local" />
+<programlisting language="XML" role="XML"><![CDATA[<core:init jndi-name="earName/#{ejbName}/local" />
 ]]></programlisting>
 			 <para>
 				Here, <literal>earName</literal> is the name of the EAR in which the bean is deployed. Seam replaces <literal>#{ejbName}</literal> with the name of the EJB, and the final segment represents the type of interface (local or remote).
@@ -379,7 +379,7 @@
 				When outside the <filename>EAR</filename> context (for example, when using the JBoss Embeddable EJB3 container), the first segment is dropped, since there is no <filename>EAR</filename>, which leaves us with the following pattern:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<core:init jndi-name="#{ejbName}/local" />]]>
+<programlisting language="XML" role="XML"><![CDATA[<core:init jndi-name="#{ejbName}/local" />]]>
 </programlisting>
 			 <para>
 				This process looks complicated, but in reality comprises few steps.
@@ -408,7 +408,7 @@
 				For example, assume that you have the following EJB bean and interface defined:
 			</para>
 			 
-<programlisting role="JAVA"><![CDATA[package com.example.myapp; 
+<programlisting language="Java" role="JAVA">package com.example.myapp; 
 import javax.ejb.Local; 
 
 @Local 
@@ -425,7 +425,7 @@
 public class AuthenticatorBean implements Authenticator { 
   public boolean authenticate() { ... } 
 } 
-]]></programlisting>
+</programlisting>
 			 <para>
 				Assuming that your EJB bean class is deployed in an <filename>EAR</filename> named <literal>myapp</literal>, the global JNDI name assigned on the JBoss AS will be <literal>myapp/AuthenticatorBean/local</literal>. You can refer to this EJB component as a Seam component with the name <literal>authenticator</literal>, and Seam will use the JNDI pattern (or the <literal>@JndiName</literal> annotation) to locate it in JNDI.
 			</para>
@@ -436,7 +436,7 @@
 				You must define the EJB references in two locations when using Seam with a non-JBoss application server. If you look up the Seam EJB component with JSF (in a JSF view, or as a JSF action listener) or a Seam JavaBean component, then you must declare the EJB reference in <filename>web.xml</filename>. The EJB reference that would be required for our example is:\
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<ejb-local-ref> 
+<programlisting language="XML" role="XML"><![CDATA[<ejb-local-ref> 
   <ejb-ref-name>myapp/AuthenticatorBean/local</ejb-ref-name> 
   <ejb-ref-type>Session</ejb-ref-type> 
   <local>org.example.vehicles.action.Authenticator</local> 
@@ -455,13 +455,13 @@
 				Assuming that you have an EJB with a resolved name of <literal>RegisterAction</literal>, the following Seam injection applies:
 			</para>
 			 
-<programlisting role="JAVA"><![CDATA[@In(create = true) Authenticator authenticator; 
-]]></programlisting>
+<programlisting language="Java" role="JAVA">@In(create = true) Authenticator authenticator; 
+</programlisting>
 			 <para>
 				For this injection to work, you must also establish the link in <filename>ejb-jar.xml</filename>, like so:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<ejb-jar> 
+<programlisting language="XML" role="XML"><![CDATA[<ejb-jar> 
   <enterprise-beans> 
     <session> 
       <ejb-name>RegisterAction</ejb-name> 
@@ -487,13 +487,13 @@
 				Some application servers (such as Glassfish) require you to specify JNDI names for all EJB components explicitly, sometimes more than once. You may also need to alter the JNDI pattern used in Seam, even if you follow the JBoss AS naming convention. For example, in Glassfish the global JNDI names are automatically prefixed with <literal>java:comp/env</literal>, so you must define the JNDI pattern as follows:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<core:init jndi-name="java:comp/env/earName/#{ejbName}/local" />
+<programlisting language="XML" role="XML"><![CDATA[<core:init jndi-name="java:comp/env/earName/#{ejbName}/local" />
 ]]></programlisting>
 			 <para>
 				For transaction management, we recommend using a special built-in component that is fully aware of container transactions, and can correctly process transaction success events registered with the <literal>Events</literal> component. To tell Seam when container-managed transactions end, add the following line to your <filename>components.xml</filename> file:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<transaction:ejb-transaction/>
+<programlisting language="XML" role="XML"><![CDATA[<transaction:ejb-transaction/>
 ]]></programlisting>
 		</section>
 		
@@ -523,7 +523,7 @@
 			There are two ways to tell Seam about your JPA provider. The first is to update your application&#39;s <filename>components.xml</filename> so that the generic <literal>PersistenceProvider</literal> takes precedence over the Hibernate version. Simply add the following to the file:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<component name="org.jboss.seam.persistence.persistenceProvider" 
+<programlisting language="XML" role="XML"><![CDATA[<component name="org.jboss.seam.persistence.persistenceProvider" 
            class="org.jboss.seam.persistence.PersistenceProvider" 
            scope="stateless"> 
 </component>
@@ -532,7 +532,7 @@
 			To take advantage of any of your JPA provider&#39;s non-standard features, you must write your own implementation of the <literal>PersistenceProvider</literal>. (You can use <literal>HibernatePersistenceProvider</literal> as a starting point.) Tell Seam to use this <literal>PersistenceProvider</literal> like so:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<component name="org.jboss.seam.persistence.persistenceProvider" 
+<programlisting language="XML" role="XML"><![CDATA[<component name="org.jboss.seam.persistence.persistenceProvider" 
            class="org.your.package.YourPersistenceProvider"> 
 </component>
 ]]></programlisting>
@@ -560,7 +560,7 @@
 				Once packaged into an <filename>EAR</filename>, your archive will be structured similarly to the following:
 			</para>
 			 
-<programlisting><![CDATA[my-application.ear/
+<screen>my-application.ear/
     jboss-seam.jar
     lib/
         jboss-el.jar
@@ -593,8 +593,8 @@
                     LoginBean.class
                     Register.class
                     RegisterBean.class
-                    ...]]>
-</programlisting>
+		    ...
+</screen>
 			 <para>
 				Declare <filename>jboss-seam.jar</filename> as an EJB module in <filename>META-INF/application.xml</filename>. Add <filename>jboss-el.jar</filename> to the <filename>EAR</filename> classpath by placing it in the <filename>EAR</filename>&#39;s <literal>lib</literal> directory.
 			</para>
@@ -642,13 +642,13 @@
 				Install the following built-in component to have Seam bootstrap a Hibernate <literal>SessionFactory</literal> from your <literal>hibernate.cfg.xml</literal> file:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<persistence:hibernate-session-factory name="hibernateSessionFactory"/>
+<programlisting language="XML" role="XML"><![CDATA[<persistence:hibernate-session-factory name="hibernateSessionFactory"/>
 ]]></programlisting>
 			 <para>
 				To make a Seam-managed Hibernate <literal>Session</literal> available via injection, configure a <literal>managed session</literal> as follows:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<persistence:managed-hibernate-session name="hibernateSession" 
+<programlisting language="XML" role="XML"><![CDATA[<persistence:managed-hibernate-session name="hibernateSession" 
              session-factory="#{hibernateSessionFactory}"/>
  ]]></programlisting>
 		</section>
@@ -659,13 +659,13 @@
 				Install the following built-in component to have Seam bootstrap a JPA <literal>EntityManagerFactory</literal> from your <filename>persistence.xml</filename> file:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<persistence:entity-manager-factory name="entityManagerFactory"/>
+<programlisting language="XML" role="XML"><![CDATA[<persistence:entity-manager-factory name="entityManagerFactory"/>
 ]]></programlisting>
 			 <para>
 				To make a Seam-managed JPA <literal>EntityManager</literal> available via injection, configure a managed persistence context as follows:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<persistence:managed-persistence-context name="entityManager" 
+<programlisting language="XML" role="XML"><![CDATA[<persistence:managed-persistence-context name="entityManager" 
              entity-manager-factory="#{entityManagerFactory}"/>
  ]]></programlisting>
 		</section>
@@ -676,7 +676,7 @@
 				Your application will have the following structure when packaged as a <filename>WAR</filename>:
 			</para>
 			 
-<programlisting><![CDATA[my-application.war/
+<screen>my-application.war/
     META-INF/
         MANIFEST.MF
     WEB-INF/
@@ -707,7 +707,7 @@
     login.jsp
     register.jsp
     ...
-]]></programlisting>
+</screen>
 			 <para>
 				Some additional configuration is required in order to deploy Hibernate in a non-EE environment, such as TestNG.
 			</para>
@@ -721,13 +721,13 @@
 			To use Seam outside an EE environment, you must tell Seam how to manage transactions, since JTA will not be available. If you use JPA, you can tell Seam to use JPA resource-local transactions &#8212; that is, <literal>EntityTransaction</literal> &#8212; like so:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<transaction:entity-transaction entity-manager="#{entityManager}"/>
+<programlisting language="XML" role="XML"><![CDATA[<transaction:entity-transaction entity-manager="#{entityManager}"/>
 ]]></programlisting>
 		 <para>
 			If you use Hibernate, you can tell Seam to use the Hibernate transaction API with the following:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<transaction:hibernate-transaction session="#{session}"/>
+<programlisting language="XML" role="XML"><![CDATA[<transaction:hibernate-transaction session="#{session}"/>
 ]]></programlisting>
 		 <para>
 			You must also define a datasource.
@@ -770,7 +770,7 @@
 				A <filename>WAR</filename>-based deployment on a Servlet engine will be structured as follows:
 			</para>
 			 
-<programlisting><![CDATA[my-application.war/
+<screen>my-application.war/
     META-INF/
         MANIFEST.MF
     WEB-INF/
@@ -802,7 +802,7 @@
     login.jsp
     register.jsp
     ...
-]]></programlisting>
+</screen>
 <!--   
 			 <para>
 				You can deploy most of Seam&#39;s example applications to Tomcat by running <literal>ant deploy.tomcat</literal>.
@@ -818,7 +818,7 @@
 			Seam&#39;s jBPM integration is not installed by default. To enable jBPM, you must install a built-in component. You must also explicitly list your process and pageflow definitions. In <filename>components.xml</filename>:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<bpm:jbpm> 
+<programlisting language="XML" role="XML"><![CDATA[<bpm:jbpm> 
   <bpm:pageflow-definitions> 
     <value>createDocument.jpdl.xml</value> 
     <value>editDocument.jpdl.xml</value> 
@@ -833,7 +833,7 @@
 			If you only have pageflows, no further configuration is required. If you have business process definitions, you must provide a jBPM configuration, and a Hibernate configuration for jBPM. The Seam DVD Store demo includes example <filename>jbpm.cfg.xml</filename> and <filename>hibernate.cfg.xml</filename> files that will work with Seam:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<jbpm-configuration> 
+<programlisting language="XML" role="XML"><![CDATA[<jbpm-configuration> 
   <jbpm-context> 
     <service name="persistence"> 
       <factory> 
@@ -864,7 +864,7 @@
 				There is no well-defined packaging format for jBPM configuration and process or pageflow definition files. While other standard packaging formats may be developed, the Seam examples are packaged into the root of the <filename>EAR</filename>, and follow this structure:
 			</para>
 			 
-<programlisting><![CDATA[my-application.ear/
+<screen>my-application.ear/
     jboss-seam.jar
     lib/
        jboss-el.jar
@@ -904,8 +904,8 @@
     createDocument.jpdl.xml
     editDocument.jpdl.xml
     approveDocument.jpdl.xml
-    documentLifecycle.jpdl.xml]]>
-</programlisting>
+    documentLifecycle.jpdl.xml
+</screen>
 		</section>
 		
 	</section>
@@ -919,7 +919,7 @@
 			In the <literal>LRUStatefulContextCachePolicy</literal> cache configuration, modify the value of <literal>max-bean-life</literal> to change the default stateful session bean timeout:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<container-cache-conf>
+<programlisting language="XML" role="XML"><![CDATA[<container-cache-conf>
   <cache-policy>
     org.jboss.ejb.plugins.LRUStatefulContextCachePolicy
   </cache-policy>
@@ -944,7 +944,7 @@
 			You can modify the default HTTP Session timeout in <filename>server/default/deploy/jboss-web.deployer/conf/web.xml</filename> for JBoss 4.2.x or later. The following entry in the <filename>web.xml</filename> file controls the default session timeout for all web applications:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<session-config> 
+<programlisting language="XML" role="XML"><![CDATA[<session-config> 
   <!-- HTTP Session timeout, in minutes --> 
   <session-timeout>30</session-timeout> 
 </session-config>
@@ -976,9 +976,9 @@
 			You can also use Seam to handle custom resources &#8212; that is, Seam can handle specific annotations. First, provide a list of annotation types to handle in the <literal>/META-INF/seam-deployment.properties</literal> files, like so:
 		</para>
 		 
-<programlisting><![CDATA[# A colon-separated list of annotation types to handle 
+<screen># A colon-separated list of annotation types to handle 
 org.jboss.seam.deployment.annotationTypes=com.acme.Foo:com.acme.Bar
-]]></programlisting>
+</screen>
 		 <para>
 			Then, collect all classes annotated with <literal>@Foo</literal> on application startup:
 		</para>
@@ -986,16 +986,16 @@
 <programlisting><![CDATA[@Name("fooStartup") @Scope(APPLICATION) @Startup public class FooStartup { @In("#{deploymentStrategy.annotatedClasses[&#39;com.acme.Foo&#39;]}") private Set<Class<Object>> fooClasses; @In("#{hotDeploymentStrategy.annotatedClasses[&#39;com.acme.Foo&#39;]}") private Set<Class<Object>> hotFooClasses; @Create public void create() { for (Class clazz: fooClasses) { handleClass(clazz); } for (Class clazz: hotFooClasses) { handleClass(clazz); } } } ]]>
 </programlisting>
 --> 
-<programlisting><![CDATA[@Name("fooStartup")
+<programlisting language="Java" role="JAVA">@Name("fooStartup")
 @Scope(APPLICATION)
 @Startup
 public class FooStartup {
 
    @In("#{deploymentStrategy.annotatedClasses['com.acme.Foo']}")
-   private Set<Class<Object>> fooClasses;
+   private Set&lt;Class&lt;Object&gt;&gt; fooClasses;
    
    @In("#{hotDeploymentStrategy.annotatedClasses['com.acme.Foo']}")
-   private Set<Class<Object>> hotFooClasses;
+   private Set&lt;Class&lt;Object&gt;&gt; hotFooClasses;
 
    @Create
    public void create() {
@@ -1012,14 +1012,14 @@
    }
 
 }
-]]></programlisting>
+</programlisting>
 
 
 		 <para>
 			You can also set Seam to handle any resource. For example, if you want to process files with the <literal>.foo.xml</literal> extension, you can write a custom deployment handler:
 		</para>
 		 
-<programlisting><![CDATA[public class FooDeploymentHandler implements DeploymentHandler { 
+<programlisting language="Java" role="JAVA">public class FooDeploymentHandler implements DeploymentHandler { 
   private static DeploymentMetadata FOO_METADATA = new DeploymentMetadata() {
 
     public String getFileNameSuffix() {
@@ -1035,7 +1035,7 @@
     return FOO_METADATA;
   }
 }
-]]></programlisting>
+</programlisting>
 		 <para>
 			This provides us with a list of all files with the <literal>.foo.xml</literal> suffix.
 		</para>
@@ -1043,14 +1043,14 @@
 			Next, register the deployment handler with Seam in <filename>/META-INF/seam-deployment.properties</filename>:
 		</para>
 		 
-<programlisting><![CDATA[# For standard deployment 
+<screen># For standard deployment 
 # org.jboss.seam.deployment.deploymentHandlers=
 #    com.acme.FooDeploymentHandler
  
 # For hot deployment 
 # org.jboss.seam.deployment.hotDeploymentHandlers=
 #    com.acme.FooDeploymentHandler
-]]></programlisting>
+</screen>
 		 <para>
 			You can register multiple deployment handlers with a comma-separated list.
 		</para>
@@ -1058,7 +1058,7 @@
 			Seam uses deployment handlers internally to install components and namespaces, so the <literal>handle()</literal> is called too early in Seam bootstrap to be useful. You can access the deployment handler easily during the startup of an application-scoped component:
 		</para>
 		 
-<programlisting><![CDATA[@Name("fooStartup") 
+<programlisting language="Java" role="Java">@Name("fooStartup") 
 @Scope(APPLICATION) 
 @Startup 
 public class FooStartup { 
@@ -1079,7 +1079,7 @@
       // ...
   } 
 }
-]]></programlisting>
+</programlisting>
 	</section>
 	
 </chapter>




More information about the jboss-cvs-commits mailing list