[jboss-cvs] JBossAS SVN: r95987 - projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 3 23:40:16 EST 2009


Author: benlc
Date: 2009-11-03 23:40:16 -0500 (Tue, 03 Nov 2009)
New Revision: 95987

Modified:
   projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Author_Group.xml
   projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Configuration.xml
   projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Controls.xml
   projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Conversations.xml
   projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Dependencies.xml
   projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Drools.xml
   projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Events.xml
   projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Spring.xml
Log:
'Committing initial changes to reflect JBPAPP_5_0-CR5'


Modified: projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Author_Group.xml
===================================================================
--- projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Author_Group.xml	2009-11-04 04:39:21 UTC (rev 95986)
+++ projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Author_Group.xml	2009-11-04 04:40:16 UTC (rev 95987)
@@ -112,6 +112,13 @@
 		</affiliation>
 	</othercredit>
 	<othercredit>
+      <firstname>Francesco</firstname>
+      <surname>Milesi</surname>
+      <affiliation>
+         <shortaffil>Italian Translation</shortaffil>
+      </affiliation>
+   </othercredit>
+	<othercredit>
 		<firstname>Japan</firstname>
 		<surname>JBoss User Group</surname>
 		<affiliation>

Modified: projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Configuration.xml
===================================================================
--- projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Configuration.xml	2009-11-04 04:39:21 UTC (rev 95986)
+++ projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Configuration.xml	2009-11-04 04:40:16 UTC (rev 95987)
@@ -1021,27 +1021,27 @@
 		</para>
 		 
 <programlisting><![CDATA[public class FooDeploymentHandler implements DeploymentHandler { 
-  private Set<InputStream> files = new HashSet<InputStream>(); 
+  private static DeploymentMetadata FOO_METADATA = new DeploymentMetadata() {
+
+    public String getFileNameSuffix() {
+      return ".foo.xml";
+    }
+  };
+  
   public String getName() { 
     return "fooDeploymentHandler"; 
   } 
-  
-  public Set<InputStream> getFiles() { 
-    return files; 
-  } 
-  
-  public void handle(String name, ClassLoader classLoader) { 
-    if (name.endsWith(".foo.xml")) { 
-      files.add(classLoader.getResourceAsStream(name)); 
-    } 
-  } 
+
+  public DeploymentMetadata getMetadata() {
+    return FOO_METADATA;
+  }
 }
 ]]></programlisting>
 		 <para>
 			This provides us with a list of all files with the <literal>.foo.xml</literal> suffix.
 		</para>
 		 <para>
-			Next, register the deployment handler with Seam. In <filename>/META-INF/seam-deployment.properties</filename>:
+			Next, register the deployment handler with Seam in <filename>/META-INF/seam-deployment.properties</filename>:
 		</para>
 		 
 <programlisting><![CDATA[# For standard deployment 
@@ -1063,17 +1063,21 @@
 @Scope(APPLICATION) 
 @Startup 
 public class FooStartup { 
-  @In("#{deploymentStrategy['fooDeploymentHandler']}") 
-  private MyDeploymentHandler myDeploymentHandler; 
-  @In("#{hotDeploymentStrategy['fooDeploymentHandler']}") 
-  private MyDeploymentHandler myHotDeploymentHandler; 
+  @In("#{deploymentStrategy.deploymentHandlers['fooDeploymentHandler']}")
+  private FooDeploymentHandler myDeploymentHandler;
+  @In("#{hotDeploymentStrategy.deploymentHandlers['fooDeploymentHandler']}")
+  private FooDeploymentHandler myHotDeploymentHandler;
   @Create public void create() { 
-    for (InputStream is : myDeploymentHandler.getFiles()) { 
-      handleFooXml(is); 
+    for (FileDescriptor fd: myDeploymentHandler.getResources()) {
+      handleFooXml(fd);
     } 
-    for (InputStream is : myHotDeploymentHandler.getFiles()) { 
-      handleFooXml(is); 
+    for (FileDescriptor f: myHotDeploymentHandler.getResources()) {
+      handleFooXml(fd);
     } 
+  }
+  
+  public void handleFooXml(FileDescriptor fd) {
+      // ...
   } 
 }
 ]]></programlisting>

Modified: projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Controls.xml
===================================================================
--- projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Controls.xml	2009-11-04 04:39:21 UTC (rev 95986)
+++ projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Controls.xml	2009-11-04 04:40:16 UTC (rev 95987)
@@ -1,11 +1,14 @@
 <?xml version='1.0' encoding='utf-8' ?>
 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 ]>
-
+<!-- This Chapter has been updated on 04 November 2009 to reflect JBPAPP_5_0-CR5 
+     sourced from:
+     https://svn.jboss.org/repos/seam/tags/JBPAPP_5_0-CR5/doc/Seam_Reference_Guide/en-US
+-->
 <chapter id="controls" lang="en-US">
 	<title>Seam JSF controls</title>
 	 <para>
-		Seam includes a number of JavaServer Faces (JSF) controls to complement built-in controls, and controls from other third-party libraries. We recommend JBoss RichFaces, ICEsoft ICEfaces and Apache MyFaces Trinidad tag libraries for use with Seam. We do not recommend the use of the Tomahawk tag library.
+		Seam includes a number of JavaServer Faces (JSF) controls to complement built-in controls, and controls from other third-party libraries. We recommend JBoss RichFaces and Apache MyFaces Trinidad tag libraries for use with Seam. We do not recommend the use of the Tomahawk tag library.
 	</para>
 	 <section id="controls.tags">
 		<title>Tags</title>
@@ -472,6 +475,11 @@
 							<literal>message</literal> &#8212; Message to show on failure.
 						</para>
 					</listitem>
+					<listitem>
+                    	<para>
+                      		<literal>required</literal> &#8212; False will disable a check that a value at all is inputted in fields. 
+                  		</para>
+               		</listitem>
 					 <listitem>
 						<para>
 							<literal>messageId</literal> &#8212; Message ID to show on failure.

Modified: projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Conversations.xml
===================================================================
--- projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Conversations.xml	2009-11-04 04:39:21 UTC (rev 95986)
+++ projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Conversations.xml	2009-11-04 04:40:16 UTC (rev 95987)
@@ -1,7 +1,11 @@
 <?xml version='1.0' encoding='utf-8' ?>
 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 ]>
-
+<!-- This Chapter has been checked on 04 November 2009 that it reflects JBPAPP_5_0-CR5 
+     sourced from:
+     https://svn.jboss.org/repos/seam/tags/JBPAPP_5_0-CR5/doc/Seam_Reference_Guide/en-US
+     The chapter was previously updated. 
+-->
 <chapter id="conversations" lang="en-US">
 	<title>Conversations and workspace management</title>
 	 <para>

Modified: projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Dependencies.xml
===================================================================
--- projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Dependencies.xml	2009-11-04 04:39:21 UTC (rev 95986)
+++ projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Dependencies.xml	2009-11-04 04:40:16 UTC (rev 95987)
@@ -2,6 +2,11 @@
 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 ]>
 
+<!-- This Chapter has been updated on 04 November 2009 to reflect JBPAPP_5_0-CR5 
+     sourced from:
+     https://svn.jboss.org/repos/seam/tags/JBPAPP_5_0-CR5/doc/Seam_Reference_Guide/en-US
+-->
+
 <chapter id="dependencies" lang="en-US">
 	<title>Dependencies</title>
 	 <section id="jdk_dependencies">
@@ -180,6 +185,7 @@
 									</para>
 								</entry>
 							</row>
+							<!--  
 							 <row>
 								<entry>
 									<para>
@@ -202,6 +208,7 @@
 									</para>
 								</entry>
 							</row>
+							-->
 							 <row>
 								<entry>
 									<para>
@@ -311,7 +318,9 @@
 							 <row>
 								<entry>
 									<para>
-										<filename>urlrewrite.jar</filename>
+									<!-- Edit to (JBPAPP_5_0-CR5) -->
+									<!-- <filename>urlrewrite.jar</filename> -->
+									<literal>urlrewritefilter.jar</literal>
 									</para>
 								</entry>
 								 <entry align="center">
@@ -1012,7 +1021,7 @@
 				</tgroup>
 			</table>
 		</section>-->
-		
+		<!-- Section below partially updated to (JBPAPP_5_0-CR5) -->
 		 <section>
 			<title>JBoss Rules</title>
 			 <para>
@@ -1094,6 +1103,20 @@
 								</para>
 							</entry>
 						</row>
+						<row>
+              				<entry>
+                				<para><literal>drools-api.jar</literal></para>
+              				</entry>
+              				<entry align="center">
+                				<para>runtime</para>
+              				</entry>
+              				<entry align="center">
+                				<para>EAR</para>
+              				</entry>
+              				<entry>
+                			  <para></para>
+              				</entry>
+            			</row>
 						 <row>
 							<entry>
 								<para>
@@ -1113,7 +1136,8 @@
 							 <entry>
 
 							</entry>
-						</row>
+						 </row>
+						
 						 <row>
 							<entry>
 								<para>
@@ -1134,6 +1158,36 @@
 
 							</entry>
 						</row>
+						
+						<row>
+              				<entry>
+                				<para><literal>drools-decisiontables.jar</literal></para>
+              				</entry>
+              				<entry align="center">
+                				<para>runtime</para>
+              				</entry>
+              				<entry align="center">
+                				<para>EAR</para>
+              				</entry>
+              				<entry>
+                				<para></para>
+              				</entry>
+            			</row>
+						
+						<row>
+              				<entry>
+                				<para><literal>drools-templates.jar</literal></para>
+              				</entry>
+              				<entry align="center">
+                				<para>runtime</para>
+              				</entry>
+              				<entry align="center">
+                				<para>EAR</para>
+              				</entry>
+              				<entry>
+                				<para></para>
+              				</entry>
+            			</row>
 						 <row>
 							<entry>
 								<para>
@@ -1157,7 +1211,7 @@
 						 <row>
 							<entry>
 								<para>
-									<filename>mvel.jar</filename>
+									<filename>mvel2.jar</filename>
 								</para>
 							</entry>
 							 <entry align="center">
@@ -1489,7 +1543,7 @@
 </dependency>]]>
 </programlisting>
 		 <para>
-			The following sample POM will give you Seam, a JPA (provided by Hibernate), and Hibernate Validator:
+			The following sample POM will give you Seam, a JPA (provided by Hibernate), Hibernate Validator and Hibernate Search:
 		</para>
 		 
 <programlisting role="XML"><![CDATA[

Modified: projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Drools.xml
===================================================================
--- projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Drools.xml	2009-11-04 04:39:21 UTC (rev 95986)
+++ projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Drools.xml	2009-11-04 04:40:16 UTC (rev 95987)
@@ -20,7 +20,7 @@
 </drools:rule-base>]]>
 </programlisting>
 		 <para>
-			This component compiles rules from a set of <filename>.drl</filename> files and caches an instance of <literal>org.drools.RuleBase</literal> in the Seam <literal>APPLICATION</literal> context. Note that you will likely need to install multiple rule bases in a rule-driven application.
+			This component compiles rules from a set of DRL (<literal>.drl</literal>) or decision table (<literal>.xls</literal>) files and caches an instance of <literal>org.drools.RuleBase</literal> in the Seam <literal>APPLICATION</literal> context. Note that you will likely need to install multiple rule bases in a rule-driven application.
 		</para>
 		 <para>
 			If you want to use a Drools DSL, you must also specify the DSL definition:
@@ -32,6 +32,40 @@
   </drools:rule-files> 
 </drools:rule-base>]]>
 </programlisting>
+
+		<para>
+       		If you want to register a custom consequence exception handler through the RuleBaseConfiguration, you need to write the handler. This is demonstrated in the following example: 
+         </para>
+         
+<programlisting role="JAVA"><![CDATA[@Scope(ScopeType.APPLICATION)
+ at Startup
+ at Name("myConsequenceExceptionHandler")
+public class MyConsequenceExceptionHandler 
+       implements ConsequenceExceptionHandler, Externalizable {
+  public void readExternal(ObjectInput in) throws IOException, 
+                                           ClassNotFoundException { }
+
+  public void writeExternal(ObjectOutput out) throws IOException { }
+
+  public void handleException(Activation activation, 
+                              WorkingMemory workingMemory,
+                              Exception exception) {
+    throw new ConsequenceException( exception, activation.getRule() );
+  }
+
+}]]></programlisting>
+		<para>
+		and register it:
+		</para>
+<programlisting role="XML"><![CDATA[<drools:rule-base name="policyPricingRules" 
+                  dsl-file="policyPricing.dsl" 
+                  consequence-exception-handler=
+                    "#{myConsequenceExceptionHandler}">
+  <drools:rule-files>
+    <value>policyPricingRules.drl</value>
+  </drools:rule-files>
+</drools:rule-base>]]></programlisting>
+
 		 <para>
 			In most rules-driven applications, rules must be dynamically deployable. A Drools RuleAgent is useful to manage the RuleBase. The RuleAgent can connect to a Drools rule server (BRMS), or hot-deploy rules packages from a local file repository. The RulesAgent-managed RuleBase is also configurable via <filename>components.xml</filename>:
 		</para>
@@ -73,6 +107,20 @@
 		 <para>
 			Notice that we referred the <literal>policyPricingWorkingMemory</literal> back to our rule base via the <literal>ruleBase</literal> configuration property.
 		</para>
+		
+		<para>
+         	We can also add means to be notified of rule engine events, including, for example, rules firing or objects being asserted by adding event listeners to WorkingMemory.
+         </para>
+          
+<programlisting role="XML"><![CDATA[
+<drools:managed-working-memory name="policyPricingWorkingMemory" 
+                               auto-create="true" 
+                               rule-base="#{policyPricingRules}">
+  <drools:event-listeners>
+    <value>org.drools.event.DebugWorkingMemoryEventListener</value>
+    <value>org.drools.event.DebugAgendaEventListener</value>
+  </drools:event-listeners>
+</drools:managed-working-memory>]]></programlisting>
 	</section>
 	
 	 <section>
@@ -86,8 +134,8 @@
 @In Customer customer; 
 
 public void pricePolicy() throws FactException { 
-  policyPricingWorkingMemory.assertObject(policy); 
-  policyPricingWorkingMemory.assertObject(customer); 
+  policyPricingWorkingMemory.insert(policy);
+  policyPricingWorkingMemory.insert(customer);  
   policyPricingWorkingMemory.fireAllRules(); 
 }]]>
 </programlisting>

Modified: projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Events.xml
===================================================================
--- projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Events.xml	2009-11-04 04:39:21 UTC (rev 95986)
+++ projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Events.xml	2009-11-04 04:40:16 UTC (rev 95987)
@@ -1,7 +1,10 @@
 <?xml version='1.0' encoding='utf-8' ?>
 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 ]>
-
+<!-- This Chapter has been updated on 04 November 2009 to reflect JBPAPP_5_0-CR5 
+     sourced from:
+     https://svn.jboss.org/repos/seam/tags/JBPAPP_5_0-CR5/doc/Seam_Reference_Guide/en-US
+-->
 <chapter id="events" lang="en-US">
 	<title>Events, interceptors and exception handling</title>
 	 <para>
@@ -1087,12 +1090,13 @@
 </exception>]]>
 </programlisting>
 			 <para>
-				A <literal>ViewExpiredException</literal> occurs when the user posts to a page after their session has expired. <literal>no-conversation-view-id</literal> and <literal>conversation-required</literal> allow finer-grained control over session expiry from within a conversation.
+				A <literal>ViewExpiredException</literal> occurs when the user posts to a page after their session has expired. The <literal>conversation-required</literal> and <literal>no-conversation-view-id</literal> settings in the Seam page descriptor, discussed in <xref linkend="conversations.required"/>, allow finer-grained control over session expiration while accessing a page used within a conversation.
 			</para>
 		</section>
 		
 	</section>
-	
+<!--  	Edit to JBPAPP_5_0-CR5 -->
+<!--  	
 	 <section>
 		<title><literal>conversation-required</literal></title>
 		 <para>
@@ -1102,6 +1106,6 @@
 <programlisting><![CDATA[<page view-id="/foo.xhtml" conversation-required="true"/>]]>
 </programlisting>
 	</section>
-	
+-->	
 </chapter>
 

Modified: projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Spring.xml
===================================================================
--- projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Spring.xml	2009-11-04 04:39:21 UTC (rev 95986)
+++ projects/docs/enterprise/5.0/Seam_Reference_Guide/en-US/Spring.xml	2009-11-04 04:40:16 UTC (rev 95987)
@@ -299,12 +299,15 @@
       class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
   <property name="persistenceUnitName" value="bookingDatabase"/>
 </bean>
-<bean id="seamEntityManagerFactory" class="org.jboss.seam.ioc.spring.SeamManagedEntityManagerFactoryBean">
+<bean id="seamEntityManagerFactory" 
+    class="org.jboss.seam.ioc.spring.SeamManagedEntityManagerFactoryBean">
   <property name="persistenceContextName" value="entityManager"/>
   <property name="persistenceUnitName" value="bookingDatabase:extended"/>
 </bean>
-<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor">
-  <property name="defaultPersistenceUnitName" value="bookingDatabase:extended"/>
+<bean class="org.springframework.orm.jpa
+             .support.PersistenceAnnotationBeanPostProcessor">
+  <property name="defaultPersistenceUnitName" 
+            value="bookingDatabase:extended"/>
 </bean>]]>
 </programlisting>
 		 <para>




More information about the jboss-cvs-commits mailing list