[jboss-cvs] JBossAS SVN: r105612 - 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
Thu Jun 3 01:34:45 EDT 2010


Author: misty at redhat.com
Date: 2010-06-03 01:34:45 -0400 (Thu, 03 Jun 2010)
New Revision: 105612

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

Modified: projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Spring.xml
===================================================================
--- projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Spring.xml	2010-06-03 05:19:54 UTC (rev 105611)
+++ projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Spring.xml	2010-06-03 05:34:45 UTC (rev 105612)
@@ -63,7 +63,7 @@
 			Inject Seam component instances into Spring beans with the <literal><![CDATA[<seam:instance/>]]></literal> namespace handler. To enable the Seam namespace handler, the Seam namespace must first be added to the Spring beans definition file:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<beans xmlns="http://www.springframework.org/schema/beans"
+<programlisting language="XML" role="XML"><![CDATA[<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:seam="http://jboss.com/products/seam/spring-seam"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation=
@@ -76,7 +76,7 @@
 			Any Seam component can now be injected into any Spring bean, like so:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<bean id="someSpringBean" class="SomeSpringBeanClass" scope="prototype">
+<programlisting language="XML" role="XML"><![CDATA[<bean id="someSpringBean" class="SomeSpringBeanClass" scope="prototype">
   <property name="someProperty">
     <seam:instance name="someComponent"/>
   </property>
@@ -86,7 +86,7 @@
 			You can use an EL expression instead of a component name:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<bean id="someSpringBean" class="SomeSpringBeanClass" scope="prototype">
+<programlisting language="XML" role="XML"><![CDATA[<bean id="someSpringBean" class="SomeSpringBeanClass" scope="prototype">
   <property name="someProperty">
     <seam:instance name="#{someExpression}"/>
   </property>
@@ -96,7 +96,7 @@
 			You can inject a Seam component instance into a Spring bean by using a Spring bean ID, like so:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<seam:instance name="someComponent" id="someSeamComponentInstance"/>
+<programlisting language="XML" role="XML"><![CDATA[<seam:instance name="someComponent" id="someSeamComponentInstance"/>
 
 <bean id="someSpringBean" class="SomeSpringBeanClass" scope="prototype">
   <property name="someProperty" ref="someSeamComponentInstance">
@@ -116,7 +116,7 @@
 			The <literal><![CDATA[<seam:instance/>]]></literal> tag lets us automatically proxy the Seam component.
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<seam:instance id="seamManagedEM" 
+<programlisting language="XML" role="XML"><![CDATA[<seam:instance id="seamManagedEM" 
                name="someManagedEMComponent" 
                proxy="true"/>
 
@@ -141,7 +141,7 @@
 			The Spring <literal>DelegatingVariableResolver</literal> assists Spring integration with JavaServer Faces (JSF). This <literal>VariableResolver</literal> uses EL with bean IDs to make Spring beans available to JSF. You will need to add the <literal>DelegatingVariableResolver</literal> to <filename>faces-config.xml</filename>:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<application> 
+<programlisting language="XML" role="XML"><![CDATA[<application> 
   <variable-resolver> 
     org.springframework.web.jsf.DelegatingVariableResolver 
   </variable-resolver>
@@ -151,8 +151,8 @@
 			You can then inject Spring beans using <literal>@In</literal>:
 		</para>
 		 
-<programlisting role="JAVA"><![CDATA[@In("#{bookingService}") 
-private BookingService bookingService;]]>
+<programlisting language="Java" role="JAVA">@In("#{bookingService}") 
+private BookingService bookingService;
 </programlisting>
 		 <para>
 			Spring beans are not limited to injection. They can be used wherever EL expressions are used in Seam: process and pageflow definitions, working memory assertions, etc.
@@ -165,7 +165,7 @@
 			The <literal><![CDATA[<seam:component/>]]></literal> namespace handler can be used to transform any Spring bean into a Seam component. Just add the <literal><![CDATA[<seam:component/>]]></literal> tag to the declaration of the bean that you want to make into a Seam component:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<bean id="someSpringBean" class="SomeSpringBeanClass" scope="prototype"> 
+<programlisting language="XML" role="XML"><![CDATA[<bean id="someSpringBean" class="SomeSpringBeanClass" scope="prototype"> 
   <seam:component/> 
 </bean>
 ]]>
@@ -187,7 +187,7 @@
 			Specify <literal><![CDATA[<seam:configure-scopes/>]]></literal> in a Spring bean factory configuration to make all Seam scopes available to Spring beans as custom scopes. To associate a Spring bean with a particular Seam scope, specify the desired scope in the <literal>scope</literal> attribute of the bean definition.
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<!-- Only needs to be specified once per bean factory-->
+<programlisting language="XML" role="XML"><![CDATA[<!-- Only needs to be specified once per bean factory-->
 <seam:configure-scopes/>
 
 ...
@@ -205,7 +205,7 @@
 			The latter approach lets you inject Seam-scoped Spring beans into other Spring beans without using <literal><![CDATA[<seam:instance/>]]></literal>. However, you must be careful to maintain scope impedance. Normally, you would specify <literal><![CDATA[<aop:scoped-proxy/>]]></literal> in the bean definition, but Seam-scoped Spring beans are not compatible with <literal><![CDATA[<aop:scoped-proxy/>]]></literal>. Therefore, to inject a Seam-scoped Spring bean into a singleton, use <literal><![CDATA[<seam:instance/>]]></literal>:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<bean id="someSpringBean" class="SomeSpringBeanClass" scope="seam.CONVERSATION"/>
+<programlisting language="XML" role="XML"><![CDATA[<bean id="someSpringBean" class="SomeSpringBeanClass" scope="seam.CONVERSATION"/>
 
 ...
 
@@ -226,7 +226,7 @@
 			To configure Seam to use Spring transactions, enable the <literal>SpringTransaction</literal> component, like so:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<spring:spring-transaction 
+<programlisting language="XML" role="XML"><![CDATA[<spring:spring-transaction 
         platform-transaction-manager="#{transactionManager}"/>]]>
 </programlisting>
 		 <para>
@@ -266,7 +266,7 @@
 			Spring's persistence context propagation model allows only one open <literal>EntityManager</literal> per <literal>EntityManagerFactory</literal>, so the Seam integration works by wrapping an <literal>EntityManagerFactory</literal> around a Seam-managed persistence context, like so:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<bean id="seamEntityManagerFactory" 
+<programlisting language="XML" role="XML"><![CDATA[<bean id="seamEntityManagerFactory" 
     class="org.jboss.seam.ioc.spring.SeamManagedEntityManagerFactoryBean"> 
   <property name="persistenceContextName" value="entityManager"/> 
 </bean>]]>
@@ -275,7 +275,7 @@
 			Here, <literal>persistenceContextName</literal> is the name of the Seam-managed persistence context component. By default, this <literal>EntityManagerFactory</literal> has a <literal>unitName</literal> equal to the Seam component name — in this case, <literal>entityManager</literal>. If you wish to provide a different <literal>unitName</literal>, you can provide a <literal>persistenceUnitName</literal> like so:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<bean id="seamEntityManagerFactory" 
+<programlisting language="XML" role="XML"><![CDATA[<bean id="seamEntityManagerFactory" 
     class="org.jboss.seam.ioc.spring.SeamManagedEntityManagerFactoryBean">
   <property name="persistenceContextName" value="entityManager"/>
   <property name="persistenceUnitName" value="bookingDatabase:extended"/>
@@ -285,7 +285,7 @@
 			This <literal>EntityManagerFactory</literal> can now be used in any Spring-provided tools; in this case, you can use Spring's <literal>PersistenceAnnotationBeanPostProcessor</literal> just as you would in Spring.
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<bean class="org.springframework.orm.jpa.support
+<programlisting language="XML" role="XML"><![CDATA[<bean class="org.springframework.orm.jpa.support
              .PersistenceAnnotationBeanPostProcessor"/>]]>
 </programlisting>
 		 <para>
@@ -295,7 +295,7 @@
 			The <filename>applicationContext.xml</filename> might look like:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<bean id="entityManagerFactory" 
+<programlisting language="XML" role="XML"><![CDATA[<bean id="entityManagerFactory" 
       class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
   <property name="persistenceUnitName" value="bookingDatabase"/>
 </bean>
@@ -314,14 +314,14 @@
 			The <filename>component.xml</filename> might look like:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<persistence:managed-persistence-context name="entityManager" 
+<programlisting language="XML" role="XML"><![CDATA[<persistence:managed-persistence-context name="entityManager" 
     auto-create="true" entity-manager-factory="#{entityManagerFactory}"/>]]>
 </programlisting>
 		 <para>
 			<literal>JpaTemplate</literal> and <literal>JpaDaoSupport</literal> have an identical configuration in a Spring-based persistence context and in a normal Seam-managed persistence context.<!-- #modify: Please confirm; the original paragraph had two identical terms. -->
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<bean id="bookingService" 
+<programlisting language="XML" role="XML"><![CDATA[<bean id="bookingService" 
       class="org.jboss.seam.example.spring.BookingService"> 
   <property name="entityManagerFactory" ref="seamEntityManagerFactory"/> 
 </bean>]]>
@@ -337,7 +337,7 @@
 			Spring's propagation model allows only one open <literal>EntityManager</literal> per <literal>EntityManagerFactory</literal> to be available to Spring tools, so Seam integrates by wrapping a proxy <literal>SessionFactory</literal> around a Seam-managed Hibernate session context.
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<bean id="seamSessionFactory" 
+<programlisting language="XML" role="XML"><![CDATA[<bean id="seamSessionFactory" 
     class="org.jboss.seam.ioc.spring.SeamManagedSessionFactoryBean"> 
   <property name="sessionName" value="hibernateSession"/> 
 </bean>]]>
@@ -356,7 +356,7 @@
 			To overcome these limitations, the Spring integration includes a Seam component that can start a Spring <literal>ApplicationContext</literal>. To use this component, place the <literal><![CDATA[<spring:context-loader/>]]></literal> definition in the <filename>components.xml</filename> file. Specify your Spring context file location in the <literal>config-locations</literal> attribute. If more than one configuration file is required, you can place them in the nested <literal><![CDATA[<spring:config-locations/>]]></literal> element, as per standard <filename>components.xml</filename> multi-value practices.
 		</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:spring="http://jboss.com/products/seam/spring"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation=
@@ -378,14 +378,14 @@
 			Spring provides an abstraction for executing code asynchronously, called a <literal>TaskExecutor</literal>. The Spring-Seam integration lets you use a Spring <literal>TaskExecutor</literal> to execute immediate <literal>@Asynchronous</literal> method calls. To enable this functionality, install the <literal>SpringTaskExecutorDispatchor</literal> and provide a Spring -bean defined <literal>taskExecutor</literal> like so:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<spring:task-executor-dispatcher  
+<programlisting languge="XML" role="XML"><![CDATA[<spring:task-executor-dispatcher  
         task-executor="#{springThreadPoolTaskExecutor}"/>]]>
 </programlisting>
 		 <para>
 			Because a Spring <literal>TaskExecutor</literal> does not support scheduling asynchronous events, you can provide handling with a fallback Seam <literal>Dispatcher</literal>, like so:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<!-- 
+<programlisting language="XML" role="XML"><![CDATA[<!-- 
   Install a ThreadPoolDispatcher to handle scheduled asynchronous event
 -->
 <core:thread-pool-dispatcher name="threadPoolDispatcher"/>




More information about the jboss-cvs-commits mailing list