Seam SVN: r11289 - in branches/enterprise/JBPAPP_5_0/examples: booking and 23 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-14 08:06:14 -0400 (Tue, 14 Jul 2009)
New Revision: 11289
Removed:
branches/enterprise/JBPAPP_5_0/examples/hibernate/build-glassfish.xml
branches/enterprise/JBPAPP_5_0/examples/hibernate/build-jboss405.xml
branches/enterprise/JBPAPP_5_0/examples/hibernate/build-tomcat55.xml
branches/enterprise/JBPAPP_5_0/examples/hibernate/build-tomcat6.xml
branches/enterprise/JBPAPP_5_0/examples/hibernate/build-weblogic92.xml
branches/enterprise/JBPAPP_5_0/examples/hibernate/build-websphere61.xml
branches/enterprise/JBPAPP_5_0/examples/hibernate/resources-glassfish/
branches/enterprise/JBPAPP_5_0/examples/hibernate/resources-tomcat/
branches/enterprise/JBPAPP_5_0/examples/hibernate/resources-weblogic92/
branches/enterprise/JBPAPP_5_0/examples/hibernate/resources-websphere61/
branches/enterprise/JBPAPP_5_0/examples/jpa/build-glassfish.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss-embedded.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss405.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/build-tomcat55.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/build-tomcat6.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/build-weblogic10.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/build-weblogic92.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/build-websphere61.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/build-websphere7.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/resources-glassfish/
branches/enterprise/JBPAPP_5_0/examples/jpa/resources-tomcat/
branches/enterprise/JBPAPP_5_0/examples/jpa/resources-weblogic10/
branches/enterprise/JBPAPP_5_0/examples/jpa/resources-weblogic92/
branches/enterprise/JBPAPP_5_0/examples/jpa/resources-websphere61/
branches/enterprise/JBPAPP_5_0/examples/jpa/resources-websphere7/
Modified:
branches/enterprise/JBPAPP_5_0/examples/booking/readme.txt
branches/enterprise/JBPAPP_5_0/examples/build.xml
branches/enterprise/JBPAPP_5_0/examples/contactlist/readme.txt
branches/enterprise/JBPAPP_5_0/examples/dvdstore/readme.txt
branches/enterprise/JBPAPP_5_0/examples/excel/readme.txt
branches/enterprise/JBPAPP_5_0/examples/groovybooking/build.properties
branches/enterprise/JBPAPP_5_0/examples/hibernate/build.xml
branches/enterprise/JBPAPP_5_0/examples/hibernate/readme.txt
branches/enterprise/JBPAPP_5_0/examples/itext/readme.txt
branches/enterprise/JBPAPP_5_0/examples/jee5/booking/build.xml
branches/enterprise/JBPAPP_5_0/examples/jee5/readme.txt
branches/enterprise/JBPAPP_5_0/examples/jee5/remoting/build.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/build.xml
branches/enterprise/JBPAPP_5_0/examples/jpa/readme.txt
branches/enterprise/JBPAPP_5_0/examples/mail/build.xml
branches/enterprise/JBPAPP_5_0/examples/metawidget/booking/readme.txt
branches/enterprise/JBPAPP_5_0/examples/metawidget/dvdstore/readme.txt
branches/enterprise/JBPAPP_5_0/examples/metawidget/groovybooking/build.properties
branches/enterprise/JBPAPP_5_0/examples/numberguess/readme.txt
branches/enterprise/JBPAPP_5_0/examples/readme.txt
branches/enterprise/JBPAPP_5_0/examples/registration/readme.txt
branches/enterprise/JBPAPP_5_0/examples/remoting/chatroom/readme.txt
branches/enterprise/JBPAPP_5_0/examples/remoting/helloworld/readme.txt
branches/enterprise/JBPAPP_5_0/examples/seambay/readme.txt
branches/enterprise/JBPAPP_5_0/examples/seamdiscs/readme.txt
branches/enterprise/JBPAPP_5_0/examples/seampay/readme.txt
branches/enterprise/JBPAPP_5_0/examples/seamspace/readme.txt
branches/enterprise/JBPAPP_5_0/examples/spring/readme.txt
Log:
JBPAPP-2155
Modified: branches/enterprise/JBPAPP_5_0/examples/booking/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/booking/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/booking/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -5,7 +5,7 @@
Transaction and persistence context management is handled by the
EJB container.
-This example runs on JBoss AS as an EAR or Tomcat with JBoss Embedded as a WAR.
+This example runs on JBoss AS as an EAR.
example.name=booking
Modified: branches/enterprise/JBPAPP_5_0/examples/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/build.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/build.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -35,7 +35,6 @@
<!-- Deployment directories -->
<property name="deploy.dir" value="${jboss.home}/server/default/deploy" />
- <property name="tomcat.deploy.dir" value="${tomcat.home}/webapps" />
<property name="farm.deploy.dir" value="${jboss.home}/server/all/farm" />
<property name="conf.dir" value="${jboss.home}/server/default/conf" />
@@ -104,16 +103,6 @@
<exclude name="**/*" />
</fileset>
- <!-- Added to the tomcat war root on build -->
- <fileset id="tomcat.war.extras" dir=".">
- <exclude name="**/*" />
- </fileset>
-
- <!-- Added to the tomcat jar root on build -->
- <fileset id="tomcat.jar.extras" dir=".">
- <exclude name="**/*" />
- </fileset>
-
<!-- Added to the non-ejb war lib on build -->
<fileset id="noejb.war.lib.extras" dir=".">
<exclude name="**/*" />
@@ -151,11 +140,6 @@
<include name="commons-beanutils.jar" if="seam.ui.lib" unless="richfaces.lib" />
</fileset>
- <!-- tomcat needs in messages example jstl.jar -->
- <fileset dir="${lib.dir}" id="tomcat-standard-tag.jar">
- <include name="jstl.jar" if="tomcat.standard.tag"/>
- </fileset>
-
<!-- Seam pdf, with required dependencies -->
<fileset id="seam.pdf.jar" dir="${lib.dir}">
<include name="jboss-seam-pdf.jar" if="seam.pdf.lib" />
@@ -298,11 +282,6 @@
<include name="jbpm-jpdl.jar" if="jbpm.lib" />
</fileset>
- <!-- Dependencies for using Seam with JBPM on Tomcat-->
- <fileset id="tomcat.jbpm.jar" dir="${lib.dir}">
- <include name="bsh.jar" if="jbpm.lib" />
- </fileset>
-
<!-- Dependencies for using Seam with JBoss Cache (s:cache) -->
<fileset id="cache.jar" dir="${lib.dir}">
<include name="jboss-cache.jar" if="cache.lib" />
@@ -413,27 +392,6 @@
<include name="concurrent.jar" if="jboss-common-core.lib" />
</fileset>
- <!-- ############################ MELDWARE ############################ -->
- <!--
- Meldware from buni.org provides a java based mail server which Seam uses
- to demonstrate it's mail capabilities. It's unlike other dependencies as
- it is deployed as a number of standalone wars, rars and ears.
- -->
-
- <!-- Meldware configuration -->
- <patternset id="meldware.conf.files">
- <exclude name="**/*" unless="deploy.meldware.mail" />
- <include name="meldware.store" if="deploy.meldware.mail" />
- </patternset>
-
- <!-- Just the mail portion of meldware -->
- <patternset id="meldware.files">
- <exclude name="**/*" unless="deploy.meldware.mail" />
- <include name="_mail.ear" if="deploy.meldware.mail" />
- <include name="meldwarebase.sar" if="deploy.meldware.mail" />
- </patternset>
-
-
<!-- ############### RESOURCES FOR EXAMPLES ################ -->
<!--
A number of configuration files are needed for Seam, and it's
@@ -479,15 +437,6 @@
<include name="*.xls" />
</fileset>
- <!-- resources to go in the jar for tomcat -->
- <fileset id="tomcat.jar.resources" dir="${resources.dir}">
- <include name="${example.ds}" />
- <include name="treecache.xml" />
- <include name="*.jpdl.xml" />
- <include name="jbpm.cfg.xml" />
- <include name="hibernate.cfg.xml" />
- </fileset>
-
<!-- resources to go in the jar for jbosswar -->
<fileset id="noejb.jar.resources" dir="${resources.dir}">
<include name="${example.ds}" />
@@ -682,7 +631,6 @@
<fileset refid="seam.ioc.jar" />
<fileset refid="seam.mail.jar" />
<fileset refid="seam.excel.jar" />
- <fileset refid="seam.rss.jar" />
<fileset refid="seam.pdf.jar" />
<fileset refid="seam.ui.jar" />
<fileset refid="facelets.jar" />
@@ -692,7 +640,6 @@
<fileset refid="metawidget-frontend.jar" />
<fileset refid="jboss-common-core.jar" />
<fileset refid="war.lib.extras" />
- <fileset refid="tomcat-standard-tag.jar" />
<mapper type="flatten" />
</copy>
<!-- Put properties into the classpath -->
@@ -923,76 +870,6 @@
<target name="restartclean" depends="clean, unexplode, restart" description="Clean the example and restart it" />
- <!-- #################### BUILD TARGETS (TOMCAT) #################### -->
-
-
- <target name="tomcat.warn">
- <echo message="If you built for JBoss AS, remember to run clean before building for Tomcat" />
- <echo message="Remember to configure Embedded JBoss" />
- </target>
-
- <target name="tomcat.jar" depends="jar">
- <copy todir="${jar.dir}">
- <fileset refid="tomcat.jar.resources" />
- </copy>
- </target>
-
- <!-- Extend the standard war target to add extras which Tomcat needs -->
- <target name="tomcat.war" depends="war">
- <copy todir="${war.dir}/WEB-INF/lib">
- <fileset refid="seam.jar" />
- <fileset refid="tomcat.war.extras" />
- <fileset refid="cglib.jar" />
- <fileset refid="drools.jar" />
- <fileset refid="cache.jar" />
- <fileset refid="jbpm.jar" />
- <fileset refid="tomcat.jbpm.jar" />
- <fileset refid="seam.remoting.jar" />
- <fileset refid="spring.jar" />
- <fileset refid="gwt.jar" />
- <fileset refid="openid.jar" />
- <fileset refid="jboss-el.jar" />
- <fileset refid="jsf.jar" />
- <fileset refid="search.jar" />
- <fileset refid="richfaces-api.jar" />
- <fileset refid="seam.pdf.extra.jar" />
- <mapper type="flatten" />
- </copy>
- <!-- Copy in resources, with filtering -->
- <copy todir="${war.dir}">
- <fileset refid="war.resources" />
- <filterset>
- <filter token="debug" value="${debug}" />
- <filter token="distributable" value="${distributable}" />
- <filter token="jndiPattern" value="#{ejbName}/local" />
- </filterset>
- </copy>
- </target>
-
- <target name="tomcat.archive" depends="tomcat.warn,tomcat.jar,tomcat.war" description="Package the archives for tomcat">
- <jar jarfile="${dist.dir}/${example.name}.jar" basedir="${jar.dir}" />
- <jar jarfile="${dist.dir}/${example.name}.war">
- <fileset dir="${war.dir}" />
- <zipfileset dir="${dist.dir}" prefix="WEB-INF/lib">
- <include name="${example.name}.jar" />
- </zipfileset>
- </jar>
- </target>
-
- <target name="tomcat.deploy" depends="tomcat.archive" description="Deploy the example to Tomcat">
-
- <fail unless="tomcat.home">
- tomcat.home not set, update build.properties
- </fail>
- <copy file="${dist.dir}/${example.name}.war" todir="${tomcat.deploy.dir}" />
- </target>
-
- <target name="tomcat.undeploy" description="Undeploy the example from Tomcat">
- <delete file="${tomcat.deploy.dir}/${example.name}.war" />
- </target>
-
-
-
<!-- #################### BUILD TARGETS (NOEJB) ##################### -->
<target name="noejb.jar" depends="jar">
Modified: branches/enterprise/JBPAPP_5_0/examples/contactlist/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/contactlist/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/contactlist/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -2,6 +2,6 @@
=========================
This example demonstrates the Seam CRUD framework. It runs on JBoss AS as an
-EAR and Tomcat with JBoss Embedded as a WAR.
+EAR.
example.name=contactlist
Modified: branches/enterprise/JBPAPP_5_0/examples/dvdstore/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/dvdstore/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/dvdstore/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -2,7 +2,6 @@
======================
This example demonstrates the use of Seam with jBPM pageflow and business
-process management. It runs on JBoss AS as an EAR and Tomcat with Embedded
-JBoss as a WAR.
+process management. It runs on JBoss AS as an EAR.
example.name=dvdstore
Modified: branches/enterprise/JBPAPP_5_0/examples/excel/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/excel/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/excel/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -2,6 +2,6 @@
==================
This example demonstrates the Seam Excel functionality. It runs on JBoss AS as
-an EAR and Tomcat with Embedded JBoss as a WAR.
+an EAR.
example.name=excel
Modified: branches/enterprise/JBPAPP_5_0/examples/groovybooking/build.properties
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/groovybooking/build.properties 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/groovybooking/build.properties 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,2 +1,2 @@
# Uncomment when deploying to JBoss AS 5
-#loadPersistenceUnits=false
+loadPersistenceUnits=true
Deleted: branches/enterprise/JBPAPP_5_0/examples/hibernate/build-glassfish.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/hibernate/build-glassfish.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/hibernate/build-glassfish.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="Hibernate Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The Hibernate Example for GlassFish"/>
- <property name="example.name" value="jboss-seam-hibernate"/>
-
- <!-- resources -->
- <property name="resources.dir" value="resources-glassfish" />
- <property name="dist.dir" value="dist-glassfish" />
- <property name="exploded-archives.dir" value="exploded-archives-glassfish" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true"/>
- <property name="seam.debug.lib" value="true"/>
- <property name="facelets.lib" value="true"/>
- <property name="richfaces.lib" value="true"/>
- <property name="jboss-common-core.lib" value="true" />
-
- <import file="../build.xml"/>
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <!-- Seam deps -->
- <include name="lib/javassist.jar"/>
- <include name="lib/dom4j.jar" />
-
- <!-- Hibernate and deps -->
- <include name="lib/hibernate.jar"/>
- <include name="lib/hibernate-commons-annotations.jar"/>
- <include name="lib/hibernate-annotations.jar"/>
- <include name="lib/hibernate-entitymanager.jar"/>
- <include name="lib/hibernate-validator.jar"/>
-
- <include name="lib/asm.jar" />
- <include name="lib/cglib.jar"/>
- <include name="lib/antlr.jar" />
- <include name="lib/commons-logging.jar" />
- <include name="lib/commons-collections.jar" />
- </fileset>
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="WEB-INF/classes/**/*" />
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/hibernate/build-jboss405.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/hibernate/build-jboss405.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/hibernate/build-jboss405.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="Hibernate Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The Hibernate Example for JBoss 4.0.5"/>
- <property name="example.name" value="jboss-seam-hibernate"/>
-
- <!-- resources -->
- <property name="resources.dir" value="resources-jboss" />
- <property name="dist.dir" value="dist-jboss405" />
- <property name="exploded-archives.dir" value="exploded-archives-jboss405" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true"/>
- <property name="seam.debug.lib" value="true"/>
- <property name="facelets.lib" value="true"/>
- <property name="richfaces.lib" value="true"/>
- <property name="el-ri.lib" value="true"/>
-
- <import file="../build.xml"/>
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <include name="lib/commons-beanutils.jar"/>
- <include name="lib/commons-collections.jar"/>
- <include name="lib/commons-digester.jar"/>
- <include name="lib/commons-lang.jar"/>
- <include name="lib/commons-logging.jar"/>
- <include name="lib/jsf-api.jar"/>
- <include name="lib/jsf-impl.jar"/>
- <include name="lib/jstl.jar"/>
- <include name="lib/el-api.jar"/>
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/hibernate/build-tomcat55.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/hibernate/build-tomcat55.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/hibernate/build-tomcat55.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="Hibernate Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The Hibernate Example for plain Tomcat 5.5"/>
- <property name="example.name" value="jboss-seam-hibernate"/>
-
- <!-- resources -->
- <property name="resources.dir" value="resources-tomcat" />
- <property name="dist.dir" value="dist-tomcat55" />
- <property name="exploded-archives.dir" value="exploded-archives-tomcat55" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true"/>
- <property name="seam.debug.lib" value="true"/>
- <property name="facelets.lib" value="true"/>
- <property name="richfaces.lib" value="true"/>
- <property name="el-ri.lib" value="true"/>
-
- <import file="../build.xml"/>
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <include name="lib/commons-beanutils.jar"/>
- <include name="lib/commons-collections.jar"/>
- <include name="lib/commons-digester.jar"/>
- <include name="lib/commons-lang.jar"/>
- <include name="lib/commons-logging.jar"/>
- <include name="lib/jsf-api.jar"/>
- <include name="lib/jsf-impl.jar"/>
- <include name="lib/jstl.jar"/>
- <include name="lib/dom4j.jar" />
- <include name="lib/hibernate.jar"/>
- <include name="lib/hibernate-commons-annotations.jar"/>
- <include name="lib/hibernate-annotations.jar"/>
- <include name="lib/hibernate-entitymanager.jar"/>
- <include name="lib/hibernate-validator.jar"/>
- <include name="lib/javassist.jar"/>
- <include name="lib/persistence-api.jar" />
- <include name="lib/el-api.jar" />
- <include name="lib/cglib.jar"/>
- <include name="lib/jta.jar"/>
- <include name="lib/antlr.jar" />
- <!--
- <include name="examples/hibernate2/lib/mc/*.jar"/>
- -->
- </fileset>
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="META-INF/context.xml" />
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/hibernate/build-tomcat6.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/hibernate/build-tomcat6.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/hibernate/build-tomcat6.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="Hibernate Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The Hibernate Example for plain Tomcat 6.0" />
- <property name="example.name" value="jboss-seam-hibernate" />
-
- <!-- resources -->
- <property name="resources.dir" value="resources-tomcat" />
- <property name="dist.dir" value="dist-tomcat6" />
- <property name="exploded-archives.dir" value="exploded-archives-tomcat6" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true" />
- <property name="seam.debug.lib" value="true" />
- <property name="facelets.lib" value="true" />
- <property name="richfaces.lib" value="true" />
-
- <import file="../build.xml" />
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <include name="lib/commons-beanutils.jar"/>
- <include name="lib/commons-collections.jar"/>
- <include name="lib/commons-digester.jar"/>
- <include name="lib/commons-lang.jar"/>
- <include name="lib/commons-logging.jar"/>
- <include name="lib/jsf-api.jar" />
- <include name="lib/jsf-impl.jar" />
- <include name="lib/jstl.jar" />
- <include name="lib/dom4j.jar" />
- <include name="lib/hibernate.jar" />
- <include name="lib/hibernate-commons-annotations.jar" />
- <include name="lib/hibernate-annotations.jar" />
- <include name="lib/hibernate-entitymanager.jar" />
- <include name="lib/hibernate-validator.jar" />
- <include name="lib/asm.jar" />
- <include name="lib/javassist.jar" />
- <include name="lib/persistence-api.jar" />
- <include name="lib/cglib.jar" />
- <include name="lib/jta.jar" />
- <include name="lib/antlr.jar" />
- </fileset>
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="META-INF/context.xml" />
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/hibernate/build-weblogic92.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/hibernate/build-weblogic92.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/hibernate/build-weblogic92.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="Hibernate Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The Hibernate Example for WebLogic 9.2"/>
- <property name="example.name" value="jboss-seam-hibernate"/>
-
- <!-- resources -->
- <property name="resources.dir" value="resources-weblogic92" />
- <property name="dist.dir" value="dist-weblogic92" />
- <property name="exploded-archives.dir" value="exploded-archives-weblogic92" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true"/>
- <property name="seam.debug.lib" value="true"/>
- <property name="facelets.lib" value="true"/>
- <property name="richfaces.lib" value="true"/>
- <property name="el-ri.lib" value="true"/>
- <property name="jboss-common-core.lib" value="true" />
-
- <import file="../build.xml"/>
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <!-- Seam deps -->
- <include name="lib/dom4j.jar" />
- <include name="lib/javassist.jar" />
-
- <!-- Misc -->
- <include name="lib/jta.jar" />
- <include name="lib/commons-beanutils.jar" />
- <include name="lib/commons-digester.jar" />
- <include name="lib/commons-collections.jar" />
- <include name="lib/commons-logging.jar" />
- <!-- JSF (and related) implementation -->
- <include name="lib/jsf-api.jar" />
- <include name="lib/jsf-impl.jar" />
- <include name="lib/jstl.jar" />
- <include name="lib/el-api.jar" />
-
- <!-- Hibernate and deps -->
- <include name="lib/hibernate.jar" />
- <include name="lib/hibernate-commons-annotations.jar" />
- <include name="lib/hibernate-annotations.jar" />
- <include name="lib/hibernate-entitymanager.jar" />
- <include name="lib/hibernate-validator.jar" />
- <include name="lib/persistence-api.jar" />
- <include name="lib/cglib.jar" />
- <include name="lib/antlr.jar" />
- </fileset>
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="WEB-INF/classes/**/*" />
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/hibernate/build-websphere61.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/hibernate/build-websphere61.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/hibernate/build-websphere61.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="Hibernate Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The Hibernate Example for WebSphere 6.1.0.9" />
- <property name="example.name" value="jboss-seam-hibernate" />
-
- <!-- resources -->
- <property name="resources.dir" value="resources-websphere61" />
- <property name="dist.dir" value="dist-websphere61" />
- <property name="exploded-archives.dir" value="exploded-archives-websphere61" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true" />
- <property name="seam.debug.lib" value="true" />
- <property name="facelets.lib" value="true" />
- <property name="richfaces.lib" value="true" />
- <property name="el-ri.lib" value="true"/>
- <property name="jboss-common-core.lib" value="true" />
-
- <import file="../build.xml" />
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <!-- Seam deps -->
- <include name="lib/dom4j.jar" />
- <include name="lib/javassist.jar"/>
-
- <!-- Misc -->
- <include name="lib/commons-beanutils.jar"/>
- <include name="lib/commons-digester.jar"/>
- <include name="lib/commons-collections.jar"/>
- <!-- JSF (and related) implementation -->
- <include name="lib/jsf-api.jar"/>
- <include name="lib/jsf-impl.jar"/>
- <include name="lib/jstl.jar"/>
- <include name="lib/el-api.jar" />
-
- <!-- Hibernate and deps -->
- <include name="lib/hibernate.jar"/>
- <include name="lib/hibernate-commons-annotations.jar"/>
- <include name="lib/hibernate-annotations.jar"/>
- <include name="lib/hibernate-entitymanager.jar"/>
- <include name="lib/hibernate-validator.jar"/>
- <include name="lib/persistence-api.jar" />
- <include name="lib/cglib.jar"/>
- <include name="lib/antlr.jar" />
- </fileset>
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="WEB-INF/classes/**/*" />
- <include name="META-INF/*.taglib.xml" />
- </fileset>
-
-</project>
-
Modified: branches/enterprise/JBPAPP_5_0/examples/hibernate/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/hibernate/build.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/hibernate/build.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -18,50 +18,13 @@
<ant antfile="build-jboss.xml" target="jbosswar.undeploy"/>
</target>
- <target name="jboss405" description="Build the Hibernate Booking example artifacts, suitable for deployment to JBoss 4.0.5.GA">
- <ant antfile="build-jboss405.xml"/>
- </target>
- <target name="glassfish" description="Build the Hibernate Booking example artifacts, suitable for deployment to GlassFish V2">
- <ant antfile="build-glassfish.xml"/>
- </target>
-
- <target name="weblogic92" description="Build the Hibernate Booking example artifacts, suitable for deployment to WebLogic 9.2">
- <ant antfile="build-weblogic92.xml"/>
- </target>
-
- <target name="websphere61" description="Build the Hibernate Booking example artifacts, suitable for deployment to WebSphere 6.1.0.9">
- <ant antfile="build-websphere61.xml"/>
- </target>
-
- <target name="tomcat55" description="Build the Hibernate Booking example artifacts, suitable for deployment to Tomcat 5.5">
- <ant antfile="build-tomcat55.xml"/>
- </target>
-
- <target name="tomcat6" description="Build the Hibernate Booking example artifacts, suitable for deployment to Tomcat 6">
- <ant antfile="build-tomcat6.xml"/>
- </target>
-
- <target name="tomcat6.deploy" depends="tomcat6" description="Deploy to Tomcat 6.0">
- <ant antfile="build-tomcat6.xml" target="tomcat.deploy"/>
- </target>
-
- <target name="tomcat6.undeploy" description="Undeploy from Tomcat 6.0">
- <ant antfile="build-tomcat6.xml" target="tomcat.undeploy"/>
- </target>
-
<target name="clean" description="Clean up the example">
<ant antfile="build-jboss.xml" target="clean" />
- <ant antfile="build-jboss405.xml" target="clean" />
- <ant antfile="build-glassfish.xml" target="clean" />
- <ant antfile="build-weblogic92.xml" target="clean" />
- <ant antfile="build-websphere61.xml" target="clean" />
- <ant antfile="build-tomcat55.xml" target="clean" />
- <ant antfile="build-tomcat6.xml" target="clean" />
<ant antfile="build-jboss-embedded.xml" target="clean" />
</target>
- <target name="all" depends="jboss, jboss405, glassfish, weblogic92, websphere61, tomcat55, tomcat6" description="Build Hibernate Booking example, for deployment to all supported application servers"/>
+ <target name="all" depends="jboss" description="Build Hibernate Booking example, for deployment to all supported application servers"/>
<target name="test">
<ant antfile="build-jboss.xml" target="test" />
Modified: branches/enterprise/JBPAPP_5_0/examples/hibernate/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/hibernate/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/hibernate/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -2,49 +2,14 @@
=======================
This is the Hotel Booking example implemented in Seam and Hibernate POJOs.
-It can be deployed in JBoss AS 4.x, WebLogic, GlassFish and Tomcat without
-the EJB3 container.
-JBoss AS 4.2.x:
+JBoss EAP 5:
* Install JBoss AS with the default profile
* ant jboss
* Start JBoss AS
* Access the app at http://localhost:8080/jboss-seam-hibernate/
* ant jboss.undeploy
-JBoss AS 4.0.5.GA:
- * Install JBoss AS with the default profile (with or without EJB3)
- * ant jboss405
- * Deploy dist-jboss/jboss-seam-hibernate.war
- * Start JBoss AS
- * Access the app at http://localhost:8080/jboss-seam-hibernate/
-
-WebLogic 9.2:
- * Install WebLogic 9.2
- * ant weblogic92
- * Start the WebLogic "examples" server
- * Load the admin console http://localhost:7001/console/
- * Deploy dist-weblogic92/jboss-seam-hibernate.war
- * Access the app at http://localhost:7001/jboss-seam-hibernate/
-
-WebSphere 6.1: (Special thanks to Denis Forveille)
-
- * Install and run WebSphere 6.1
- * In Application Servers -> <server> -> Web Container Settings -> Web Container -> Custom Properties, set "com.ibm.ws.webcontainer.invokefilterscompatibility" to "true"
- * ant websphere61
- * Install dist-websphere61/jboss-seam-hibernate.war and specify a context_root
- * From the "Enterprise Applications" list select: "jboss-seam-hibernate_war" --> "Manager Modules" --> "jboss-seam-hibernate.war" --> "Classes loaded with application class loader first", and then Apply
- * Start the application
- * Access it at http://localhost:9080/context_root/index.html
-
-Plain Tomcat (special thanks to Ralph Schaer)
- * Install Tomcat 5.5 or Tomcat 6
- * Copy the lib/hsqldb.jar into $TOMCAT_HOME/common/lib (Tomcat 5.5) or $TOMCAT_HOME/lib (Tomcat 6)
- * ant tomcat
- * Deploy dist-tomcat55/jboss-seam-hibernate.war or dist-tomcat6/jboss-seam-hibernate.war to $TOMCAT_HOME/webapps/jboss-seam-hibernate.war
- * Start Tomcat
- * Access the app at http://localhost:8080/jboss-seam-hibernate/
-
Tomcat with embeddable JBoss:
* Install Tomcat
* Install Embeddable JBoss
@@ -52,30 +17,3 @@
* Deploy dist-jboss-embedded/jboss-seam-hibernate.war
* Start Tomcat
* Access the app at http://localhost:8080/jboss-seam-hibernate/
-
-GlassFish
- * Install GlassFish V1 or V2
- * ant glassfish
- * Start GlassFish and the Embedded Derby Database
- * Load the admin console http://localhost:4848/
- * Deploy dist-glassfish/jboss-seam-hibernate.war as Web App
- * Access the app at http://localhost:8080/jboss-seam-hibernate/
-
-GlassFish:
- * Install GlassFish V1 or V2
- * ant glassfish
- * Start GlassFish and the Embedded Derby Database
- * Load the admin console http://localhost:4848/
- * Deploy dist-glassfish/jboss-seam-hibernate.war in the Admin Console (Applications > Web Applications)
- or using the command $GLASSFISH_HOME/bin/asadmin deploy dist-glassfish/jboss-seam-hibernate.war
- * Access the app at http://localhost:8080/jboss-seam-hibernate/
-
-NOTES FOR GLASSFISH USERS:
- In order for the app to work out of the box with GlassFish, we have
- used the Derby (i.e., Java DB) database in GlassFish. The included
- WEB-INF/classes/GlassfishDerbyDialect.class is a special hack to get
- around a Derby bug in GlassFish V2. You must use it as your Hibernate
- dialect if you use Derby with GlassFish.
-
- However, we strongly recommend you to use a non-Derby data source if
- possible (for example, HSQL is a much better embedded DB).
Modified: branches/enterprise/JBPAPP_5_0/examples/itext/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/itext/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/itext/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -2,6 +2,6 @@
==================
This example demonstrates the Seam PDF functionality. It runs on JBoss AS as an
-EAR and Tomcat with Embedded JBoss as a WAR.
+EAR.
example.name=itext
Modified: branches/enterprise/JBPAPP_5_0/examples/jee5/booking/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jee5/booking/build.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jee5/booking/build.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -17,15 +17,6 @@
<property name="facelets.lib" value="true"/>
<property name="richfaces.lib" value="true"/>
<property name="jboss-common-core.lib" value="true" />
- <!-- add libs for oc4j (broken classloading) -->
- <!--
- <property name="jbpm.lib" value="true"/>
- <property name="drools.lib" value="true"/>
- <property name="quartz.lib" value="true" />
- <property name="search.lib" value="true" />
- <property name="dbunit.lib" value="true" />
- <property name="jboss-embedded-api.lib" value="true" />
- -->
<import file="../../build.xml"/>
Modified: branches/enterprise/JBPAPP_5_0/examples/jee5/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jee5/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jee5/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -3,143 +3,4 @@
The examples in this directory showcases how to build Java EE 5 compliant Seam
applications. The application should run on all Java EE 5 compliant
-application servers with minimal changes in code and configuration files. The
-default build script builds a deployable EAR for GlassFish. See Seam reference
-guide for instructions for other containers.
-
-GlassFish V2
-------------
-
-1. Modify the following files in the project.
-
- * resources/META-INF/persistence.xml: Change the jta-persistence-provider to the commented
- out Glassfish property
-
-2. Build the demo app by running Ant. The build target is
- "dist/jboss-seam-jee5.ear"
-
-3. Download GlassFish V2 Final Build
-
-4. Install it: java -Xmx256m -jar glassfish-installer-xxx.jar
-
-5. Setup glassfish: cd glassfish; ant -f setup.xml;
-
-6. Start the GlassFish server: $GLASSFISH_HOME/bin/asadmin start-domain domain1
-
-7. Start the embedded JavaDB: $GLASSFISH_HOME/bin/asadmin start-database
-
-8. Load the admin console: http://localhost:4848/
-
-9. Login using username/password: admin / adminadmin
-
-10. Deploy the "Enterprise Application" in the admin console
- or using the command $GLASSFISH_HOME/bin/asadmin deploy dist/jboss-seam-jee5.ear
-
-11. Checkout the app at: http://localhost:8080/seam-jee5/
-
-12. Stop the server and database:
- $GLASSFISH_HOME/bin/asadmin stop-domain domain1; $GLASSFISH_HOME/bin/asadmin stop-database
-
-
-OC4J 11g Technology Preview
----------------------------
-
-1. Modify the following files in the project.
-
- * build.xml: Un-comment the OC4J-related libraries
- * resources/META-INF/persistence.xml: un-comment the OC4J properties
-
-2. Build the demo app by running ANT. The build target is
- "dist/jboss-seam-jee5.ear"
-
-3. Download OC4J 11g Technology Preview from here
- http://www.oracle.com/technology/tech/java/oc4j/11/index.html
-
-4. Unzip the downloaded file
-
-5. Make sure you have $JAVA_HOME and $ORACLE_HOME set as environment
- variables ($ORACLE_HOME is the directory to which you unzip OC4J). For
- further information on installing OC4J, consult the Readme.txt distributed
- with OC4J
-
-6. Edit the OC4J datasource $ORACLE_HOME/j2ee/home/config/data-sources.xml
- and, inside <data-sources>, add
-
- <managed-data-source
- connection-pool-name="jee5-connection-pool"
- jndi-name="jdbc/__default"
- name="jee5-managed-data-source"
- />
- <connection-pool name="jee5-connection-pool">
- <connection-factory
- factory-class="org.hsqldb.jdbcDriver"
- user="sa"
- password="" url="jdbc:hsqldb:."
- />
- </connection-pool>
-
-
-7. Edit $ORACLE_HOME/j2ee/home/config/server.xml and, inside
- <application-server>, add
-
- <application
- name="jboss-seam-jee5"
- path="../../home/applications/jboss-seam-jee5.ear"
- parent="default"
- start="true"
- />
-
-8. Edit $ORACLE_HOME/j2ee/home/config/default-web-site.xml, and, inside
- <web-site>, add
-
- <web-app
- application="jboss-seam-jee5"
- name="jboss-seam-jee5"
- load-on-startup="true"
- root="/seam-jee5"
- />
-
-9. Copy hsqldb.jar to OC4J:
- cp ../../lib/hsqldb.jar $ORACLE_HOME/j2ee/home/applib/
-
-10. Copy the application to OC4J:
- cp build/jboss-seam-jee5.ear $ORACLE_HOME/j2ee/home/applications/
-
-11. Start OC4J: $ORACLE_HOME/j2ee/home/java -jar -XX:MaxPermSize=256M oc4j.jar
- * You must override the default PermGen memory settings using above command
- * See http://www.oracle.com/technology/tech/java/oc4j/11/oc4j-relnotes.html
- * You will be asked to set the admin password if this is the first time
- you've started OC4J
- * You may get an ClassNotFoundException relating to
- org.jboss.logging.util.OnlyOnceErrorHandler, this doesn't impact on the
- running of the app. We are working to get rid of this error!
-
-12. Checkout the app at: http://localhost:8888/seam-jee5
-
-13. You can stop the server by pressing CTRL-c in the console on which the
- server is running.
-
-
-Workarounds for OC4J 11g
-------------------------
-
-* Set hibernate.query.factory_class=org.hibernate.hql.classic.ClassicQueryTranslatorFactory in
- persistence.xml - OC4J uses an incompatible (old) version of antlr in toplink which causes
- hibernate to throw an exception (discussed here for Weblogic, but the same applies to OC4J -
- http://hibernate.org/250.html#A23). You can also work around this by putting the hibernate
- jars in $ORACLE_HOME/j2ee/home/applib/
-
-WebLogic 10.3
----------------------------
-Weblogic support requires some specific patches from Oracle/BEA so that their
-EJB3 support fuctions correctly. Please refer to the Seam reference guide for
-additional information.
-
-- http://seamframework.org/Documentation
-
-WebSphere 6.1.0.13 with EJB3 feature pack
----------------------------
-The instructions for integration with Websphere are fairly verbose. Please
-refer to the Seam reference guide for additional information.
-
-- http://seamframework.org/Documentation
+application servers with minimal changes in code and configuration files.
Modified: branches/enterprise/JBPAPP_5_0/examples/jee5/remoting/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jee5/remoting/build.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jee5/remoting/build.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -17,18 +17,11 @@
<property name="seam.debug.lib" value="true"/>
<property name="facelets.lib" value="true"/>
<property name="ajax4jsf.lib" value="true"/>
- <!-- add this for oc4j
- <property name="jbpm.lib" value="true"/>
- -->
<import file="../../build.xml"/>
<fileset id="ear.lib.extras" dir="${seam.dir}">
<include name="lib/common*.jar"/>
-
- <!-- add this for oc4j
- <include name="lib/antlr-*.jar"/>
- -->
</fileset>
</project>
Deleted: branches/enterprise/JBPAPP_5_0/examples/jpa/build-glassfish.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/build-glassfish.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/build-glassfish.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="JPA Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The JPA Example for GlassFish"/>
- <property name="example.name" value="jboss-seam-jpa"/>
-
- <!-- resources -->
- <property name="resources.dir" value="resources-glassfish" />
- <property name="dist.dir" value="dist-glassfish" />
- <property name="exploded-archives.dir" value="exploded-archives-glassfish" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true"/>
- <property name="seam.debug.lib" value="true"/>
- <property name="facelets.lib" value="true"/>
- <property name="richfaces.lib" value="true"/>
- <property name="jboss-common-core.lib" value="true" />
-
- <import file="../build.xml"/>
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <!-- Seam deps -->
- <include name="lib/javassist.jar"/>
- <include name="lib/dom4j.jar" />
-
- <!-- Hibernate and deps -->
- <include name="lib/hibernate.jar"/>
- <include name="lib/hibernate-commons-annotations.jar"/>
- <include name="lib/hibernate-annotations.jar"/>
- <include name="lib/hibernate-entitymanager.jar"/>
- <include name="lib/hibernate-validator.jar"/>
- <include name="lib/asm.jar" />
- <include name="lib/cglib.jar"/>
- <include name="lib/antlr.jar" />
- <include name="lib/commons-logging.jar" />
- <include name="lib/commons-collections.jar" />
-
- <include name="lib/log4j.jar" />
- </fileset>
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="WEB-INF/classes/**/*" />
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss-embedded.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss-embedded.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss-embedded.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="JPA Booking" default="tomcat.deploy" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The JPA Example for JBoss Embedded in Tomcat"/>
- <property name="example.name" value="jboss-seam-jpa"/>
-
- <!-- resources -->
- <property name="resources.dir" value="resources-jboss" />
- <property name="dist.dir" value="dist-jboss-embedded" />
- <property name="exploded-archives.dir" value="exploded-archives-jboss-embedded" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true"/>
- <property name="seam.debug.lib" value="true"/>
- <property name="facelets.lib" value="true"/>
- <property name="richfaces.lib" value="true"/>
-
- <import file="../build.xml"/>
-
- <fileset id="war.lib.extras" dir="${seam.dir}">
- <include name="lib/jsf-api.jar" />
- <include name="lib/jsf-impl.jar" />
- <include name="lib/jstl.jar" />
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="JPA Booking" default="jbosswar.deploy" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The JPA Example for JBoss 4.2.0.GA"/>
- <property name="example.name" value="jboss-seam-jpa"/>
-
- <!-- resources -->
- <property name="resources.dir" value="resources-jboss" />
- <property name="dist.dir" value="dist-jboss" />
- <property name="exploded-archives.dir" value="exploded-archives-jboss" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true"/>
- <property name="seam.debug.lib" value="true"/>
- <property name="facelets.lib" value="true"/>
- <property name="richfaces.lib" value="true"/>
-
- <import file="../build.xml"/>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss405.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss405.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/build-jboss405.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="JPA Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The JPA Example for JBoss 4.0.5"/>
- <property name="example.name" value="jboss-seam-jpa"/>
-
- <!-- resources -->
- <property name="resources.dir" value="resources-jboss" />
- <property name="dist.dir" value="dist-jboss405" />
- <property name="exploded-archives.dir" value="exploded-archives-jboss405" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true"/>
- <property name="seam.debug.lib" value="true"/>
- <property name="facelets.lib" value="true"/>
- <property name="richfaces.lib" value="true"/>
- <property name="el-ri.lib" value="true"/>
-
- <import file="../build.xml"/>
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <include name="lib/commons-beanutils.jar"/>
- <include name="lib/commons-collections.jar"/>
- <include name="lib/commons-digester.jar"/>
- <include name="lib/commons-lang.jar"/>
- <include name="lib/commons-logging.jar"/>
- <include name="lib/jsf-impl.jar"/>
- <include name="lib/jsf-api.jar"/>
- <include name="lib/jstl.jar"/>
- <include name="lib/el-api.jar"/>
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/jpa/build-tomcat55.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/build-tomcat55.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/build-tomcat55.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,62 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="JPA Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The JPA Example for plain Tomcat 5.5"/>
- <property name="example.name" value="jboss-seam-jpa"/>
-
- <!-- resources -->
- <property name="resources.dir" value="resources-tomcat" />
- <property name="dist.dir" value="dist-tomcat55" />
- <property name="exploded-archives.dir" value="exploded-archives-tomcat55" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true"/>
- <property name="seam.debug.lib" value="true"/>
- <property name="facelets.lib" value="true"/>
- <property name="richfaces.lib" value="true"/>
- <property name="el-ri.lib" value="true"/>
- <property name="jboss-common-core.lib" value="true" />
-
- <import file="../build.xml"/>
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <!-- Seam deps -->
- <include name="lib/dom4j.jar" />
- <include name="lib/javassist.jar"/>
-
- <!-- Misc -->
- <include name="lib/commons-beanutils.jar"/>
- <include name="lib/commons-collections.jar"/>
- <include name="lib/commons-digester.jar"/>
- <include name="lib/commons-lang.jar"/>
- <include name="lib/commons-logging.jar"/>
- <include name="lib/jta.jar"/>
-
- <!-- JSF (and related) implementation -->
- <include name="lib/jsf-api.jar"/>
- <include name="lib/jsf-impl.jar"/>
- <include name="lib/jstl.jar"/>
- <include name="lib/el-api.jar" />
-
- <!-- Hibernate and deps -->
- <include name="lib/hibernate.jar"/>
- <include name="lib/hibernate-commons-annotations.jar"/>
- <include name="lib/hibernate-annotations.jar"/>
- <include name="lib/hibernate-entitymanager.jar"/>
- <include name="lib/hibernate-validator.jar"/>
- <include name="lib/persistence-api.jar" />
- <include name="lib/asm.jar" />
- <include name="lib/cglib.jar"/>
- <include name="lib/antlr.jar" />
- </fileset>
-
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="META-INF/context.xml" />
- <include name="WEB-INF/classes/log4j.xml" />
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/jpa/build-tomcat6.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/build-tomcat6.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/build-tomcat6.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="JPA Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The JPA Example for plain Tomcat 6.0"/>
- <property name="example.name" value="jboss-seam-jpa"/>
-
- <!-- resources -->
- <property name="resources.dir" value="resources-tomcat" />
- <property name="dist.dir" value="dist-tomcat6" />
- <property name="exploded-archives.dir" value="exploded-archives-tomcat6" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true"/>
- <property name="seam.debug.lib" value="true"/>
- <property name="facelets.lib" value="true"/>
- <property name="richfaces.lib" value="true"/>
- <property name="jboss-common-core.lib" value="true" />
-
- <import file="../build.xml"/>
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <include name="lib/commons-beanutils.jar"/>
- <include name="lib/commons-collections.jar"/>
- <include name="lib/commons-digester.jar"/>
- <include name="lib/commons-lang.jar"/>
- <include name="lib/commons-logging.jar"/>
- <include name="lib/jsf-api.jar" />
- <include name="lib/jsf-impl.jar" />
- <include name="lib/jstl.jar" />
- <include name="lib/dom4j.jar" />
- <include name="lib/hibernate.jar" />
- <include name="lib/hibernate-commons-annotations.jar" />
- <include name="lib/hibernate-annotations.jar" />
- <include name="lib/hibernate-entitymanager.jar" />
- <include name="lib/hibernate-validator.jar" />
- <include name="lib/javassist.jar" />
- <include name="lib/persistence-api.jar" />
- <include name="lib/cglib.jar" />
- <include name="lib/jta.jar" />
- <include name="lib/antlr.jar" />
- <include name="lib/asm.jar" />
- </fileset>
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="META-INF/context.xml" />
- <include name="WEB-INF/classes/log4j.xml" />
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/jpa/build-weblogic10.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/build-weblogic10.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/build-weblogic10.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="JPA Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The JPA Example for WebLogic 10" />
- <property name="example.name" value="jboss-seam-jpa" />
-
- <!-- resources -->
- <property name="resources.dir" value="resources-weblogic10" />
- <property name="dist.dir" value="dist-weblogic10" />
- <property name="exploded-archives.dir"
- value="exploded-archives-weblogic10" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true" />
- <property name="seam.debug.lib" value="true" />
- <property name="facelets.lib" value="true" />
- <property name="richfaces.lib" value="true" />
- <property name="el-ri.lib" value="true"/>
- <property name="jboss-common-core.lib" value="true" />
-
- <import file="../build.xml" />
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <!-- Seam deps -->
- <include name="lib/dom4j.jar" />
- <include name="lib/javassist.jar" />
-
- <!-- Misc -->
- <include name="lib/commons-beanutils.jar" />
- <include name="lib/commons-digester.jar" />
- <include name="lib/commons-collections.jar" />
- <include name="lib/commons-logging.jar" />
-
- <!-- Hibernate and deps -->
- <include name="lib/hibernate.jar" />
- <include name="lib/hibernate-commons-annotations.jar" />
- <include name="lib/hibernate-annotations.jar" />
- <include name="lib/hibernate-entitymanager.jar" />
- <include name="lib/hibernate-validator.jar" />
- <include name="lib/cglib.jar" />
- <include name="lib/asm.jar"/>
- <include name="lib/antlr.jar" />
- </fileset>
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="WEB-INF/classes/**/*" />
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/jpa/build-weblogic92.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/build-weblogic92.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/build-weblogic92.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="JPA Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The JPA Example for WebLogic 9.2" />
- <property name="example.name" value="jboss-seam-jpa" />
-
- <!-- resources -->
- <property name="resources.dir" value="resources-weblogic92" />
- <property name="dist.dir" value="dist-weblogic92" />
- <property name="exploded-archives.dir"
- value="exploded-archives-weblogic92" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true" />
- <property name="seam.debug.lib" value="true" />
- <property name="facelets.lib" value="true" />
- <property name="richfaces.lib" value="true" />
- <property name="el-ri.lib" value="true"/>
- <property name="jboss-common-core.lib" value="true" />
-
- <import file="../build.xml" />
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <!-- Seam deps -->
- <include name="lib/dom4j.jar" />
- <include name="lib/javassist.jar" />
-
- <!-- Misc -->
- <include name="lib/jta.jar" />
- <include name="lib/commons-beanutils.jar" />
- <include name="lib/commons-digester.jar" />
- <include name="lib/commons-collections.jar" />
- <include name="lib/commons-logging.jar" />
-
- <!-- JSF (and related) implementation -->
- <include name="lib/jsf-api.jar" />
- <include name="lib/jsf-impl.jar" />
- <include name="lib/jstl.jar" />
- <include name="lib/el-api.jar" />
-
- <!-- Hibernate and deps -->
- <include name="lib/hibernate.jar" />
- <include name="lib/hibernate-commons-annotations.jar" />
- <include name="lib/hibernate-annotations.jar" />
- <include name="lib/hibernate-entitymanager.jar" />
- <include name="lib/hibernate-validator.jar" />
- <include name="lib/persistence-api.jar" />
- <include name="lib/cglib.jar" />
- <include name="lib/antlr.jar" />
- </fileset>
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="WEB-INF/classes/**/*" />
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/jpa/build-websphere61.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/build-websphere61.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/build-websphere61.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="JPA Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The JPA Example for WebSphere 6.1.0.13 + EJB3 FP"/>
- <property name="example.name" value="jboss-seam-jpa"/>
-
- <!-- resources -->
- <property name="resources.dir" value="resources-websphere61" />
- <property name="dist.dir" value="dist-websphere61" />
- <property name="exploded-archives.dir" value="exploded-archives-websphere61" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true"/>
- <property name="seam.debug.lib" value="true"/>
- <property name="facelets.lib" value="true"/>
- <property name="richfaces.lib" value="true"/>
- <property name="el-ri.lib" value="true"/>
- <property name="jboss-common-core.lib" value="true" />
-
- <import file="../build.xml"/>
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <!-- Seam deps -->
- <include name="lib/dom4j.jar" />
- <include name="lib/javassist.jar"/>
-
- <!-- Misc -->
- <include name="lib/commons-beanutils.jar"/>
- <include name="lib/commons-digester.jar"/>
- <include name="lib/commons-collections.jar"/>
- <!-- JSF (and related) implementation -->
- <include name="lib/jsf-api.jar"/>
- <include name="lib/jsf-impl.jar"/>
- <include name="lib/el-api.jar" />
-
- <!-- Hibernate and deps -->
- <include name="lib/hibernate.jar"/>
- <include name="lib/hibernate-commons-annotations.jar"/>
- <include name="lib/hibernate-annotations.jar"/>
- <include name="lib/hibernate-entitymanager.jar"/>
- <include name="lib/hibernate-validator.jar"/>
- <include name="lib/cglib.jar"/>
- <include name="lib/asm.jar"/>
- <include name="lib/antlr.jar" />
- </fileset>
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="WEB-INF/classes/**/*" />
- </fileset>
-
-</project>
-
Deleted: branches/enterprise/JBPAPP_5_0/examples/jpa/build-websphere7.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/build-websphere7.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/build-websphere7.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="JPA Booking" default="noejb.archive" basedir=".">
-
- <!-- Naming -->
- <property name="Name" value="The JPA Example for WebSphere 7" />
- <property name="example.name" value="jboss-seam-jpa" />
-
- <!-- resources -->
- <property name="resources.dir" value="resources-websphere7" />
- <property name="dist.dir" value="dist-websphere7" />
- <property name="exploded-archives.dir" value="exploded-archives-websphere7" />
-
- <!-- Libraries to include -->
- <property name="seam.ui.lib" value="true" />
- <property name="seam.debug.lib" value="true" />
- <property name="facelets.lib" value="true" />
- <property name="richfaces.lib" value="true" />
- <property name="el-ri.lib" value="true" />
- <property name="jboss-common-core.lib" value="true" />
-
- <import file="../build.xml" />
-
- <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
- <!-- Seam deps -->
- <include name="lib/dom4j.jar" />
- <include name="lib/javassist.jar" />
-
- <!-- Misc -->
- <include name="lib/commons-beanutils.jar" />
- <include name="lib/commons-digester.jar" />
- <include name="lib/commons-collections.jar" />
- <!-- JSF (and related) implementation -->
- <!-- <include name="lib/jsf-api.jar"/>-->
-<!-- <include name="lib/jsf-impl.jar" />-->
-<!-- <include name="lib/el-api.jar" />-->
-
- <!-- Hibernate and deps -->
- <include name="lib/hibernate.jar" />
- <include name="lib/hibernate-commons-annotations.jar" />
- <include name="lib/hibernate-annotations.jar" />
- <include name="lib/hibernate-entitymanager.jar" />
- <include name="lib/hibernate-validator.jar" />
- <include name="lib/cglib.jar" />
- <include name="lib/asm.jar" />
- <include name="lib/antlr.jar" />
- </fileset>
-
- <fileset id="noejb.war.extras" dir="${resources.dir}">
- <include name="WEB-INF/classes/**/*" />
- </fileset>
-
-</project>
-
Modified: branches/enterprise/JBPAPP_5_0/examples/jpa/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/build.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/build.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,88 +1,27 @@
<?xml version="1.0"?>
-<project name="JPA Booking" default="jboss" basedir=".">
-
- <target name="jboss" description="Build the JPA artifacts, and deploy to JBoss 4.2.0.GA">
- <ant antfile="build-jboss.xml"/>
- </target>
-
- <target name="jboss-embedded" description="Build the JPA artifacts, and deploy to JBoss Embedded in Tomcat">
- <ant antfile="build-jboss-embedded.xml"/>
- </target>
+<project name="JPA Booking" default="jboss5" basedir=".">
- <target name="jboss-embedded.undeploy" description="Undeploy from JBoss Embedded in Tomcat">
- <ant antfile="build-jboss-embedded.xml" target="tomcat.undeploy"/>
- </target>
-
- <target name="jboss.undeploy" description="Undeploy JPA example from JBoss AS">
- <ant antfile="build-jboss.xml" target="jbosswar.undeploy"/>
- </target>
-
<target name="jboss5" description="Build the JPA artifacts, suitable for deployment to JBoss 5.0.0.GA">
<ant antfile="build-jboss5.xml"/>
</target>
-
- <target name="jboss405" description="Build the JPA artifacts, suitable for deployment to JBoss 4.0.5.GA">
- <ant antfile="build-jboss405.xml"/>
+
+ <target name="jboss5.undeploy" description="Undeploy JPA example from JBoss AS">
+ <ant antfile="build-jboss5.xml" target="jbosswar.undeploy"/>
</target>
- <target name="glassfish" description="Build the JPA artifacts, suitable for deployment to GlassFish V2">
- <ant antfile="build-glassfish.xml"/>
- </target>
-
- <target name="weblogic92" description="Build the JPA artifacts, suitable for deployment to WebLogic 9.2">
- <ant antfile="build-weblogic92.xml"/>
- </target>
-
- <target name="weblogic10" description="Build the JPA artifacts, suitable for deployment to WebLogic 10">
- <ant antfile="build-weblogic10.xml"/>
- </target>
-
- <target name="websphere61" description="Build the JPA artifacts, suitable for deployment to WebSphere 6.1.0.13 + EJB3 FP">
- <ant antfile="build-websphere61.xml"/>
- </target>
-
- <target name="websphere7" description="Build the JPA artifacts, suitable for deployment to WebSphere 7">
- <ant antfile="build-websphere7.xml"/>
- </target>
-
- <target name="tomcat55" description="Build the JPA artifacts, suitable for deployment to Tomcat 5.5">
- <ant antfile="build-tomcat55.xml"/>
- </target>
-
- <target name="tomcat6" description="Build the JPA artifacts, suitable for deployment to Tomcat 6.0">
- <ant antfile="build-tomcat6.xml"/>
- </target>
-
- <target name="tomcat6.deploy" depends="tomcat6" description="Deploy to Tomcat 6.0">
- <ant antfile="build-tomcat6.xml" target="tomcat.deploy"/>
- </target>
-
- <target name="tomcat6.undeploy" description="Undeploy from Tomcat 6.0">
- <ant antfile="build-tomcat6.xml" target="tomcat.undeploy"/>
- </target>
-
<target name="clean" description="Clean up the example">
- <ant antfile="build-jboss.xml" target="clean" />
- <ant antfile="build-jboss405.xml" target="clean" />
- <ant antfile="build-glassfish.xml" target="clean" />
- <ant antfile="build-weblogic92.xml" target="clean" />
- <ant antfile="build-weblogic10.xml" target="clean" />
- <ant antfile="build-websphere61.xml" target="clean" />
- <ant antfile="build-websphere7.xml" target="clean" />
- <ant antfile="build-tomcat55.xml" target="clean" />
- <ant antfile="build-tomcat6.xml" target="clean" />
- <ant antfile="build-jboss-embedded.xml" target="clean" />
+ <ant antfile="build-jboss5.xml" target="clean" />
</target>
- <target name="all" depends="jboss, jboss405, glassfish, weblogic92,weblogic10, websphere61, websphere7, tomcat55, tomcat6"/>
+ <target name="all" depends="jboss5"/>
<target name="test">
- <ant antfile="build-jboss.xml" target="test" />
+ <ant antfile="build-jboss5.xml" target="test" />
</target>
<target name="archive">
- <ant antfile="build-jboss.xml" target="noejb.archive" />
+ <ant antfile="build-jboss5.xml" target="noejb.archive" />
</target>
</project>
Modified: branches/enterprise/JBPAPP_5_0/examples/jpa/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/jpa/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/jpa/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -2,84 +2,9 @@
================
This is the Hotel Booking example implemented in Seam POJO and Hibernate JPA.
-It can be deployed in JBoss AS 4.x, WebLogic, GlassFish, Tomcat (both with and
-without the EJB3 container).
-JBoss AS 4.2.0:
- * Install JBoss AS 4.2.0 GA
- * ant jboss
+Follow these steps:
+ * ant jboss5
* Start JBoss AS
* Access the app at http://localhost:8080/jboss-seam-jpa/
- * ant jboss.undeploy
-
-JBoss AS 4.0.5 (with or without EJB3):
- * Install JBoss AS 4.0.5 with the default J2EE profile
- * ant jboss405
- * Deploy dist-jboss405/jboss-seam-jpa.war
- * Start JBoss AS
- * Access the app at http://localhost:8080/jboss-seam-jpa/
-
-WebLogic 9.2:
- * Install WebLogic 9.2
- * ant weblogic92
- * Start the WebLogic "examples" server
- * Load the admin console http://localhost:7001/console/
- * Deploy dist-weblogic92/jboss-seam-jpa.war
- * Access the app at http://localhost:7001/jboss-seam-jpa/
-
-WebLogic 10.X:
- * Install WebLogic 10.X
- * Create an hsql datasource called 'seam-jpa-ds" (see reference guide)
- * Deploy Weblogics jsf-1.2.war shared library for JSF 1.2 support. (see reference guide)
- * ant weblogic10
- * Start the WebLogic domain you created or the "examples" domain if installed.
- * Load the admin console http://localhost:7001/console/
- * Deploy dist-weblogic10/jboss-seam-jpa.war
- * Access the app at http://localhost:7001/jboss-seam-jpa/
- * See Weblogic reference guide chapter for full details.
-
-WebSphere 6.1:
-
- * Install and run WebSphere 6.1
- * Set a Websphere web container custom property "com.ibm.ws.webcontainer.invokefilterscompatibility" to true. See Seam reference guide chapter for details.
- * Set a Websphere web container custom property "prependSlashToResource" to true. See Seam reference guide chapter for details.
- * ant websphere61
- * Deploy dist-websphere61/jboss-seam-jpa.war and specify a context_root
- * From the "Enterprise Applications" list select: "jboss-seam-jpa" --> "Manager Modules" --> "jboss-seam-jpa.war" --> "Classes loaded with application class loader first", and then Apply
- * Start the application
- * Access it at http://localhost:9080/context_root/index.html
-
-Tomcat with JBoss Embedded:
- * Install Tomcat
- * Install JBoss Embedded
- * ant jboss-embedded
- * Deploy dist-jboss-embedded/jboss-seam-jpa.war
- * Start Tomcat
- * Access the app at http://localhost:8080/jboss-seam-jpa/
-
-Tomcat (5.5 or 6) without JBoss Embedded:
- * Install Tomcat
- * Copy lib/hsqldb.jar from this distribution into $TOMCAT_HOME/common/lib (Tomcat 5.5) or $TOMCAT_HOME/lib (Tomcat 6)
- * ant tomcat55 or ant tomcat6
- * Deploy dist-jboss/jboss-seam-jpa.war
- * Start Tomcat
- * Access the app at http://localhost:8080/jboss-seam-jpa/
-
-GlassFish:
- * Install GlassFish V2
- * ant glassfish
- * Start GlassFish and the Embedded Derby Database
- * Load the admin console http://localhost:4848/
- * Deploy dist-glassfish/jboss-seam-jpa.war in the admin console (Applications > Web Applications)
- or using the command $GLASSFISH_HOME/bin/asadmin deploy dist-glassfish/jboss-seam-jpa.war
- * Access the app at http://localhost:8080/jboss-seam-jpa/
-
-NOTES FOR GLASSFISH USERS:
- In order for the app to work out of the box with GlassFish, we have
- used the Derby (i.e., Java DB) database in GlassFish. The included
- WEB-INF/classes/GlassfishDerbyDialect.class is a special hack to get
- around a Derby bug in GlassFish V2. You must use it as your Hibernate
- dialect if you use Derby with GlassFish.
-
- However, we strongly recommend you to use a non-Derby data source if
- possible (for example, HSQL is a much better embedded DB).
+ * ant jboss5.undeploy
Modified: branches/enterprise/JBPAPP_5_0/examples/mail/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/mail/build.xml 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/mail/build.xml 2009-07-14 12:06:14 UTC (rev 11289)
@@ -8,7 +8,6 @@
<!-- Libraries -->
<property name="seam.ui.lib" value="yes" />
<property name="seam.mail.lib" value="yes" />
- <property name="deploy.meldware.mail" value="yes" />
<property name="seam.pdf.lib" value="yes"/>
<property name="seam.excel.lib" value="yes"/>
<property name="seam.debug.lib" value="yes" />
Modified: branches/enterprise/JBPAPP_5_0/examples/metawidget/booking/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/metawidget/booking/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/metawidget/booking/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -16,7 +16,7 @@
ant explode
-This example runs on JBoss AS as an EAR or Tomcat with JBoss Embedded as a WAR.
+This example runs on JBoss AS as an EAR.
example.name=booking
Modified: branches/enterprise/JBPAPP_5_0/examples/metawidget/dvdstore/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/metawidget/dvdstore/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/metawidget/dvdstore/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -3,8 +3,7 @@
This example demonstrates the use of Seam with jBPM pageflow and business
process management. It uses metawidget to dynamically generate the forms at
-runtime. The example runs on JBoss AS as an EAR and Tomcat with Embedded JBoss
-as a WAR.
+runtime. The example runs on JBoss AS as an EAR.
example.name=dvdstore
Modified: branches/enterprise/JBPAPP_5_0/examples/metawidget/groovybooking/build.properties
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/metawidget/groovybooking/build.properties 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/metawidget/groovybooking/build.properties 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,2 +1,2 @@
# Uncomment when deploying to JBoss AS 5
-#loadPersistenceUnits=false
+loadPersistenceUnits=true
Modified: branches/enterprise/JBPAPP_5_0/examples/numberguess/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/numberguess/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/numberguess/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -2,7 +2,6 @@
=========================
This is a simple example for the Seam tutorial, demonstrating the use of
-jBPM-based page flow. It runs on both JBoss AS as an EAR and Tomcat with
-Embedded JBoss as an EAR.
+jBPM-based page flow. It runs on both JBoss AS as an EAR.
example.name=numberguess
Modified: branches/enterprise/JBPAPP_5_0/examples/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,9 +1,7 @@
Seam Example Applications
=========================
This directory contains the Seam example applications, which have all been
-tested on the latest release of JBoss 4.2. All but a few examples have been
-tested on Tomcat (running JDK 1.5), and some have been tested on other
-application servers. Consult the readme.txt file in each of the examples to
+tested on the latest release of JBoss EAP 5. Consult the readme.txt file in each of the examples to
see which additional servers the example supports.
Below is a list of examples with a brief description. The name of the example,
@@ -93,25 +91,17 @@
These are general instructions for deploying Seam examples. Take a look at the
readme.txt in the example to see if there are any specific instructions.
-How to Build and Deploy an Example on JBoss AS
+How to Build and Deploy an Example on JBoss EAP
----------------------------------------------
-1. Download and unzip JBoss AS 4.2.3.GA from:
-
- http://labs.jboss.com/jbossas/downloads
-
-2. Make sure you have an up to date version of Seam:
-
- http://seamframework.org/Download
-
-3. Open the "build.properties" file at the root of the Seam distribution in
+1. Open the "build.properties" file at the root of the Seam distribution in
your editor and change jboss.home to point to your JBoss AS directory
(the examples are deployed to the default profile)
-4. (Optional) Build Seam by running "ant" the Seam root directory
+2. (Optional) Build Seam by running "ant" the Seam root directory
Only required if you are working from an SVN checkout.
-5. Build and deploy the example by running the following command from the Seam
+3. Build and deploy the example by running the following command from the Seam
"examples/${example.name}" directory:
ant explode
@@ -124,10 +114,10 @@
ant restart
-6. Start JBoss AS by typing "./run.sh" (on Linux/Unix) or "run" (on Windows)
- in the jboss-4.2.3.GA/bin directory
+4. Start JBoss AS by typing "./run.sh" (on Linux/Unix) or "run" (on Windows)
+ in the jboss-eap-5/bin directory
-7. Point your web browser to:
+5. Point your web browser to:
http://localhost:8080/seam-${example.name}
@@ -145,51 +135,6 @@
NOTE: The examples use the HSQL database embedded in JBoss AS
-How to Build and Deploy the Example on Tomcat
----------------------------------------------
-
-1. Download and install Tomcat 6
-
- NOTE: Due to a bug, you must install Tomcat to a directory
- path with no spaces. The example does not work in a default
- install of Tomcat.
-
-2. Install Embedded JBoss as described in the "Configuration" chapter of the
- Seam reference documentation.
-
-3. Make sure you have an up to date version of Seam:
-
- http://seamframework.org/Download
-
-4. Open the "build.properties" file at the root of the Seam distribution in
- your editor and change tomcat.home to point to your Tomcat directory
-
-5. (Optional) Build Seam by running "ant" the Seam root directory
- Only required if you are working from an SVN checkout.
-
-6. Build and deploy the example by running the following command from the Seam
- "examples/${example.name}" directory:
-
- ant tomcat.deploy
-
- To undeploy the example, run:
-
- ant tomcat.undeploy
-
- To redeploy/restart the deployed application, run:
-
- ant tomcat.deploy
-
-7. Start Tomcat
-
-8. Point your web browser to:
-
- http://localhost:8080/jboss-seam-${example.name}
-
- Note that examples deployed to Tomcat use the context path prefix
- jboss-seam- rather than seam- like with the JBoss AS deployment.
-
-
Running The TestNG Tests
------------------------
Modified: branches/enterprise/JBPAPP_5_0/examples/registration/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/registration/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/registration/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -2,6 +2,6 @@
=========================
This is a trivial example for the Seam tutorial. It runs on both JBoss AS as an
-EAR and Tomcat with Embedded JBoss as a WAR.
+EAR.
example.name=registration
Modified: branches/enterprise/JBPAPP_5_0/examples/remoting/chatroom/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/remoting/chatroom/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/remoting/chatroom/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -2,6 +2,6 @@
==============================
This example shows using Seam Remoting to subscribe and publish messages to JMS.
-It runs on JBoss AS as an EAR and Tomcat with Embedded JBoss as a WAR.
+It runs on JBoss AS as an EAR.
example.name=chatroom
Modified: branches/enterprise/JBPAPP_5_0/examples/remoting/helloworld/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/remoting/helloworld/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/remoting/helloworld/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -2,6 +2,6 @@
================================
This example is a trivial example of Seam Remoting. It runs on JBoss AS as an
-EAR and Tomcat with Embedded JBoss as a WAR.
+EAR.
example.name=helloworld
Modified: branches/enterprise/JBPAPP_5_0/examples/seambay/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/seambay/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/seambay/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,8 +1,6 @@
SeamBay Example
===============
-This example shows Seam/WS integration. It runs on JBoss AS as an EAR and
-JBoss with Embedded JBoss as a WAR.
+This example shows Seam/WS integration. It runs on JBoss AS as an EAR.
Visit http://localhost:8080/seam-bay on JBoss AS
-Visit http://localhost:8080/jboss-seam-bay on Tomcat
Modified: branches/enterprise/JBPAPP_5_0/examples/seamdiscs/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/seamdiscs/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/seamdiscs/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,11 +1,9 @@
SeamDiscs Example
=================================
-This example runs on JBoss AS 4.2.2.GA or later as an EAR and Tomcat with
-Embedded JBoss as a WAR.
+This example runs on JBoss AS as an EAR.
-Visit http://localhost:8080/seam-discs (on JBoss AS) or
-http://localhost:8080/jboss-seam-discs (on Tomcat).
+Visit http://localhost:8080/seam-discs (on JBoss AS).
The seamdiscs example is a simple example built using the Seam Application
Framework which allows you to record your favourite albums and artists. It
Modified: branches/enterprise/JBPAPP_5_0/examples/seampay/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/seampay/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/seampay/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,8 +1,6 @@
SeamPay Example
===============
-This example shows Seam's EJB3 timer support. It runs on JBoss AS as an EAR
-and Tomcat with Embedded JBoss as a WAR.
+This example shows Seam's EJB3 timer support. It runs on JBoss AS as an EAR.
-Visit http://localhost:8080/seam-pay on JBoss AS
-Visit http://localhost:8080/jboss-seam-pay on Tomcat
+Visit http://localhost:8080/seam-pay on JBoss AS
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_5_0/examples/seamspace/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/seamspace/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/seamspace/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,8 +1,6 @@
SeamSpace Example
===============
-This example demonstrates Seam Security. It runs on JBoss AS as an EAR and
-Tomcat with Embedded JBoss as a WAR.
+This example demonstrates Seam Security. It runs on JBoss AS as an EAR.
-Visit http://localhost:8080/seam-space on JBoss AS
-Visit http://localhost:8080/jboss-seam-space on Tomcat
+Visit http://localhost:8080/seam-space on JBoss AS
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_5_0/examples/spring/readme.txt
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/spring/readme.txt 2009-07-14 09:57:47 UTC (rev 11288)
+++ branches/enterprise/JBPAPP_5_0/examples/spring/readme.txt 2009-07-14 12:06:14 UTC (rev 11289)
@@ -1,8 +1,8 @@
Spring Example
===============
-This example shows Seam/Spring integration. Currently it runs on JBoss AS 4.2
-as a WAR. It is deployed using the command "ant jbosswar" and undeployed using
+This example shows Seam/Spring integration. Currently it runs on JBoss AS as a WAR.
+ It is deployed using the command "ant jbosswar" and undeployed using
the command "ant jbosswar.undeploy".
Visit http://localhost:8080/jboss-seam-spring
15 years, 4 months
Seam SVN: r11288 - branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-14 05:57:47 -0400 (Tue, 14 Jul 2009)
New Revision: 11288
Modified:
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Configuration.xml
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Controls.xml
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Dependencies.xml
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Framework.xml
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Hsearch.xml
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/I18n.xml
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Mail.xml
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Preface.xml
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Tutorial.xml
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Webservices.xml
Log:
JBPAPP-2154 - documentation changes
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Configuration.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Configuration.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Configuration.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -86,17 +86,6 @@
<param-value>.xhtml</param-value>
</context-param>]]></programlisting>
- <para>
- If you are using facelets in JBoss AS, you'll find that Facelets logging is broken (the log messages
- don't make it to the server log). Seam provides a bridge to fix this, to use it copy
- <literal>lib/interop/jboss-seam-jul.jar</literal> to
- <literal>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/jsf-libs/</literal> and include the
- <literal>jboss-seam-ui.jar</literal> in the <literal>WEB-INF/lib</literal> of your application. The
- Facelets logging catagories are itemized in the <ulink
- url="https://facelets.dev.java.net/nonav/docs/dev/docbook.html#config-logging">Facelets Developer
- Documentation</ulink>.
- </para>
-
</sect2>
<sect2>
@@ -884,110 +873,6 @@
</imageobject>
</mediaobject>
- <para> The booking example application may even be deployed to Tomcat. </para>
-
- <mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/e-ejb3.png" align="center"/>
- </imageobject>
- <imageobject role="html">
- <imagedata fileref="images/e-ejb3.png" align="center"/>
- </imageobject>
- </mediaobject>
-
- <sect2 id="config.install.embedded">
- <title>Installing Embedded JBoss</title>
-
-
- <para>
- Embedded JBoss must by installed into Tomcat for Seam applications
- to run correctly on it. Embedded JBoss runs with JDK 5 or JDK 6 (
- see <xref linkend="jdk_dependencies" /> for details on using JDK 6).
- Embedded JBoss can be downloaded
- <ulink url="http://sourceforge.net/project/showfiles.php?group_id=22866&package_i...">here</ulink>.
- The process for installing Embedded JBoss into Tomcat 6 is quite
- simple. First, you should copy the Embedded JBoss JARs and
- configuration files into Tomcat.
- </para>
-
- <itemizedlist>
-
- <listitem>
- <para> Copy all files and directories under the Embedded JBoss <literal>bootstrap</literal> and
- <literal>lib</literal> directories, except for the <literal>jndi.properties</literal> file,
- into the Tomcat <literal>lib</literal> directory. </para>
- </listitem>
-
-
- <listitem>
- <para>Remove the <literal>annotations-api.jar</literal> file from the Tomcat <literal>lib</literal>
- directory. </para>
- </listitem>
- </itemizedlist>
-
-
- <para>Next, two configuration files need to be updated to add Embedded JBoss-specific functionality.</para>
-
- <itemizedlist>
-
-
- <listitem>
- <para> Add the Embedded JBoss listener <literal>EmbeddedJBossBootstrapListener</literal> to
- <literal>conf/server.xml</literal>. It must appear after all other listeners in the file:</para>
-
- <programlisting role="XML"><![CDATA[<Server port="8005" shutdown="SHUTDOWN">
-
- <!-- Comment these entries out to disable JMX MBeans support used for the
- administration web application -->
- <Listener className="org.apache.catalina.core.AprLifecycleListener" />
- <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
- <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
- <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener" />]]></programlisting>
- <programlisting role="XML"><![CDATA[ <!-- Add this listener -->
- <Listener className="org.jboss.embedded.tomcat.EmbeddedJBossBootstrapListener" />]]></programlisting>
- </listitem>
-
- <listitem>
- <para>WAR file scanning should be enabled by adding the <literal>WebinfScanner</literal> listener to
- <literal>conf/context.xml</literal>: </para>
-
- <programlisting role="XML"><![CDATA[<Context>
- <!-- Default set of monitored resources -->
- <WatchedResource>WEB-INF/web.xml</WatchedResource>
-
- <!-- Uncomment this to disable session persistence across Tomcat restarts -->
- <!--
- <Manager pathname="" />
- -->]]></programlisting>
- <programlisting role="XML"><![CDATA[ <!-- Add this listener -->
- <Listener className="org.jboss.embedded.tomcat.WebinfScanner" />]]></programlisting>
- <programlisting role="XML"><![CDATA[</Context>]]></programlisting>
- </listitem>
-
- <listitem>
- <para>If you are using Sun JDK 6, you need to set the Java option
- <literal>sun.lang.ClassLoader.allowArraySyntax</literal> to <literal>true</literal> in the
- JAVA_OPTS environment variable used by the Catalina startup script (catalina.bat on Windows or
- catalina.sh on Unix).</para>
-
- <para>Open the script appropriate for your operating system in a text editor. Add a new line
- immediately below the comments at the top of the file where you will define the JAVA_OPTS
- environment variable. On Windows, use the following syntax:</para>
-
- <programlisting><![CDATA[set JAVA_OPTS=%JAVA_OPTS% -Dsun.lang.ClassLoader.allowArraySyntax=true]]></programlisting>
-
- <para>On Unix, use this syntax instead:</para>
-
- <programlisting><![CDATA[JAVA_OPTS="$JAVA_OPTS -Dsun.lang.ClassLoader.allowArraySyntax=true"]]></programlisting>
-
- </listitem>
- </itemizedlist>
-
- <para>For more configuration options, please see the Embedded JBoss Tomcat integration
- <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedAndTomcat">wiki entry</ulink>.</para>
-
- </sect2>
-
<sect2>
<title>Packaging</title>
@@ -1091,7 +976,7 @@
jboss-seam.jar
lib/
jboss-el.jar
- jbpm-3.1.jar
+ jbpm-jpdl.jar
META-INF/
MANIFEST.MF
application.xml
@@ -1165,8 +1050,7 @@
</container-cache-conf>]]></programlisting>
<para> The default HTTP session timeout can be modified in
- <literal>server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml</literal> for JBoss 4.0.x, or in
- <literal>server/default/deploy/jboss-web.deployer/conf/web.xml</literal> for JBoss 4.2.x or later. The following
+ <literal>server/default/deploy/jboss-web.deployer/conf/web.xml</literal> for JBoss 4.2.x or later. The following
entry in this file controls the default session timeout for all web applications: </para>
<programlisting role="XML"><![CDATA[<session-config>
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Controls.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Controls.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Controls.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -7,7 +7,7 @@
Seam includes a number of JSF controls that are useful for working with
Seam. These are intended to complement the built-in JSF controls, and
controls from other third-party libraries. We recommend
- JBoss RichFaces, ICEsoft ICEfaces and Apache MyFaces Trinidad tag libraries for use with Seam.
+ JBoss RichFaces and Apache MyFaces Trinidad tag libraries for use with Seam.
We do not recommend the use of the Tomahawk tag library.
</para>
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Dependencies.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Dependencies.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Dependencies.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -163,21 +163,6 @@
<para>Required when using Seam's <trademark class="registered">Microsoft</trademark> <trademark class="registered">Excel</trademark> features</para>
</entry>
</row>
-
- <row>
- <entry>
- <para><literal>jboss-seam-rss.jar</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>war</para>
- </entry>
- <entry>
- <para>Required when using Seam's RSS generation features</para>
- </entry>
- </row>
<row>
<entry>
@@ -256,7 +241,7 @@
<row>
<entry>
- <para><literal>urlrewrite.jar</literal></para>
+ <para><literal>urlrewritefilter.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
@@ -634,11 +619,15 @@
</table>
</section>
- <section id="dependencies.rss">
- <title>Seam RSS support</title>
-
+ <section>
+ <title>JBoss Rules</title>
+
+ <para>
+ The JBoss Rules libraries can be found in the <literal>drools/lib</literal> directory in Seam.
+ </para>
+
<table>
- <title>Seam RSS Dependencies</title>
+ <title>JBoss Rules Dependencies</title>
<tgroup cols="4">
<colspec colnum="1" colwidth="4*" />
@@ -652,10 +641,10 @@
<para>Name</para>
</entry>
<entry align="center">
- <para>Type</para>
+ <para>Scope</para>
</entry>
<entry align="center">
- <para>Scope</para>
+ <para>Type</para>
</entry>
<entry align="center">
<para>Notes</para>
@@ -667,168 +656,67 @@
<row>
<entry>
- <para><literal>yarfraw.jar</literal></para>
+ <para><literal>antlr-runtime.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
</entry>
<entry align="center">
- <para>war</para>
+ <para>ear</para>
</entry>
<entry>
- <para>YARFRAW RSS library</para>
+ <para>ANTLR Runtime Library</para>
</entry>
</row>
-
+
<row>
<entry>
- <para><literal>JAXB</literal></para>
+ <para><literal>core.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
</entry>
<entry align="center">
- <para>war</para>
+ <para>ear</para>
</entry>
<entry>
- <para>JAXB XML parsing libraries</para>
+ <para>Eclipse JDT</para>
</entry>
- </row>
-
+ </row>
+
<row>
<entry>
- <para><literal>http-client.jar</literal></para>
+ <para><literal>drools-api.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
</entry>
<entry align="center">
- <para>war</para>
+ <para>ear</para>
</entry>
<entry>
- <para>Apache HTTP Client libraies</para>
+ <para></para>
</entry>
</row>
-
- <row>
- <entry>
- <para><literal>commons-io</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>war</para>
- </entry>
- <entry>
- <para>Apache commons IO library</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para><literal>commons-lang</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>war</para>
- </entry>
- <entry>
- <para>Apache commons lang library</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para><literal>commons-codec</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>war</para>
- </entry>
- <entry>
- <para>Apache commons codec library</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para><literal>commons-collections</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>war</para>
- </entry>
- <entry>
- <para>Apache commons collections library</para>
- </entry>
- </row>
<row>
<entry>
- <para><literal>jboss-seam-rss.jar</literal></para>
+ <para><literal>drools-compiler.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
</entry>
<entry align="center">
- <para>war</para>
+ <para>ear</para>
</entry>
<entry>
- <para>Seam RSS core library</para>
+ <para></para>
</entry>
- </row>
+ </row>
- </tbody>
- </tgroup>
- </table>
- </section>
-
-
- <section>
- <title>JBoss Rules</title>
-
- <para>
- The JBoss Rules libraries can be found in the <literal>drools/lib</literal> directory in Seam.
- </para>
-
- <table>
- <title>JBoss Rules Dependencies</title>
-
- <tgroup cols="4">
- <colspec colnum="1" colwidth="4*" />
- <colspec colnum="2" colwidth="2*" />
- <colspec colnum="3" colwidth="3*" />
- <colspec colnum="4" colwidth="5*" />
-
- <thead>
<row>
- <entry align="center">
- <para>Name</para>
- </entry>
- <entry align="center">
- <para>Scope</para>
- </entry>
- <entry align="center">
- <para>Type</para>
- </entry>
- <entry align="center">
- <para>Notes</para>
- </entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
<entry>
- <para><literal>antlr-runtime.jar</literal></para>
+ <para><literal>drools-core.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
@@ -837,13 +725,13 @@
<para>ear</para>
</entry>
<entry>
- <para>ANTLR Runtime Library</para>
+ <para></para>
</entry>
</row>
<row>
<entry>
- <para><literal>core.jar</literal></para>
+ <para><literal>drools-decisiontables.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
@@ -852,28 +740,13 @@
<para>ear</para>
</entry>
<entry>
- <para>Eclipse JDT</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para><literal>drools-compiler.jar</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>ear</para>
- </entry>
- <entry>
<para></para>
</entry>
- </row>
+ </row>
<row>
<entry>
- <para><literal>drools-core.jar</literal></para>
+ <para><literal>drools-templates.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
@@ -903,7 +776,7 @@
<row>
<entry>
- <para><literal>mvel.jar</literal></para>
+ <para><literal>mvel2.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Framework.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Framework.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Framework.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -76,8 +76,7 @@
<para>
A second advantage is that your classes may be EJB stateful
session beans, if you like. (They do not have to be, they
- can be plain JavaBean components if you prefer.) If you are using
- JBoss AS, you'll need 4.2.2.GA or later:
+ can be plain JavaBean components if you prefer.)
</para>
<programlisting role="JAVA"><![CDATA[@Stateful
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -27,7 +27,7 @@
<title>Before you start</title>
<para>
- Make sure you have JDK 5, JBoss AS 4.2 or 5.0, Eclipse 3.3, the JBoss
+ Make sure you have JDK 5, JBoss EAP 5, Eclipse 3.3, the JBoss
Tools plugins (at least Seam Tools, the Visual Page Editor, jBPM Tools
and JBoss AS Tools) and the TestNG plugin for Eclipse correctly
installed before starting.
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -11,8 +11,7 @@
yourself trapped in an elevator with one of those tedious Ruby guys ranting about how great and wonderful his
new toy is for building totally trivial applications that put things in databases.</para>
- <para>In this release, seam-gen works best for people with JBoss AS. You can use the generated project with other
- J2EE or Java EE 5 application servers by making a few manual changes to the project configuration.</para>
+ <para>In this release, seam-gen works best for people with JBoss EAP.</para>
<para>You <emphasis>can</emphasis> use seam-gen without Eclipse, but in this tutorial, we want to show you how to
use it in conjunction with Eclipse for debugging and integration testing. If you don't want to install Eclipse,
@@ -25,7 +24,7 @@
<title>Before you start</title>
<para>Make sure you have JDK 5 or JDK 6 (see <xref
- linkend="jdk_dependencies"/> for details), JBoss AS 4.2 or 5.0 and Ant 1.7.0, along with recent versions of
+ linkend="jdk_dependencies"/> for details), JBoss EAP 5 and Ant 1.7.0, along with recent versions of
Eclipse, the JBoss IDE plugin for Eclipse and the TestNG plugin for Eclipse correctly installed before
starting. Add your JBoss installation to the JBoss Server View in Eclipse. Start JBoss in debug mode.
Finally, start a command prompt in the directory where you unzipped the Seam distribution.</para>
@@ -55,12 +54,12 @@
<para>The first thing we need to do is configure seam-gen for your environment: JBoss AS installation directory,
project workspace, and database connection. It's easy, just type:</para>
- <programlisting>cd jboss-seam-2.0.x
+ <programlisting>cd <seam_distribution_dir>
seam setup</programlisting>
<para>And you will be prompted for the needed information:</para>
- <programlisting>~/workspace/jboss-seam$ ./seam setup
+ <programlisting><seam_distribution_dir>$ ./seam setup
Buildfile: build.xml
init:
@@ -70,7 +69,7 @@
[input] Enter your project workspace (the directory that contains your Seam projects) [C:/Projects] [C:/Projects]
/Users/pmuir/workspace
[input] Enter your JBoss home directory [C:/Program Files/jboss-4.2.3.GA] [C:/Program Files/jboss-4.2.3.GA]
-/Applications/jboss-4.2.3.GA
+/var/lib/jbossas
[input] Enter the project name [myproject] [myproject]
helloworld
[echo] Accepted project name as: helloworld
@@ -89,7 +88,7 @@
[input] Enter the Hibernate dialect for your database [org.hibernate.dialect.MySQLDialect] [org.hibernate.dialect.MySQLDialect]
[input] Enter the filesystem path to the JDBC driver jar [lib/hsqldb.jar] [lib/hsqldb.jar]
-/Users/pmuir/java/mysql.jar
+/usr/share/java/mysql.jar
[input] Enter JDBC driver class for your database [com.mysql.jdbc.Driver] [com.mysql.jdbc.Driver]
[input] Enter the JDBC URL for your database [jdbc:mysql:///test] [jdbc:mysql:///test]
@@ -134,7 +133,7 @@
<programlisting>seam new-project</programlisting>
- <programlisting>C:\Projects\jboss-seam>seam new-project
+ <programlisting><seam_distribution_dir> seam new-project
Buildfile: build.xml
...
@@ -407,41 +406,4 @@
incremental hot deployment for EAR projects.</para>
</section>
- <section>
- <title>Using Seam with JBoss 4.0</title>
-
- <para> Seam 2.0 was developed for JavaServer Faces 1.2. When using JBoss AS, we recommend using JBoss 4.2 or
- JBoss 5.0, both of which bundle the JSF 1.2 reference implementation. However, it is still possible to use
- Seam 2.0 on the JBoss 4.0 platform. There are two basic steps required to do this: install an EJB3-enabled
- version of JBoss 4.0 and replace MyFaces with the JSF 1.2 reference implementation. Once you complete these
- steps, Seam 2.0 applications can be deployed to JBoss 4.0.</para>
-
- <section>
- <title>Install JBoss 4.0</title>
- <para>JBoss 4.0 does not ship a default configuration compatible with Seam. To run Seam, you must install
- JBoss 4.0.5 using the JEMS 1.2 installer with the ejb3 profile selected. Seam will not run with an
- installation that doesn't include EJB3 support. The JEMS installer can be downloaded from <ulink
- url="http://labs.jboss.com/jemsinstaller/downloads"
- >http://labs.jboss.com/jemsinstaller/downloads</ulink>. </para>
- </section>
-
- <section>
- <title>Install the JSF 1.2 RI</title>
-
- <para> The web configuration for JBoss 4.0 can be found in the
- <literal>server/default/deploy/jbossweb-tomcat55.sar</literal>. You'll need to delete
- <literal>myfaces-api.jar</literal> any <literal>myfaces-impl.jar</literal> from the
- <literal>jsf-libs </literal>directory. Then, you'll need to copy <literal>jsf-api.jar</literal>,
- <literal>jsf-impl.jar</literal>, <literal>el-api.jar</literal>, and <literal>el-ri.jar</literal>
- to that directory. The JSF JARs can be found in the Seam <literal>lib</literal> directory. The el JARs
- can be obtained from the Seam 1.2 release. </para>
-
- <para>You'll also need to edit the <literal>conf/web.xml</literal>, replacing
- <literal>myfaces-impl.jar</literal> with <literal>jsf-impl.jar</literal>. </para>
- </section>
-
-
-
- </section>
-
</chapter>
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Hsearch.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Hsearch.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Hsearch.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -53,34 +53,8 @@
</properties>
</persistence-unit>]]></programlisting>
- <para>If you plan to target Hibernate Annotations or EntityManager 3.2.x
- (embedded into JBoss AS 4.2.x and later), you also need to configure the
- appropriate event listeners.</para>
-
- <programlisting role="XML"><![CDATA[<persistence-unit name="sample">
- <jta-data-source>java:/DefaultDS</jta-data-source>
- <properties>
- [...]
- <!-- use a file system based index -->
- <property name="hibernate.search.default.directory_provider"
- value="org.hibernate.search.store.FSDirectoryProvider"/>
- <!-- directory where the indexes will be stored -->
- <property name="hibernate.search.default.indexBase"
- value="/Users/prod/apps/dvdstore/dvdindexes"/>
-
- <property name="hibernate.ejb.event.post-insert"
- value="org.hibernate.search.event.FullTextIndexEventListener"/>
- <property name="hibernate.ejb.event.post-update"
- value="org.hibernate.search.event.FullTextIndexEventListener"/>
- <property name="hibernate.ejb.event.post-delete"
- value="org.hibernate.search.event.FullTextIndexEventListener"/>
-
- </properties>
-</persistence-unit>]]></programlisting>
-
- <note>
- <para>It is not longer necessary the register the event listeners if
- Hibernate Annotations or EntityManager 3.3.x are used.
+ <note>
+ <para>
When using Hibernate Search 3.1.x more eventlisteners are needed, but
these are registered automatically by Hibernate Annotations; refer
to the Hibernate Search reference for configuring it without
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/I18n.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/I18n.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/I18n.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -31,9 +31,9 @@
<para>
To ensure that the application server receives the request
parameters in the correct encoding from client requests you have to
- configure the tomcat connector. If you use Tomcat or JBoss AS, add
+ configure the tomcat connector. Add
the <literal>URIEncoding="UTF-8"</literal> attribute to the
- connector configuration. For JBoss AS 4.2 change
+ connector configuration in
<literal>${JBOSS_HOME}/server/(default)/deploy/jboss-web.deployer/server.xml</literal>:
</para>
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Mail.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Mail.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Mail.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -469,30 +469,6 @@
</section>
</section>
- <section>
- <title>Meldware</title>
-
- <para>
- Seam's mail examples use Meldware (from <ulink url="http://buni.org">buni.org</ulink>)
- as a mail server. Meldware is a groupware package that provides
- <literal>SMTP</literal>, <literal>POP3</literal>, <literal>IMAP</literal>,
- webmail, a shared calendar and an graphical admin tool; it's written as a
- JEE application so can be deployed onto JBoss AS alongside your Seam
- application.
- </para>
-
- <caution>
- <para>
- The version of Meldware distributed with Seam (downloaded on demand)
- is specially tailored for development - mailboxes, users and
- aliases (email addresses) are created every time the application
- deploys. If you want to use Meldware in production you should install
- the latest release from <ulink url="http://buni.org">buni.org</ulink>.
- </para>
- </caution>
-
- </section>
-
<section id="mail.tags">
<title>Tags</title>
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Preface.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Preface.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Preface.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -79,9 +79,9 @@
<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.
+ Seam supports the best open source JSF-based AJAX solution - JBoss
+ RichFaces. 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
@@ -264,17 +264,6 @@
</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>
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Tutorial.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -32,23 +32,20 @@
</itemizedlist>
- <para>
- The example applications run both on JBoss AS and Tomcat with no additional configuration.
- The following sections will explain the procedure in both cases. Note that all the examples
- are built and run from the Ant <filename>build.xml</filename>, so you'll need a recent version
- of Ant installed before you get started.
- </para>
+ <para>
+ Note that all the examples are built and run from the Ant
+ <filename>build.xml</filename>, so you'll need a recent version
+ of Ant installed before you get started.
+ </para>
-
-
<section>
<title>Running the examples on JBoss AS</title>
- <para>The examples are configured for use on JBoss AS 4.2 or 5.0. You'll need to set <literal>jboss.home</literal>,
+ <para>The examples are configured for use on JBoss EAP AS. You'll need to set <literal>jboss.home</literal>,
in the shared <literal>build.properties</literal> file in the root folder of your Seam
installation, to the location of your JBoss AS installation.</para>
- <para>Once you've set the location of JBoss AS and started the application server, you can build and deploy
+ <para>Once you've set the location of JBoss EAP AS and started the application server, you can build and deploy
any example by typing <literal>ant explode</literal> in the the directory for that example. Any example
that is packaged as an EAR deploys to a URL like
<literal>/seam-<replaceable>example</replaceable></literal>, where <replaceable>example</replaceable> is
@@ -60,43 +57,13 @@
<literal>http://localhost:8080/seam-space/</literal></ulink>.</para>
<para>If, on the other hand, the example gets packaged as a WAR, then it deploys to a URL like
- <literal>/jboss-seam-<replaceable>example</replaceable></literal>. Most of the examples can be deployed as a WAR
- to Tomcat with Embedded JBoss by typing <literal>ant tomcat.deploy</literal>. Several of the examples
+ <literal>/jboss-seam-<replaceable>example</replaceable></literal>. Several of the examples
can only be deployed as a WAR. Those examples are groovybooking, hibernate, jpa, and spring.
</para>
</section>
<section>
- <title>Running the examples on Tomcat</title>
-
- <para>The examples are also configured for use on Tomcat 6.0. You will need to follow the
- instructions in <xref linkend="config.install.embedded"/>
- for installing JBoss Embedded on Tomcat 6.0. JBoss Embedded is only required to run the Seam
- demos that use EJB3 components on Tomcat. There are also examples of non-EJB3 applications that
- can be run on Tomcat without the use of JBoss Embedded.
- </para>
- <para>You'll need to
- set <literal>tomcat.home</literal>, in the shared <literal>build.properties</literal> file in
- the root folder of your Seam installation, to the location of your Tomcat installation.
- make sure you set the location of your Tomcat.
- </para>
-
- <para>You'll need to use a different Ant target when using Tomcat. Use
- <literal>ant tomcat.deploy</literal> in example subdirectory to build and deploy
- any example for Tomcat.
- </para>
-
- <para>On Tomcat, the examples deploy to URLs like
- <literal>/jboss-seam-<replaceable>example</replaceable></literal>, so for the registration
- example the URL would be <ulink url="http://localhost:8080/jboss-seam-registration/">
- <literal>http://localhost:8080/jboss-seam-registration/</literal></ulink>. The same is true
- for examples that deploy as a WAR, as mentioned in the previous section.
- </para>
-
- </section>
-
- <section>
<title>Running the example tests</title>
<para>
Most of the examples come with a suite of TestNG integration tests. The easiest way to run the tests is
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Webservices.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Webservices.xml 2009-07-13 21:06:19 UTC (rev 11287)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Webservices.xml 2009-07-14 09:57:47 UTC (rev 11288)
@@ -198,475 +198,4 @@
</sect1>
- <sect1>
- <title>RESTful HTTP webservices with RESTEasy</title>
-
- <para>
- Seam integrates the RESTEasy implementation of the JAX-RS specification (JSR 311). You can decide how
- "deep" the integration into your Seam application is going to be:
- </para>
-
- <itemizedlist>
- <listitem>
- <para>
- Seamless integration of RESTEasy bootstrap and configuration, automatic detection of resources
- and providers.
- </para>
- </listitem>
- <listitem>
- <para>
- Serving HTTP/REST requests with the SeamResourceServlet, no external servlet or configuration in
- web.xml required.
- </para>
- </listitem>
- <listitem>
- <para>
- Writing resources as Seam components, with full Seam lifecycle management and interception (bijection).
- </para>
- </listitem>
- </itemizedlist>
-
- <sect2>
- <title>RESTEasy configuration and request serving</title>
-
- <para>
- First, get the RESTEasy libraries and the <literal>jaxrs-api.jar</literal>, deploy them with the
- other libraries of your application. Also deploy the integration library,
- <literal>jboss-seam-resteasy.jar</literal>.
- </para>
-
- <para>
- On startup, all classes annotated <literal>@javax.ws.rs.Path</literal> will be discovered automatically
- and registered as HTTP resources. Seam automatically accepts and serves HTTP requests with its built-in
- <literal>SeamResourceServlet</literal>. The URI of a resource is build as follows:
- </para>
-
- <itemizedlist>
- <listitem>
- <para>
- The URI starts with the pattern mapped in <literal>web.xml</literal> for the
- <literal>SeamResourceServlet</literal>, e.g <literal>/seam/resource</literal> if you follow
- the common examples. Change this setting to expose your RESTful resources under a different base.
- Note that this is a global change and other Seam resources (e.g. <literal>s:graphicImage</literal>)
- are then also served under that base path.
- </para>
- </listitem>
- <listitem>
- <para>
- The RESTEasy integration for Seam then appends a configurable string to the base path, by default
- this is <literal>/rest</literal>. Hence, the full base path of your resources would e.g. be
- <literal>/seam/resource/rest</literal>. We recommend that you change this string in your application,
- you could for example add a version number to prepare for a future REST API upgrade of your services
- (old clients would keep the old URI base): <literal>/seam/resource/restv1</literal>.
- </para>
- </listitem>
- <listitem>
- <para>
- Finally, the actual resource is available under the defined <literal>@Path</literal>, e.g. a resource
- mapped with <literal>@Path("/customer")</literal> would be available under
- <literal>/seam/resource/rest/customer</literal>.
- </para>
- </listitem>
- </itemizedlist>
-
- <para>
- As an example, the following resource definition would return a plaintext representation for any
- GET requests using the URI <literal>http://your.hostname/seam/resource/rest/customer/123</literal>:
- </para>
-
- <programlisting role="JAVA"><![CDATA[@Path("/customer")
-public class MyCustomerResource {
-
- @GET
- @Path("/{customerId}")
- @Produces("text/plain")
- public String getCustomer(@PathParam("customerId") int id) {
- return ...;
- }
-
-}]]></programlisting>
-
- <para>
- No additional configuration is required, you do not have to edit <literal>web.xml</literal> or any
- other setting if these defauls are acceptable. However, you can configure RESTEasy in your Seam application.
- First import the <literal>resteasy</literal> namespace into your XML configuration file header:
- </para>
-
- <programlisting role="XML"><![CDATA[<components
- xmlns="http://jboss.com/products/seam/components"
- xmlns:resteasy="http://jboss.com/products/seam/resteasy"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation=
- http://jboss.com/products/seam/resteasy
- http://jboss.com/products/seam/resteasy-2.2.xsd
- http://jboss.com/products/seam/components
- http://jboss.com/products/seam/components-2.2.xsd">]]></programlisting>
-
- <para>
- You can then change the <literal>/rest</literal> prefix as mentioned earlier:
- </para>
-
- <programlisting role="XML"><![CDATA[<resteasy:application resource-path-prefix="/restv1"/>]]></programlisting>
-
- <para>
- The full base path to your resources is now <literal>/seam/resource/restv1/{resource}</literal> - note
- that your <literal>@Path</literal> definitions and mappings do NOT change. This is an application-wide
- switch usually used for versioning of the HTTP API.
- </para>
-
- <para>
- You can disable stripping of the base path if you'd like to map the full path in your resources:
- </para>
-
- <programlisting role="XML"><![CDATA[<resteasy:application strip-seam-resource-path="false"/>]]></programlisting>
-
- <para>
- The path of a resource is now mapped with e.g.
- <literal>@Path("/seam/resource/rest/customer")</literal>. We do not recommend disabling this feature,
- as your resource class mappings are then bound to a particular deployment scenario.
- </para>
-
- <para>
- Seam will scan your classpath for any deployed <literal>@javax.ws.rs.Path</literal> resources and any
- <literal>@javax.ws.rs.ext.Provider</literal> classes. You can disable scanning and configure these
- classes manually:
- </para>
-
- <programlisting role="XML"><![CDATA[<resteasy:application
- scan-providers="false"
- scan-resources="false"
- use-builtin-providers="true">
-
- <resteasy:resource-class-names>
- <value>org.foo.MyCustomerResource</value>
- <value>org.foo.MyOrderResource</value>
- <value>org.foo.MyStatelessEJBImplementation</value>
- </resteasy:resource-class-names>
-
- <resteasy:provider-class-names>
- <value>org.foo.MyFancyProvider</value>
- </resteasy:provider-class-names>
-
- </resteasy:application>]]></programlisting>
-
- <para>
- The <literal>use-built-in-providers</literal> switch enables (default) or disables the RESTEasy built-in
- providers. We recommend you leave them enabled, as they provide plaintext, JSON, and JAXB marshalling
- out of the box.
- </para>
-
- <para>
- RESTEasy supports plain EJBs (EJBs that are not Seam components) as resources. Instead of configuring the
- JNDI names in a non-portable fashion in <literal>web.xml</literal> (see RESTEasy documentation), you can
- simply list the EJB implementation classes, not the business interfaces, in <literal>components.xml</literal>
- as shown above. Note that you have to annotate the <literal>@Local</literal> interface of the EJB with
- <literal>@Path</literal>, <literal>@GET</literal>, and so on - not the bean implementation class. This allows
- you to keep your application deployment-portable with the global Seam <literal>jndi-pattern</literal> switch
- on <literal><core:init/></literal>. Note that EJB resources will not be found even if scanning of
- resources is enabled, you always have to list them manually. Again, this is only relevant for EJB resources
- that are not also Seam components and that do not have a <literal>@Name</literal> annotation.
- </para>
-
- <para>
- Finally, you can configure media type and language URI extensions:
- </para>
-
- <programlisting role="XML"><![CDATA[<resteasy:application>
-
- <resteasy:media-type-mappings>
- <key>txt</key><value>text/plain</value>
- </resteasy:media-type-mappings>
-
- <resteasy:language-mappings>
- <key>deutsch</key><value>de-DE</value>
- </resteasy:language-mappings>
-
-</resteasy:application>]]></programlisting>
-
- <para>
- This definition would map the URI suffix of <literal>.txt.deutsch</literal> to
- additional <literal>Accept</literal> and <literal>Accept-Language</literal> header values
- <literal>text/plain</literal> and <literal>de-DE</literal>.
- </para>
-
- </sect2>
-
- <sect2>
- <title>Resources and providers as Seam components</title>
-
- <para>
- Any resource and provider instances are managed by RESTEasy by default. That means a resource class
- will be instantiated by RESTEasy and serve a single request, after which it will be destroyed. This is
- the default JAX-RS lifecycle. Providers are instantiated once for the whole application and are
- effectively singletons and supposed to be stateless.
- </para>
-
- <para>
- You can write resources and providers as Seam components and benefit from the richer lifecycle management
- of Seam, and interception for bijection, security, and so on. Simply make your resource class a
- Seam component:
- </para>
-
- <programlisting role="JAVA"><![CDATA[@Name("customerResource")
-@Path("/customer")
-public class MyCustomerResource {
-
- @In
- CustomerDAO customerDAO;
-
- @GET
- @Path("/{customerId}")
- @Produces("text/plain")
- public String getCustomer(@PathParam("customerId") int id) {
- return customerDAO.find(id).getName();
- }
-
-}]]></programlisting>
-
- <para>
- An instance of <literal>customerResource</literal> is now handled by Seam when a request hits the
- server. This is a Seam JavaBean component that is <literal>EVENT</literal>-scoped, hence no different
- than the default JAX-RS lifecycle. You get full Seam injection and interception support, and all other Seam
- components and contexts are available to you. Currently also supported are <literal>APPLICATION</literal>
- and <literal>STATELESS</literal> resource Seam components. These three scopes allow you to create an effectively
- stateless Seam middle-tier HTTP request-processing application.
- </para>
-
- <para>
- You can annotate an interface and keep the implementation free from JAX-RS annotations:
- </para>
-
- <programlisting role="JAVA"><![CDATA[@Path("/customer")
-public interface MyCustomerResource {
-
- @GET
- @Path("/{customerId}")
- @Produces("text/plain")
- public String getCustomer(@PathParam("customerId") int id);
-
-}]]></programlisting>
-
- <programlisting role="JAVA"><![CDATA[@Name("customerResource")
-(a)Scope(ScopeType.STATELESS)
-public class MyCustomerResourceBean implements MyCustomerResource {
-
- @In
- CustomerDAO customerDAO;
-
- public String getCustomer(int id) {
- return customerDAO.find(id).getName();
- }
-
-}]]></programlisting>
-
- <para>
- You can use <literal>SESSION</literal>-scoped Seam components. By default, the session will however be shortened
- to a single request. In other words, when an HTTP request is being processed by the RESTEasy integration code,
- an HTTP session will be created so that Seam components can utilize that context. When the request has
- been processed, Seam will look at the session and decide if the session was created only to serve that
- single request (no session identifier has been provided with the request, or no session existed for the request).
- If the session has been created only to serve this request, the session will be destroyed after the request!
- </para>
-
- <para>
- Assuming that your Seam application only uses event, application, or stateless components, this procedure
- prevents exhaustion of available HTTP sessions on the server. The RESTEasy integration with Seam assumes
- by default that sessions are not used, hence anemic sessions would add up as every REST request would start
- a session that will only be removed when timed out.
- </para>
-
- <para>
- If your RESTful Seam application has to preserve session state across REST HTTP requests, disable this
- behavior in your configuration file:
- </para>
-
- <programlisting role="XML"><![CDATA[<resteasy:application destroy-session-after-request="false"/>]]></programlisting>
-
- <para>
- Every REST HTTP request will now create a new session that will only be removed by timeout or explicit
- invalidation in your code through <literal>Session.instance().invalidate()</literal>.
- It is your responsibility to pass a valid session identifier along with your HTTP requests, if you want
- to utilize the session context across requests.
- </para>
-
- <para>
- <literal>CONVERSATION</literal>-scoped resource components and mapping of conversations to temporary HTTP
- resources and paths is planned but currently not supported.
- </para>
-
- <para>
- EJB Seam components are supported. Always annotate the local business interface, not the EJB implementation
- class, with JAX-RS annotations. The EJB has to be <literal>STATELESS</literal>.
- </para>
-
- <para>
- Provider classes can also be Seam components, only <literal>APPLICATION</literal>-scoped
- provider components are supported. You can annotate the bean interface or implementation with JAX-RS annotations.
- EJB Seam components as providers are currently <emphasis>NOT</emphasis> supported, only POJOs!
- </para>
-
- </sect2>
-
- <sect2>
- <title>Securing resources</title>
-
- <para>
- You can enable the Seam authentication filter for HTTP Basic and Digest authentication in
- <literal>components.xml</literal>:
- </para>
-
- <programlisting role="XML"><![CDATA[<web:authentication-filter url-pattern="/seam/resource/rest/*" auth-type="basic"/>]]></programlisting>
-
- <para>
- See the Seam security chapter on how to write an authentication routine.
- </para>
-
- <para>
- After successful authentication, authorization rules with the common
- <literal>@Restrict</literal> and <literal>@PermissionCheck</literal> annotations are in effect. You can
- also access the client <literal>Identity</literal>, work with permission mapping, and so on. All
- regular Seam security features for authorization are available.
- </para>
-
- </sect2>
-
- <sect2>
- <title>Mapping exceptions to HTTP responses</title>
-
- <para>
- Section 3.3.4 of the JAX-RS specification defines how checked or unchecked exceptions are handled by the
- JAX RS implementation. In addition to using an exception mapping provider as defined by JAX-RS, the integration
- of RESTEasy with Seam allows you to map exceptions to HTTP response codes within Seam's <literal>pages.xml</literal>
- facility. If you are already using <literal>pages.xml</literal> declarations, this is easier to maintain than
- potentially many JAX RS exception mapper classes.
- </para>
-
- <para>
- Exception handling within Seam requires that the Seam filter is executed for your HTTP request. Ensure that
- you do filter <emphasis>all</emphasis> requests in your <literal>web.xml</literal>, not - as
- some Seam examples might show - a request URI pattern that doesn't cover your REST request paths.
- The following example intercepts <emphasis>all</emphasis> HTTP requests and enables Seam exception handling:
- </para>
-
- <programlisting role="XML"><![CDATA[<filter>
- <filter-name>Seam Filter</filter-name>
- <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
-</filter>
-
-<filter-mapping>
- <filter-name>Seam Filter</filter-name>
- <url-pattern>/*</url-pattern>
-</filter-mapping>]]></programlisting>
-
- <para>
- To convert the unchecked <literal>UnsupportedOperationException</literal> thrown by your resource
- methods to a <literal>501 Not Implemented</literal> HTTP status response, add the following to your
- <literal>pages.xml</literal> descriptor:
- </para>
-
- <programlisting role="XML"><![CDATA[<exception class="java.lang.UnsupportedOperationException">
- <http-error error-code="501">
- <message>The requested operation is not supported</message>
- </http-error>
-</exception>]]></programlisting>
-
- <para>
- Custom or checked exceptions are handled the same:
- </para>
-
- <programlisting role="XML"><![CDATA[<exception class="my.CustomException" log="false">
- <http-error error-code="503">
- <message>Service not available: #{org.jboss.seam.handledException.message}</message>
- </http-error>
-</exception>]]></programlisting>
-
- <para>
- You do not have to send an HTTP error to the client if an exception occurs. Seam allows you to map the
- exception as a redirect to a view of your Seam application. As this feature is typically used for human
- clients (web browsers) and not for REST API remote clients, you should pay extra attention to conflicting
- exception mappings in <literal>pages.xml</literal>.
- </para>
-
- <para>
- Note that the HTTP response still passes through the servlet container, so an additional mapping might apply
- if you have <literal><error-page></literal> mappings in your <literal>web.xml</literal> configuration.
- The HTTP status code would then be mapped to a rendered HTML error page with status <literal>200 OK</literal>!
- </para>
-
- </sect2>
-
- <sect2>
- <title>Testing resources and providers</title>
-
- <para>
- Seam includes a unit testing utility class that helps you create unit tests for a RESTful
- architecture. Extend the <literal>SeamTest</literal> class as usual and use the
- <literal>ResourceRequestEnvironment.ResourceRequest</literal> to emulate HTTP requests/response cycles:
- </para>
-
- <programlisting role="JAVA"><![CDATA[import org.jboss.seam.mock.ResourceRequestEnvironment;
-import org.jboss.seam.mock.EnhancedMockHttpServletRequest;
-import org.jboss.seam.mock.EnhancedMockHttpServletResponse;
-import static org.jboss.seam.mock.ResourceRequestEnvironment.ResourceRequest;
-import static org.jboss.seam.mock.ResourceRequestEnvironment.Method;
-
-public class MyTest extends SeamTest {
-
- ResourceRequestEnvironment sharedEnvironment;
-
- @BeforeClass
- public void prepareSharedEnvironment() throws Exception {
- sharedEnvironment = new ResourceRequestEnvironment(this) {
- @Override
- public Map<String, Object> getDefaultHeaders() {
- return new HashMap<String, Object>() {{
- put("Accept", "text/plain");
- }};
- }
- };
- }
-
- @Test
- public void test() throws Exception
- {
- //Not shared: new ResourceRequest(new ResourceRequestEnvironment(this), Method.GET, "/my/relative/uri)
-
- new ResourceRequest(sharedEnvironment, Method.GET, "/my/relative/uri)
- {
- @Override
- protected void prepareRequest(EnhancedMockHttpServletRequest request)
- {
- request.addQueryParameter("foo", "123");
- request.addHeader("Accept-Language", "en_US, de");
- }
-
- @Override
- protected void onResponse(EnhancedMockHttpServletResponse response)
- {
- assert response.getStatus() == 200;
- assert response.getContentAsString().equals("foobar");
- }
-
- }.run();
- }
-}]]></programlisting>
-
- <para>
- This test only executes local calls, it does not communicate with the <literal>SeamResourceServlet</literal>
- through TCP. The mock request is passed through the Seam servlet and filters and the response is then
- available for test assertions. Overriding the <literal>getDefaultHeaders()</literal> method in a shared
- instance of <literal>ResourceRequestEnvironment</literal> allows you to set request headers for every
- test method in the test class.
- </para>
-
- <para>
- Note that a <literal>ResourceRequest</literal> has to be executed in a <literal>@Test</literal> method
- or in a <literal>@BeforeMethod</literal> callback. You can not execute it in any other callback,
- such as <literal>@BeforeClass</literal>.
- </para>
-
- </sect2>
-
- </sect1>
-
</chapter>
15 years, 4 months
Seam SVN: r11287 - in branches/community/Seam_2_2: examples and 3 other directories.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-07-13 17:06:19 -0400 (Mon, 13 Jul 2009)
New Revision: 11287
Modified:
branches/community/Seam_2_2/build/root.pom.xml
branches/community/Seam_2_2/examples/blog/resources/WEB-INF/pages.xml
branches/community/Seam_2_2/examples/blog/view/menu.xhtml
branches/community/Seam_2_2/examples/build.xml
branches/community/Seam_2_2/examples/itext/resources/WEB-INF/components.xml
branches/community/Seam_2_2/examples/itext/resources/WEB-INF/pages.xml
Log:
revert mistaken commit
Modified: branches/community/Seam_2_2/build/root.pom.xml
===================================================================
--- branches/community/Seam_2_2/build/root.pom.xml 2009-07-13 20:58:26 UTC (rev 11286)
+++ branches/community/Seam_2_2/build/root.pom.xml 2009-07-13 21:06:19 UTC (rev 11287)
@@ -350,11 +350,11 @@
</exclusions>
</dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-atom-provider</artifactId>
- <version>1.1-RC2</version>
- </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-atom-provider</artifactId>
+ <version>1.1-RC2</version>
+ </dependency>
<dependency>
<groupId>org.hibernate</groupId>
@@ -852,7 +852,7 @@
<dependency>
<groupId>org.jboss.el</groupId>
<artifactId>jboss-el</artifactId>
- <version>1.0_02.CR5</version>
+ <version>1.0_02.CR4</version>
</dependency>
<dependency>
@@ -1236,14 +1236,14 @@
<artifactId>wicket-datetime</artifactId>
<version>${version.wicket}</version>
</dependency>
-
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.4.2</version>
- </dependency>
-
- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.4.2</version>
Modified: branches/community/Seam_2_2/examples/blog/resources/WEB-INF/pages.xml
===================================================================
--- branches/community/Seam_2_2/examples/blog/resources/WEB-INF/pages.xml 2009-07-13 20:58:26 UTC (rev 11286)
+++ branches/community/Seam_2_2/examples/blog/resources/WEB-INF/pages.xml 2009-07-13 21:06:19 UTC (rev 11287)
@@ -11,7 +11,7 @@
<page view-id="/search.xhtml">
<rewrite pattern="/search/{searchPattern}"/>
- <!-- <rewrite pattern="/search"/> -->
+ <rewrite pattern="/search"/>
<param name="searchPattern"
value="#{searchService.searchPattern}"/>
Modified: branches/community/Seam_2_2/examples/blog/view/menu.xhtml
===================================================================
--- branches/community/Seam_2_2/examples/blog/view/menu.xhtml 2009-07-13 20:58:26 UTC (rev 11286)
+++ branches/community/Seam_2_2/examples/blog/view/menu.xhtml 2009-07-13 21:06:19 UTC (rev 11287)
@@ -5,9 +5,7 @@
xmlns:f="http://java.sun.com/jsf/core">
<span class="menuItem">
- <h:inputText id="field" value="#{searchService.searchPattern}">
- <f:validateLength minimum="3" maximum="5"/>
- </h:inputText>
+ <h:inputText id="field" value="#{searchService.searchPattern}"/>
<h:commandButton id="submit" value="Search" action="/search.xhtml"/>
<s:conversationPropagation type="none"/>
</span>
Modified: branches/community/Seam_2_2/examples/build.xml
===================================================================
--- branches/community/Seam_2_2/examples/build.xml 2009-07-13 20:58:26 UTC (rev 11286)
+++ branches/community/Seam_2_2/examples/build.xml 2009-07-13 21:06:19 UTC (rev 11287)
@@ -1158,22 +1158,17 @@
<fail if="incompatible.jdk">You are using an incompatible JDK 6. Please use Sun JDK 6 Update 4 (1.6.0_04) or newer or use Open JDK 6.</fail>
<taskdef resource="testngtasks" classpathref="test.classpath" />
<testng outputdir="${test-report.dir}">
- <jvmarg line="-Xmx800M" />
- <jvmarg line="-Djava.awt.headless=true" />
- <jvmarg line="-Demma.coverage.out.file=${coverage.ec}" />
- <jvmarg line="-Djava.endorsed.dirs=${endorsed.dir}" />
-
- <jvmarg line="-Xdebug" />
- <jvmarg line="-Xnoagent" />
- <jvmarg line="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000" />
-
+ <jvmarg line="-Xmx800M" />
+ <jvmarg line="-Djava.awt.headless=true" />
+ <jvmarg line="-Demma.coverage.out.file=${coverage.ec}" />
+ <jvmarg line="-Djava.endorsed.dirs=${endorsed.dir}" />
<!--added for JDK6 compatibility with JBoss embedded-->
<jvmarg line="-Dsun.lang.ClassLoader.allowArraySyntax=true"/>
- <jvmarg line="${testng.jvmargs}" />
- <classpath>
- <path refid="test.classpath" />
- <path refid="runtime.emma.path" />
- </classpath>
+ <jvmarg line="${testng.jvmargs}" />
+ <classpath>
+ <path refid="test.classpath" />
+ <path refid="runtime.emma.path" />
+ </classpath>
<xmlfileset dir="${src.test.dir}" includes="**/testng.xml" />
</testng>
<echo>You can increase the logging by editing bootstrap/log4j.xml</echo>
Modified: branches/community/Seam_2_2/examples/itext/resources/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_2/examples/itext/resources/WEB-INF/components.xml 2009-07-13 20:58:26 UTC (rev 11286)
+++ branches/community/Seam_2_2/examples/itext/resources/WEB-INF/components.xml 2009-07-13 21:06:19 UTC (rev 11287)
@@ -1,7 +1,6 @@
<components xmlns="http://jboss.com/products/seam/components"
xmlns:pdf="http://jboss.com/products/seam/pdf"
xmlns:core="http://jboss.com/products/seam/core"
- xmlns:navigation="http://jboss.com/products/seam/navigation"
xmlns:framework="http://jboss.com/products/seam/framework"
xmlns:web="http://jboss.com/products/seam/web"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -16,8 +15,6 @@
<property name="errorPage">/pdfMissing.seam</property>
</component>
- <navigation:pages https-port="8443" />
-
<pdf:key-store-config key-store="pdf.keystore"
key-store-password="storepass"
key-password="keypass"
Modified: branches/community/Seam_2_2/examples/itext/resources/WEB-INF/pages.xml
===================================================================
--- branches/community/Seam_2_2/examples/itext/resources/WEB-INF/pages.xml 2009-07-13 20:58:26 UTC (rev 11286)
+++ branches/community/Seam_2_2/examples/itext/resources/WEB-INF/pages.xml 2009-07-13 21:06:19 UTC (rev 11287)
@@ -1,14 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<pages xmlns="http://jboss.com/products/seam/pages"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd">
+<pages xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd">
-<!--
- <page view-id="/index.xhtml" action="#{mtest.pingxzckjczxljkc}" />
- <page view-id="/foo.xhtml" action="#{mtdsfdsfest.ping}" />
--->
- <page view-id="/lists.xhtml" scheme="https" />
-
-
</pages>
15 years, 4 months
Seam SVN: r11286 - tags/JBoss_Seam_2_2_0_GA.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-07-13 16:58:26 -0400 (Mon, 13 Jul 2009)
New Revision: 11286
Modified:
tags/JBoss_Seam_2_2_0_GA/changelog.txt
Log:
update changelog
Modified: tags/JBoss_Seam_2_2_0_GA/changelog.txt
===================================================================
--- tags/JBoss_Seam_2_2_0_GA/changelog.txt 2009-07-13 20:57:01 UTC (rev 11285)
+++ tags/JBoss_Seam_2_2_0_GA/changelog.txt 2009-07-13 20:58:26 UTC (rev 11286)
@@ -19,6 +19,7 @@
* [JBSEAM-4276] - A JBDS generated WAR project with reverse-engineered entities doesn't work
* [JBSEAM-4278] - @Create methods on @Startup components are called without a transaction
* [JBSEAM-4289] - DBUnitSeamTest can't be executed in the same suite as SeamTest
+ * [JBSEAM-4299] - Seam RESTEasy integration does not allow root resources defined with @Path("/") .
** Feature Request
* [JBSEAM-3119] - Multiple WAR in EAR verification, example, and document
15 years, 4 months
Seam SVN: r11285 - in branches/community/Seam_2_2: build and 4 other directories.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-07-13 16:57:01 -0400 (Mon, 13 Jul 2009)
New Revision: 11285
Modified:
branches/community/Seam_2_2/build/root.pom.xml
branches/community/Seam_2_2/changelog.txt
branches/community/Seam_2_2/examples/blog/resources/WEB-INF/pages.xml
branches/community/Seam_2_2/examples/blog/view/menu.xhtml
branches/community/Seam_2_2/examples/build.xml
branches/community/Seam_2_2/examples/itext/resources/WEB-INF/components.xml
branches/community/Seam_2_2/examples/itext/resources/WEB-INF/pages.xml
Log:
update changelog
Modified: branches/community/Seam_2_2/build/root.pom.xml
===================================================================
--- branches/community/Seam_2_2/build/root.pom.xml 2009-07-13 20:49:44 UTC (rev 11284)
+++ branches/community/Seam_2_2/build/root.pom.xml 2009-07-13 20:57:01 UTC (rev 11285)
@@ -350,11 +350,11 @@
</exclusions>
</dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-atom-provider</artifactId>
- <version>1.1-RC2</version>
- </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-atom-provider</artifactId>
+ <version>1.1-RC2</version>
+ </dependency>
<dependency>
<groupId>org.hibernate</groupId>
@@ -852,7 +852,7 @@
<dependency>
<groupId>org.jboss.el</groupId>
<artifactId>jboss-el</artifactId>
- <version>1.0_02.CR4</version>
+ <version>1.0_02.CR5</version>
</dependency>
<dependency>
@@ -1236,14 +1236,14 @@
<artifactId>wicket-datetime</artifactId>
<version>${version.wicket}</version>
</dependency>
-
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.4.2</version>
- </dependency>
-
+
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.4.2</version>
Modified: branches/community/Seam_2_2/changelog.txt
===================================================================
--- branches/community/Seam_2_2/changelog.txt 2009-07-13 20:49:44 UTC (rev 11284)
+++ branches/community/Seam_2_2/changelog.txt 2009-07-13 20:57:01 UTC (rev 11285)
@@ -19,6 +19,7 @@
* [JBSEAM-4276] - A JBDS generated WAR project with reverse-engineered entities doesn't work
* [JBSEAM-4278] - @Create methods on @Startup components are called without a transaction
* [JBSEAM-4289] - DBUnitSeamTest can't be executed in the same suite as SeamTest
+ * [JBSEAM-4299] - Seam RESTEasy integration does not allow root resources defined with @Path("/") .
** Feature Request
* [JBSEAM-3119] - Multiple WAR in EAR verification, example, and document
Modified: branches/community/Seam_2_2/examples/blog/resources/WEB-INF/pages.xml
===================================================================
--- branches/community/Seam_2_2/examples/blog/resources/WEB-INF/pages.xml 2009-07-13 20:49:44 UTC (rev 11284)
+++ branches/community/Seam_2_2/examples/blog/resources/WEB-INF/pages.xml 2009-07-13 20:57:01 UTC (rev 11285)
@@ -11,7 +11,7 @@
<page view-id="/search.xhtml">
<rewrite pattern="/search/{searchPattern}"/>
- <rewrite pattern="/search"/>
+ <!-- <rewrite pattern="/search"/> -->
<param name="searchPattern"
value="#{searchService.searchPattern}"/>
Modified: branches/community/Seam_2_2/examples/blog/view/menu.xhtml
===================================================================
--- branches/community/Seam_2_2/examples/blog/view/menu.xhtml 2009-07-13 20:49:44 UTC (rev 11284)
+++ branches/community/Seam_2_2/examples/blog/view/menu.xhtml 2009-07-13 20:57:01 UTC (rev 11285)
@@ -5,7 +5,9 @@
xmlns:f="http://java.sun.com/jsf/core">
<span class="menuItem">
- <h:inputText id="field" value="#{searchService.searchPattern}"/>
+ <h:inputText id="field" value="#{searchService.searchPattern}">
+ <f:validateLength minimum="3" maximum="5"/>
+ </h:inputText>
<h:commandButton id="submit" value="Search" action="/search.xhtml"/>
<s:conversationPropagation type="none"/>
</span>
Modified: branches/community/Seam_2_2/examples/build.xml
===================================================================
--- branches/community/Seam_2_2/examples/build.xml 2009-07-13 20:49:44 UTC (rev 11284)
+++ branches/community/Seam_2_2/examples/build.xml 2009-07-13 20:57:01 UTC (rev 11285)
@@ -1158,17 +1158,22 @@
<fail if="incompatible.jdk">You are using an incompatible JDK 6. Please use Sun JDK 6 Update 4 (1.6.0_04) or newer or use Open JDK 6.</fail>
<taskdef resource="testngtasks" classpathref="test.classpath" />
<testng outputdir="${test-report.dir}">
- <jvmarg line="-Xmx800M" />
- <jvmarg line="-Djava.awt.headless=true" />
- <jvmarg line="-Demma.coverage.out.file=${coverage.ec}" />
- <jvmarg line="-Djava.endorsed.dirs=${endorsed.dir}" />
+ <jvmarg line="-Xmx800M" />
+ <jvmarg line="-Djava.awt.headless=true" />
+ <jvmarg line="-Demma.coverage.out.file=${coverage.ec}" />
+ <jvmarg line="-Djava.endorsed.dirs=${endorsed.dir}" />
+
+ <jvmarg line="-Xdebug" />
+ <jvmarg line="-Xnoagent" />
+ <jvmarg line="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000" />
+
<!--added for JDK6 compatibility with JBoss embedded-->
<jvmarg line="-Dsun.lang.ClassLoader.allowArraySyntax=true"/>
- <jvmarg line="${testng.jvmargs}" />
- <classpath>
- <path refid="test.classpath" />
- <path refid="runtime.emma.path" />
- </classpath>
+ <jvmarg line="${testng.jvmargs}" />
+ <classpath>
+ <path refid="test.classpath" />
+ <path refid="runtime.emma.path" />
+ </classpath>
<xmlfileset dir="${src.test.dir}" includes="**/testng.xml" />
</testng>
<echo>You can increase the logging by editing bootstrap/log4j.xml</echo>
Modified: branches/community/Seam_2_2/examples/itext/resources/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_2/examples/itext/resources/WEB-INF/components.xml 2009-07-13 20:49:44 UTC (rev 11284)
+++ branches/community/Seam_2_2/examples/itext/resources/WEB-INF/components.xml 2009-07-13 20:57:01 UTC (rev 11285)
@@ -1,6 +1,7 @@
<components xmlns="http://jboss.com/products/seam/components"
xmlns:pdf="http://jboss.com/products/seam/pdf"
xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:navigation="http://jboss.com/products/seam/navigation"
xmlns:framework="http://jboss.com/products/seam/framework"
xmlns:web="http://jboss.com/products/seam/web"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -15,6 +16,8 @@
<property name="errorPage">/pdfMissing.seam</property>
</component>
+ <navigation:pages https-port="8443" />
+
<pdf:key-store-config key-store="pdf.keystore"
key-store-password="storepass"
key-password="keypass"
Modified: branches/community/Seam_2_2/examples/itext/resources/WEB-INF/pages.xml
===================================================================
--- branches/community/Seam_2_2/examples/itext/resources/WEB-INF/pages.xml 2009-07-13 20:49:44 UTC (rev 11284)
+++ branches/community/Seam_2_2/examples/itext/resources/WEB-INF/pages.xml 2009-07-13 20:57:01 UTC (rev 11285)
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<pages xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd">
+<pages xmlns="http://jboss.com/products/seam/pages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd">
+<!--
+ <page view-id="/index.xhtml" action="#{mtest.pingxzckjczxljkc}" />
+ <page view-id="/foo.xhtml" action="#{mtdsfdsfest.ping}" />
+-->
+ <page view-id="/lists.xhtml" scheme="https" />
+
+
</pages>
15 years, 4 months
Seam SVN: r11284 - in tags/JBoss_Seam_2_2_0_GA: examples/tasks/src/main/org/jboss/seam/example/tasks/test and 3 other directories.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-07-13 16:49:44 -0400 (Mon, 13 Jul 2009)
New Revision: 11284
Added:
tags/JBoss_Seam_2_2_0_GA/src/main/org/jboss/seam/deployment/PagesDotXmlDeploymentHandler.java
Removed:
tags/JBoss_Seam_2_2_0_GA/src/main/org/jboss/seam/contexts/PagesDotXmlDeploymentHandler.java
Modified:
tags/JBoss_Seam_2_2_0_GA/build.xml
tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/CategoryResourceTest.java
tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/ResolvedTaskResourceQueryTest.java
tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/TaskResourceTest.java
tags/JBoss_Seam_2_2_0_GA/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java
Log:
merge to 11276 from branch
Modified: tags/JBoss_Seam_2_2_0_GA/build.xml
===================================================================
--- tags/JBoss_Seam_2_2_0_GA/build.xml 2009-07-13 18:16:28 UTC (rev 11283)
+++ tags/JBoss_Seam_2_2_0_GA/build.xml 2009-07-13 20:49:44 UTC (rev 11284)
@@ -528,6 +528,7 @@
<testexample name="jpa" />
<testexample name="quartz" />
<testexample name="guice" />
+ <testexample name="tasks" />
<ant dir="examples/wiki" target="test" inheritall="false">
<property name="test.output.dir" value="${test.dir}/wiki" />
</ant>
Modified: tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/CategoryResourceTest.java
===================================================================
--- tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/CategoryResourceTest.java 2009-07-13 18:16:28 UTC (rev 11283)
+++ tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/CategoryResourceTest.java 2009-07-13 20:49:44 UTC (rev 11284)
@@ -24,9 +24,12 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
-import org.jboss.seam.resteasy.testfwk.ResourceSeamTest;
-import org.jboss.seam.resteasy.testfwk.MockHttpServletResponse;
-import org.jboss.seam.resteasy.testfwk.MockHttpServletRequest;
+import org.jboss.seam.mock.SeamTest;
+import static org.jboss.seam.mock.ResourceRequestEnvironment.Method;
+import static org.jboss.seam.mock.ResourceRequestEnvironment.ResourceRequest;
+import org.jboss.seam.mock.EnhancedMockHttpServletRequest;
+import org.jboss.seam.mock.EnhancedMockHttpServletResponse;
+import org.jboss.seam.mock.ResourceRequestEnvironment;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@@ -35,7 +38,7 @@
* @author Jozef Hartinger
*
*/
-public class CategoryResourceTest extends ResourceSeamTest
+public class CategoryResourceTest extends SeamTest
{
@DataProvider(name = "query")
public String[][] getQueryData()
@@ -46,11 +49,11 @@
@Test(dataProvider = "query")
public void getCategoryListTest(final String contentType, final String expectedResponse) throws Exception
{
- new ResourceRequest(Method.GET, "/v1/auth/category")
+ new ResourceRequest(new ResourceRequestEnvironment(this), Method.GET, "/v1/auth/category")
{
@Override
- protected void prepareRequest(MockHttpServletRequest request)
+ protected void prepareRequest(EnhancedMockHttpServletRequest request)
{
super.prepareRequest(request);
request.addHeader("Accept", contentType);
@@ -58,7 +61,7 @@
}
@Override
- protected void onResponse(MockHttpServletResponse response)
+ protected void onResponse(EnhancedMockHttpServletResponse response)
{
super.onResponse(response);
assertEquals(response.getStatus(), 200, "Unexpected response code.");
@@ -71,11 +74,11 @@
@Test
public void deleteCategoryTest() throws Exception
{
- new ResourceRequest(Method.DELETE, "/v1/auth/category/Work")
+ new ResourceRequest(new ResourceRequestEnvironment(this), Method.DELETE, "/v1/auth/category/Work")
{
@Override
- protected void prepareRequest(MockHttpServletRequest request)
+ protected void prepareRequest(EnhancedMockHttpServletRequest request)
{
super.prepareRequest(request);
request.addHeader("Accept", "application/xml");
@@ -83,7 +86,7 @@
}
@Override
- protected void onResponse(MockHttpServletResponse response)
+ protected void onResponse(EnhancedMockHttpServletResponse response)
{
super.onResponse(response);
assertEquals(response.getStatus(), 204, "Unexpected response code.");
@@ -100,18 +103,18 @@
final String mimeType = "application/json";
final String expectedResponse = "{\"category\":{\"name\":\"Test Category\"}}";
- new ResourceRequest(Method.PUT, uri)
+ new ResourceRequest(new ResourceRequestEnvironment(this), Method.PUT, uri)
{
@Override
- protected void prepareRequest(MockHttpServletRequest request)
+ protected void prepareRequest(EnhancedMockHttpServletRequest request)
{
super.prepareRequest(request);
request.addHeader("Authorization", "Basic ZGVtbzpkZW1v"); // demo:demo
}
@Override
- protected void onResponse(MockHttpServletResponse response)
+ protected void onResponse(EnhancedMockHttpServletResponse response)
{
super.onResponse(response);
assertEquals(response.getStatus(), 201, "Unexpected response code.");
@@ -119,11 +122,11 @@
}.run();
- new ResourceRequest(Method.GET, uri)
+ new ResourceRequest(new ResourceRequestEnvironment(this), Method.GET, uri)
{
@Override
- protected void prepareRequest(MockHttpServletRequest request)
+ protected void prepareRequest(EnhancedMockHttpServletRequest request)
{
super.prepareRequest(request);
request.addHeader("Accept", mimeType);
@@ -131,7 +134,7 @@
}
@Override
- protected void onResponse(MockHttpServletResponse response)
+ protected void onResponse(EnhancedMockHttpServletResponse response)
{
super.onResponse(response);
assertEquals(response.getStatus(), 200, "Unexpected response code.");
@@ -144,18 +147,18 @@
@Test
public void noAuthorizationHeaderTest() throws Exception
{
- new ResourceRequest(Method.GET, "/v1/auth/category")
+ new ResourceRequest(new ResourceRequestEnvironment(this), Method.GET, "/v1/auth/category")
{
@Override
- protected void prepareRequest(MockHttpServletRequest request)
+ protected void prepareRequest(EnhancedMockHttpServletRequest request)
{
super.prepareRequest(request);
request.addHeader("Accept", "application/xml");
}
@Override
- protected void onResponse(MockHttpServletResponse response)
+ protected void onResponse(EnhancedMockHttpServletResponse response)
{
super.onResponse(response);
assertEquals(response.getStatus(), 401, "Unexpected response code.");
Modified: tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/ResolvedTaskResourceQueryTest.java
===================================================================
--- tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/ResolvedTaskResourceQueryTest.java 2009-07-13 18:16:28 UTC (rev 11283)
+++ tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/ResolvedTaskResourceQueryTest.java 2009-07-13 20:49:44 UTC (rev 11284)
@@ -24,9 +24,12 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
-import org.jboss.seam.resteasy.testfwk.ResourceSeamTest;
-import org.jboss.seam.resteasy.testfwk.MockHttpServletResponse;
-import org.jboss.seam.resteasy.testfwk.MockHttpServletRequest;
+import org.jboss.seam.mock.SeamTest;
+import static org.jboss.seam.mock.ResourceRequestEnvironment.Method;
+import static org.jboss.seam.mock.ResourceRequestEnvironment.ResourceRequest;
+import org.jboss.seam.mock.EnhancedMockHttpServletRequest;
+import org.jboss.seam.mock.EnhancedMockHttpServletResponse;
+import org.jboss.seam.mock.ResourceRequestEnvironment;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@@ -36,7 +39,7 @@
* @author Jozef Hartinger
*
*/
-public class ResolvedTaskResourceQueryTest extends ResourceSeamTest
+public class ResolvedTaskResourceQueryTest extends SeamTest
{
// We could do this BeforeClass only once but we can't do ResourceRequests there
@@ -46,11 +49,11 @@
final String mimeType = "application/xml";
final String representation = "<task><id>14</id></task>";
- new ResourceRequest(Method.PUT, "/v1/auth/category/School/resolved/14")
+ new ResourceRequest(new ResourceRequestEnvironment(this), Method.PUT, "/v1/auth/category/School/resolved/14")
{
@Override
- protected void prepareRequest(MockHttpServletRequest request)
+ protected void prepareRequest(EnhancedMockHttpServletRequest request)
{
super.prepareRequest(request);
request.addHeader("Authorization", "Basic ZGVtbzpkZW1v"); // demo:demo
@@ -60,7 +63,7 @@
}
@Override
- protected void onResponse(MockHttpServletResponse response)
+ protected void onResponse(EnhancedMockHttpServletResponse response)
{
super.onResponse(response);
assertEquals(response.getStatus(), 204, "Unexpected response code.");
@@ -81,18 +84,18 @@
@Test(dataProvider="data")
public void editTaskTest(final String mimeType, final String expectedResponsePart) throws Exception
{
- new ResourceRequest(Method.GET, "/v1/user/demo/tasks/resolved")
+ new ResourceRequest(new ResourceRequestEnvironment(this), Method.GET, "/v1/user/demo/tasks/resolved")
{
@Override
- protected void prepareRequest(MockHttpServletRequest request)
+ protected void prepareRequest(EnhancedMockHttpServletRequest request)
{
super.prepareRequest(request);
request.addHeader("Accept", mimeType);
}
@Override
- protected void onResponse(MockHttpServletResponse response)
+ protected void onResponse(EnhancedMockHttpServletResponse response)
{
super.onResponse(response);
assertEquals(response.getStatus(), 200, "Unexpected response code.");
Modified: tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/TaskResourceTest.java
===================================================================
--- tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/TaskResourceTest.java 2009-07-13 18:16:28 UTC (rev 11283)
+++ tags/JBoss_Seam_2_2_0_GA/examples/tasks/src/main/org/jboss/seam/example/tasks/test/TaskResourceTest.java 2009-07-13 20:49:44 UTC (rev 11284)
@@ -24,9 +24,12 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
-import org.jboss.seam.resteasy.testfwk.ResourceSeamTest;
-import org.jboss.seam.resteasy.testfwk.MockHttpServletResponse;
-import org.jboss.seam.resteasy.testfwk.MockHttpServletRequest;
+import org.jboss.seam.mock.SeamTest;
+import static org.jboss.seam.mock.ResourceRequestEnvironment.Method;
+import static org.jboss.seam.mock.ResourceRequestEnvironment.ResourceRequest;
+import org.jboss.seam.mock.EnhancedMockHttpServletRequest;
+import org.jboss.seam.mock.EnhancedMockHttpServletResponse;
+import org.jboss.seam.mock.ResourceRequestEnvironment;
import org.testng.annotations.Test;
/**
@@ -34,7 +37,7 @@
* @author Jozef Hartinger
*
*/
-public class TaskResourceTest extends ResourceSeamTest
+public class TaskResourceTest extends SeamTest
{
@Test
public void createTaskTest() throws Exception
@@ -42,11 +45,11 @@
final String mimeType = "application/json";
final String representation = "{\"task\":{\"name\":\"Test task\"}}";
- new ResourceRequest(Method.POST, "/v1/auth/category/School/unresolved")
+ new ResourceRequest(new ResourceRequestEnvironment(this), Method.POST, "/v1/auth/category/School/unresolved")
{
@Override
- protected void prepareRequest(MockHttpServletRequest request)
+ protected void prepareRequest(EnhancedMockHttpServletRequest request)
{
super.prepareRequest(request);
request.addHeader("Authorization", "Basic ZGVtbzpkZW1v"); // demo:demo
@@ -56,7 +59,7 @@
}
@Override
- protected void onResponse(MockHttpServletResponse response)
+ protected void onResponse(EnhancedMockHttpServletResponse response)
{
super.onResponse(response);
assertEquals(response.getStatus(), 201, "Unexpected response code.");
@@ -71,11 +74,11 @@
final String mimeType = "application/xml";
final String representation = "<task><id>4</id><name>Learn new English vocabulary</name></task>";
- new ResourceRequest(Method.PUT, "/v1/auth/category/School/unresolved/4")
+ new ResourceRequest(new ResourceRequestEnvironment(this), Method.PUT, "/v1/auth/category/School/unresolved/4")
{
@Override
- protected void prepareRequest(MockHttpServletRequest request)
+ protected void prepareRequest(EnhancedMockHttpServletRequest request)
{
super.prepareRequest(request);
request.addHeader("Authorization", "Basic ZGVtbzpkZW1v"); // demo:demo
@@ -85,7 +88,7 @@
}
@Override
- protected void onResponse(MockHttpServletResponse response)
+ protected void onResponse(EnhancedMockHttpServletResponse response)
{
super.onResponse(response);
assertEquals(response.getStatus(), 204, "Unexpected response code.");
@@ -93,11 +96,11 @@
}.run();
- new ResourceRequest(Method.GET, "/v1/auth/category/School/unresolved/4")
+ new ResourceRequest(new ResourceRequestEnvironment(this), Method.GET, "/v1/auth/category/School/unresolved/4")
{
@Override
- protected void prepareRequest(MockHttpServletRequest request)
+ protected void prepareRequest(EnhancedMockHttpServletRequest request)
{
super.prepareRequest(request);
request.addHeader("Accept", "application/xml");
@@ -105,7 +108,7 @@
}
@Override
- protected void onResponse(MockHttpServletResponse response)
+ protected void onResponse(EnhancedMockHttpServletResponse response)
{
super.onResponse(response);
assertEquals(response.getStatus(), 200, "Unexpected response code.");
@@ -118,18 +121,18 @@
@Test
public void deleteTaskTest() throws Exception
{
- new ResourceRequest(Method.DELETE, "/v1/auth/category/School/unresolved/2")
+ new ResourceRequest(new ResourceRequestEnvironment(this), Method.DELETE, "/v1/auth/category/School/unresolved/2")
{
@Override
- protected void prepareRequest(MockHttpServletRequest request)
+ protected void prepareRequest(EnhancedMockHttpServletRequest request)
{
super.prepareRequest(request);
request.addHeader("Authorization", "Basic ZGVtbzpkZW1v"); // demo:demo
}
@Override
- protected void onResponse(MockHttpServletResponse response)
+ protected void onResponse(EnhancedMockHttpServletResponse response)
{
super.onResponse(response);
assertEquals(response.getStatus(), 204, "Unexpected response code.");
Deleted: tags/JBoss_Seam_2_2_0_GA/src/main/org/jboss/seam/contexts/PagesDotXmlDeploymentHandler.java
===================================================================
--- tags/JBoss_Seam_2_2_0_GA/src/main/org/jboss/seam/contexts/PagesDotXmlDeploymentHandler.java 2009-07-13 18:16:28 UTC (rev 11283)
+++ tags/JBoss_Seam_2_2_0_GA/src/main/org/jboss/seam/contexts/PagesDotXmlDeploymentHandler.java 2009-07-13 20:49:44 UTC (rev 11284)
@@ -1,61 +0,0 @@
-package org.jboss.seam.deployment;
-
-import org.jboss.seam.contexts.Contexts;
-
-/**
- * The {@link PagesDotXmlDeploymentHandler} process pages.xml files
- * Its only purpose is to make sure pages.xml gets updated by hot deploy
- *
- * @author Stuart Douglas
- *
- */
-public class PagesDotXmlDeploymentHandler extends AbstractDeploymentHandler
-{
-
- private static DeploymentMetadata PAGESDOTXML_SUFFIX_FILE_METADATA = new DeploymentMetadata()
- {
-
- public String getFileNameSuffix()
- {
- return "WEB-INF/pages.xml";
- }
-
- };
-
- /**
- * Name under which this {@link DeploymentHandler} is registered
- */
- public static final String NAME = "org.jboss.seam.deployment.PagesDotXmlDeploymentHandler";
-
- public String getName()
- {
- return NAME;
- }
-
- public static PagesDotXmlDeploymentHandler instance()
- {
- if (Contexts.isEventContextActive())
- {
- if (Contexts.getEventContext().isSet(WarRootDeploymentStrategy.NAME))
- {
- DeploymentStrategy deploymentStrategy = (DeploymentStrategy) Contexts.getEventContext().get(WarRootDeploymentStrategy.NAME);
- Object deploymentHandler = deploymentStrategy.getDeploymentHandlers().get(NAME);
- if (deploymentHandler != null)
- {
- return (PagesDotXmlDeploymentHandler) deploymentHandler;
- }
- }
- return null;
- }
- else
- {
- throw new IllegalStateException("Event context not active");
- }
- }
-
- public DeploymentMetadata getMetadata()
- {
- return PAGESDOTXML_SUFFIX_FILE_METADATA;
- }
-
-}
Copied: tags/JBoss_Seam_2_2_0_GA/src/main/org/jboss/seam/deployment/PagesDotXmlDeploymentHandler.java (from rev 11283, branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/PagesDotXmlDeploymentHandler.java)
===================================================================
--- tags/JBoss_Seam_2_2_0_GA/src/main/org/jboss/seam/deployment/PagesDotXmlDeploymentHandler.java (rev 0)
+++ tags/JBoss_Seam_2_2_0_GA/src/main/org/jboss/seam/deployment/PagesDotXmlDeploymentHandler.java 2009-07-13 20:49:44 UTC (rev 11284)
@@ -0,0 +1,61 @@
+package org.jboss.seam.deployment;
+
+import org.jboss.seam.contexts.Contexts;
+
+/**
+ * The {@link PagesDotXmlDeploymentHandler} process pages.xml files
+ * Its only purpose is to make sure pages.xml gets updated by hot deploy
+ *
+ * @author Stuart Douglas
+ *
+ */
+public class PagesDotXmlDeploymentHandler extends AbstractDeploymentHandler
+{
+
+ private static DeploymentMetadata PAGESDOTXML_SUFFIX_FILE_METADATA = new DeploymentMetadata()
+ {
+
+ public String getFileNameSuffix()
+ {
+ return "WEB-INF/pages.xml";
+ }
+
+ };
+
+ /**
+ * Name under which this {@link DeploymentHandler} is registered
+ */
+ public static final String NAME = "org.jboss.seam.deployment.PagesDotXmlDeploymentHandler";
+
+ public String getName()
+ {
+ return NAME;
+ }
+
+ public static PagesDotXmlDeploymentHandler instance()
+ {
+ if (Contexts.isEventContextActive())
+ {
+ if (Contexts.getEventContext().isSet(WarRootDeploymentStrategy.NAME))
+ {
+ DeploymentStrategy deploymentStrategy = (DeploymentStrategy) Contexts.getEventContext().get(WarRootDeploymentStrategy.NAME);
+ Object deploymentHandler = deploymentStrategy.getDeploymentHandlers().get(NAME);
+ if (deploymentHandler != null)
+ {
+ return (PagesDotXmlDeploymentHandler) deploymentHandler;
+ }
+ }
+ return null;
+ }
+ else
+ {
+ throw new IllegalStateException("Event context not active");
+ }
+ }
+
+ public DeploymentMetadata getMetadata()
+ {
+ return PAGESDOTXML_SUFFIX_FILE_METADATA;
+ }
+
+}
Modified: tags/JBoss_Seam_2_2_0_GA/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java
===================================================================
--- tags/JBoss_Seam_2_2_0_GA/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java 2009-07-13 18:16:28 UTC (rev 11283)
+++ tags/JBoss_Seam_2_2_0_GA/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java 2009-07-13 20:49:44 UTC (rev 11284)
@@ -299,6 +299,10 @@
{
Set<Class> handledResources = new HashSet(); // Stuff we don't want to examine twice
+ // These classes themselves should not be registered at all
+ // Configured ResourceHome and ResourceQuery components will be registered later
+ handledResources.add(ResourceHome.class);
+ handledResources.add(ResourceQuery.class);
for (Component seamComponent : seamComponents)
{
@@ -310,8 +314,6 @@
seamComponent.getBeanClass().equals(ResourceQuery.class))
{
registerHomeQueryResources(seamComponent);
- handledResources.add(ResourceHome.class);
- handledResources.add(ResourceQuery.class);
continue;
}
15 years, 4 months
Seam SVN: r11283 - in branches/enterprise/JBPAPP_5_0/src/test/ftest: seamgen and 2 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-13 14:16:28 -0400 (Mon, 13 Jul 2009)
New Revision: 11283
Added:
branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces-deployed.xml
branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces-exploded.xml
Removed:
branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces.xml
Modified:
branches/enterprise/JBPAPP_5_0/src/test/ftest/ftest.properties
branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/build.xml
branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/SeamGenTest.java
branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/utils/SeamGenAdapter.java
Log:
back ported seam-gen ftest changes
Modified: branches/enterprise/JBPAPP_5_0/src/test/ftest/ftest.properties
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/ftest.properties 2009-07-13 16:40:44 UTC (rev 11282)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/ftest.properties 2009-07-13 18:16:28 UTC (rev 11283)
@@ -67,6 +67,10 @@
# seam-gen specific properties
#seamgen.delete.project=true
+# If set to true, the container is launched automatically prior to testsuite execution and shut down after it finishes
+# The container has to be run manually otherwise
+seamgen.control.container=false
+
# workspace for new projects
workspace.home=
Modified: branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/build.xml 2009-07-13 16:40:44 UTC (rev 11282)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/build.xml 2009-07-13 18:16:28 UTC (rev 11283)
@@ -46,8 +46,8 @@
<path refid="classpath.build" />
<path location="${classes.dir}" />
<fileset dir="${seam.dir}/lib/gen" includes="*.jar" />
- <fileset file="${java.home}/../lib/tools.jar"/>
- <fileset file="${driver.jar}"/>
+ <fileset file="${java.home}/../lib/tools.jar" />
+ <fileset file="${driver.jar}" />
<!-- TODO why do we need this? -->
<fileset dir="${seam.dir}/lib" includes="*.jar" />
</path>
@@ -79,9 +79,28 @@
</copy>
</target>
- <target name="seam-gen.richfaces.testsuite" depends="build" description="Run Richfaces testsuite">
- <run.selenium.test suite="richfaces" />
+ <target name="seam-gen.richfaces.testsuite" description="Run Richfaces testsuite">
+ <antcall target="seam-gen.richfaces.testsuite.exploded" />
+ <antcall target="seam-gen.richfaces.testsuite.deployed" />
</target>
+
+ <target name="seam-gen.richfaces.testsuite.exploded" depends="build">
+ <run.selenium.test suite="richfaces-exploded" />
+ </target>
+
+ <target name="seam-gen.richfaces.testsuite.deployed" depends="build">
+ <run.selenium.test suite="richfaces-deployed" />
+ </target>
+ <target name="seam-gen.icefaces.testsuite" description="Run Icefaces testsuite">
+ <antcall target="seam-gen.icefaces.testsuite.exploded" />
+ <antcall target="seam-gen.icefaces.testsuite.deployed" />
+ </target>
+ <target name="seam-gen.icefaces.testsuite.exploded" depends="build">
+ <run.selenium.test suite="icefaces-exploded" />
+ </target>
+ <target name="seam-gen.icefaces.testsuite.deployed" depends="build">
+ <run.selenium.test suite="icefaces-deploy" />
+ </target>
<target name="seam-gen.smoke.testsuite" depends="build" description="Run smoke testsuite">
<run.selenium.test suite="smoke" />
Added: branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces-deployed.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces-deployed.xml (rev 0)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces-deployed.xml 2009-07-13 18:16:28 UTC (rev 11283)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="seam-gen RichFaces suite" parallel="false" verbose="2">
+ <listeners>
+ <listener
+ class-name="org.jboss.seam.test.functional.seamgen.utils.SeleniumTestListener" />
+ </listeners>
+ <parameter name="suffix" value="001" />
+ <parameter name="explode" value="false" />
+ <test name="RichFaces Ear Test">
+ <parameter name="type" value="ear" />
+ <classes>
+ <class name="org.jboss.seam.test.functional.seamgen.NewProjectTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.NewActionTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.NewFormTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.PersonTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.VehicleTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.UserTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.RoleTest" />
+ </classes>
+ </test>
+ <test name="RichFaces War Test">
+ <parameter name="type" value="war" />
+ <classes>
+ <class name="org.jboss.seam.test.functional.seamgen.NewProjectTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.NewActionTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.NewFormTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.PersonTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.VehicleTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.UserTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.RoleTest" />
+ </classes>
+ </test>
+</suite>
Added: branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces-exploded.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces-exploded.xml (rev 0)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces-exploded.xml 2009-07-13 18:16:28 UTC (rev 11283)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="seam-gen RichFaces suite" parallel="false" verbose="2">
+ <listeners>
+ <listener
+ class-name="org.jboss.seam.test.functional.seamgen.utils.SeleniumTestListener" />
+ </listeners>
+ <parameter name="suffix" value="001" />
+ <test name="RichFaces exploded Ear Test">
+ <parameter name="type" value="ear" />
+ <classes>
+ <class name="org.jboss.seam.test.functional.seamgen.NewProjectTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.NewActionTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.NewFormTest" />
+ <class
+ name="org.jboss.seam.test.functional.seamgen.HotDeploymentStaticTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.PersonTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.VehicleTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.UserTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.RoleTest" />
+ </classes>
+ </test>
+ <test name="RichFaces exploded War Test">
+ <parameter name="type" value="war" />
+ <classes>
+ <class name="org.jboss.seam.test.functional.seamgen.NewProjectTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.NewActionTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.NewFormTest" />
+ <class
+ name="org.jboss.seam.test.functional.seamgen.HotDeploymentNewFormTest" />
+ <class
+ name="org.jboss.seam.test.functional.seamgen.HotDeploymentStaticTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.PersonTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.VehicleTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.UserTest" />
+ <class name="org.jboss.seam.test.functional.seamgen.RoleTest" />
+ </classes>
+ </test>
+</suite>
Deleted: branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces.xml 2009-07-13 16:40:44 UTC (rev 11282)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/richfaces.xml 2009-07-13 18:16:28 UTC (rev 11283)
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
-<suite name="seam-gen RichFaces suite" parallel="false" verbose="3">
- <listeners>
- <listener
- class-name="org.jboss.seam.test.functional.seamgen.utils.SeleniumTestListener" />
- </listeners>
- <parameter name="suffix" value="001" />
- <test name="RichFaces exploded Ear Test">
- <parameter name="type" value="ear" />
- <classes>
- <class name="org.jboss.seam.test.functional.seamgen.NewProjectTest" />
- <class name="org.jboss.seam.test.functional.seamgen.NewActionTest" />
- <class name="org.jboss.seam.test.functional.seamgen.NewFormTest" />
- <class
- name="org.jboss.seam.test.functional.seamgen.HotDeploymentStaticTest" />
- <class name="org.jboss.seam.test.functional.seamgen.PersonTest" />
- <class name="org.jboss.seam.test.functional.seamgen.VehicleTest" />
- <class name="org.jboss.seam.test.functional.seamgen.UserTest" />
- <class name="org.jboss.seam.test.functional.seamgen.RoleTest" />
- </classes>
- </test>
- <test name="RichFaces exploded War Test">
- <parameter name="type" value="war" />
- <classes>
- <class name="org.jboss.seam.test.functional.seamgen.NewProjectTest" />
- <class name="org.jboss.seam.test.functional.seamgen.NewActionTest" />
- <class name="org.jboss.seam.test.functional.seamgen.NewFormTest" />
- <class
- name="org.jboss.seam.test.functional.seamgen.HotDeploymentNewFormTest" />
- <class
- name="org.jboss.seam.test.functional.seamgen.HotDeploymentStaticTest" />
- <class name="org.jboss.seam.test.functional.seamgen.PersonTest" />
- <class name="org.jboss.seam.test.functional.seamgen.VehicleTest" />
- <class name="org.jboss.seam.test.functional.seamgen.UserTest" />
- <class name="org.jboss.seam.test.functional.seamgen.RoleTest" />
- </classes>
- </test>
- <test name="RichFaces Ear Test">
- <parameter name="type" value="ear" />
- <parameter name="explode" value="false" />
- <classes>
- <class name="org.jboss.seam.test.functional.seamgen.NewProjectTest" />
- <class name="org.jboss.seam.test.functional.seamgen.NewActionTest" />
- <class name="org.jboss.seam.test.functional.seamgen.NewFormTest" />
- <class name="org.jboss.seam.test.functional.seamgen.PersonTest" />
- <class name="org.jboss.seam.test.functional.seamgen.VehicleTest" />
- <class name="org.jboss.seam.test.functional.seamgen.UserTest" />
- <class name="org.jboss.seam.test.functional.seamgen.RoleTest" />
- </classes>
- </test>
- <test name="RichFaces War Test">
- <parameter name="type" value="war" />
- <parameter name="explode" value="false" />
- <classes>
- <class name="org.jboss.seam.test.functional.seamgen.NewProjectTest" />
- <class name="org.jboss.seam.test.functional.seamgen.NewActionTest" />
- <class name="org.jboss.seam.test.functional.seamgen.NewFormTest" />
- <class name="org.jboss.seam.test.functional.seamgen.PersonTest" />
- <class name="org.jboss.seam.test.functional.seamgen.VehicleTest" />
- <class name="org.jboss.seam.test.functional.seamgen.UserTest" />
- <class name="org.jboss.seam.test.functional.seamgen.RoleTest" />
- </classes>
- </test>
-</suite>
Modified: branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/SeamGenTest.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/SeamGenTest.java 2009-07-13 16:40:44 UTC (rev 11282)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/SeamGenTest.java 2009-07-13 18:16:28 UTC (rev 11283)
@@ -77,6 +77,8 @@
protected static boolean DELETE_PROJECT;
+ protected static boolean CONTROL_CONTAINER;
+
protected static String TEST_SEAMGEN_PROPERTIES_FILE;
// Selenium related constants
@@ -123,7 +125,9 @@
loadFtestProperties();
createOutputDir();
startSeleniumServer();
- container = startContainer(CONTAINER, CONTAINER_LOCATION);
+ if (CONTROL_CONTAINER) {
+ container = startContainer(CONTAINER, CONTAINER_LOCATION);
+ }
}
@AfterSuite
@@ -177,7 +181,8 @@
CONTAINER_LOCATION = ftestProperties.getProperty(CONTAINER + ".home");
DEPLOY_TIMEOUT = Integer.parseInt(ftestProperties.getProperty(CONTAINER + ".deploy.waittime")) * 1000; // miliseconds
DELETE_PROJECT = Boolean.valueOf(ftestProperties.getProperty("seamgen.delete.project", "false"));
-
+ CONTROL_CONTAINER = Boolean.valueOf(ftestProperties.getProperty("seamgen.control.container", "false"));
+
// load selenium constants
SELENIUM_HOST = ftestProperties.getProperty("selenium.host");
SELENIUM_BROWSER = ftestProperties.getProperty("selenium.browser");
Modified: branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/utils/SeamGenAdapter.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/utils/SeamGenAdapter.java 2009-07-13 16:40:44 UTC (rev 11282)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/utils/SeamGenAdapter.java 2009-07-13 18:16:28 UTC (rev 11283)
@@ -96,7 +96,7 @@
public void generateEntities()
{
- getAntCall().executeTarget("generate-entities");
+ getAntCall().executeTarget("generate");
}
/**
15 years, 4 months
Seam SVN: r11282 - branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-13 12:40:44 -0400 (Mon, 13 Jul 2009)
New Revision: 11282
Modified:
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Excel.xml
Log:
back ported r11235 and r11237 from Seam_2_2
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Excel.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Excel.xml 2009-07-13 16:30:39 UTC (rev 11281)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Excel.xml 2009-07-13 16:40:44 UTC (rev 11282)
@@ -2494,6 +2494,11 @@
e.g. placing a column width setting in a cell nested within that column makes
little sense.
</para>
+ <para>
+ If you have format masks or fonts that use special characters, such as spaces
+ and semicolons, you can escape the css string with '' characters like xls-format-mask:'$;$'
+ </para>
+
<section id="excel.fontsandlayout.link">
<title>Stylesheet links</title>
<para>
15 years, 4 months
Seam SVN: r11281 - in branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel: exporter and 1 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-13 12:30:39 -0400 (Mon, 13 Jul 2009)
New Revision: 11281
Added:
branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/CSSParser.java
branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/StyleStringParser.java
Removed:
branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/Parser.java
Modified:
branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java
branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/jxl/JXLHelper.java
Log:
back ported r11235 and r11237 from Seam_2_2
Copied: branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/CSSParser.java (from rev 11257, branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/Parser.java)
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/CSSParser.java (rev 0)
+++ branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/CSSParser.java 2009-07-13 16:30:39 UTC (rev 11281)
@@ -0,0 +1,368 @@
+package org.jboss.seam.excel.css;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+
+import org.apache.commons.beanutils.PropertyUtils;
+import org.jboss.seam.core.Interpolator;
+import org.jboss.seam.excel.ExcelWorkbookException;
+import org.jboss.seam.excel.ui.UILink;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.log.Logging;
+
+/**
+ * CSS parser for the XLS-CSS
+ *
+ * @author Nicklas Karlsson (nickarls(a)gmail.com)
+ */
+public class CSSParser
+{
+ // Where to look for the style
+ private static final String STYLE_ATTRIBUTE = "style";
+
+ // Where to look for the style class
+ private static final String STYLE_CLASS_ATTRIBUTE = "styleClass";
+
+ // What separates multiple style class references
+ private static final String STYLE_SHORTHAND_SEPARATOR = " ";
+
+ // What starts a rule block in a CSS file
+ private static final String LEFT_BRACE = "{";
+
+ // What ends a rule block in a CSS file
+ private static final String RIGHT_BRACE = "}";
+
+ // The style classes that have been read in from e:link referenced, mapped on
+ // style class name
+ private Map<String, StyleMap> definedStyleClasses = new HashMap<String, StyleMap>();
+
+ // The registered property builders, mapped on attribute name
+ private Map<String, PropertyBuilder> propertyBuilders = new HashMap<String, PropertyBuilder>();
+
+ // A cache of previously parsed css, mapped on component
+ private Map<UIComponent, StyleMap> cellStyleCache = new HashMap<UIComponent, StyleMap>();
+
+ private Log log = Logging.getLog(CSSParser.class);
+
+ /**
+ * Constructor, initializes the property builders
+ */
+ public CSSParser()
+ {
+ initPropertyBuilders();
+ }
+
+ /**
+ * Constructor with stylesheets
+ *
+ * @param stylesheets The list of referenced stylesheets in UILink elements
+ * @throws MalformedURLException If the URL was bad
+ * @throws IOException If the URL could not be read
+ */
+ public CSSParser(List<UILink> stylesheets) throws MalformedURLException, IOException
+ {
+ initPropertyBuilders();
+ loadStylesheets(stylesheets);
+ }
+
+ /**
+ * Loads stylesheets (merging by class name)
+ *
+ * @param stylesheets The stylesheets to read/merge
+ * @throws MalformedURLException If the URL was bad
+ * @throws IOException If the URL could not be read
+ */
+ private void loadStylesheets(List<UILink> stylesheets) throws MalformedURLException, IOException
+ {
+ for (UILink stylesheet : stylesheets)
+ {
+ definedStyleClasses.putAll(parseStylesheet(stylesheet.getURL()));
+ }
+ }
+
+ /**
+ * Registers the property builders
+ */
+ private void initPropertyBuilders()
+ {
+ propertyBuilders.put(CSSNames.FONT_FAMILY, new PropertyBuilders.FontFamily());
+ propertyBuilders.put(CSSNames.FONT_SIZE, new PropertyBuilders.FontSize());
+ propertyBuilders.put(CSSNames.FONT_COLOR, new PropertyBuilders.FontColor());
+ propertyBuilders.put(CSSNames.FONT_ITALIC, new PropertyBuilders.FontItalic());
+ propertyBuilders.put(CSSNames.FONT_SCRIPT_STYLE, new PropertyBuilders.FontScriptStyle());
+ propertyBuilders.put(CSSNames.FONT_STRUCK_OUT, new PropertyBuilders.FontStruckOut());
+ propertyBuilders.put(CSSNames.FONT_UNDERLINE_STYLE, new PropertyBuilders.FontUnderlineStyle());
+ propertyBuilders.put(CSSNames.FONT_BOLD, new PropertyBuilders.FontBold());
+ propertyBuilders.put(CSSNames.FONT, new PropertyBuilders.FontShorthand());
+ propertyBuilders.put(CSSNames.BACKGROUND_PATTERN, new PropertyBuilders.BackgroundPattern());
+ propertyBuilders.put(CSSNames.BACKGROUND_COLOR, new PropertyBuilders.BackgroundColor());
+ propertyBuilders.put(CSSNames.BACKGROUND, new PropertyBuilders.BackgroundShorthand());
+ propertyBuilders.put(CSSNames.BORDER_LEFT_COLOR, new PropertyBuilders.BorderLeftColor());
+ propertyBuilders.put(CSSNames.BORDER_LEFT_LINE_STYLE, new PropertyBuilders.BorderLeftLineStyle());
+ propertyBuilders.put(CSSNames.BORDER_LEFT, new PropertyBuilders.BorderLeftShorthand());
+ propertyBuilders.put(CSSNames.BORDER_TOP_COLOR, new PropertyBuilders.BorderTopColor());
+ propertyBuilders.put(CSSNames.BORDER_TOP_LINE_STYLE, new PropertyBuilders.BorderTopLineStyle());
+ propertyBuilders.put(CSSNames.BORDER_TOP, new PropertyBuilders.BorderTopShorthand());
+ propertyBuilders.put(CSSNames.BORDER_RIGHT_COLOR, new PropertyBuilders.BorderRightColor());
+ propertyBuilders.put(CSSNames.BORDER_RIGHT_LINE_STYLE, new PropertyBuilders.BorderRightLineStyle());
+ propertyBuilders.put(CSSNames.BORDER_RIGHT, new PropertyBuilders.BorderRightShorthand());
+ propertyBuilders.put(CSSNames.BORDER_BOTTOM_COLOR, new PropertyBuilders.BorderBottomColor());
+ propertyBuilders.put(CSSNames.BORDER_BOTTOM_LINE_STYLE, new PropertyBuilders.BorderBottomLineStyle());
+ propertyBuilders.put(CSSNames.BORDER_BOTTOM, new PropertyBuilders.BorderBottomShorthand());
+ propertyBuilders.put(CSSNames.BORDER, new PropertyBuilders.BorderShorthand());
+ propertyBuilders.put(CSSNames.FORMAT_MASK, new PropertyBuilders.FormatMask());
+ propertyBuilders.put(CSSNames.ALIGNMENT, new PropertyBuilders.Alignment());
+ propertyBuilders.put(CSSNames.INDENTATION, new PropertyBuilders.Indentation());
+ propertyBuilders.put(CSSNames.ORIENTATION, new PropertyBuilders.Orientation());
+ propertyBuilders.put(CSSNames.LOCKED, new PropertyBuilders.Locked());
+ propertyBuilders.put(CSSNames.SHRINK_TO_FIT, new PropertyBuilders.ShrinkToFit());
+ propertyBuilders.put(CSSNames.WRAP, new PropertyBuilders.Wrap());
+ propertyBuilders.put(CSSNames.VERICAL_ALIGNMENT, new PropertyBuilders.VericalAlignment());
+ propertyBuilders.put(CSSNames.COLUMN_WIDTH, new PropertyBuilders.ColumnWidth());
+ propertyBuilders.put(CSSNames.COLUMN_AUTO_SIZE, new PropertyBuilders.ColumnAutoSize());
+ propertyBuilders.put(CSSNames.COLUMN_HIDDEN, new PropertyBuilders.ColumnHidden());
+ propertyBuilders.put(CSSNames.COLUMN_EXPORT, new PropertyBuilders.ColumnExport());
+ propertyBuilders.put(CSSNames.COLUMN_WIDTHS, new PropertyBuilders.ColumnWidths());
+ propertyBuilders.put(CSSNames.FORCE_TYPE, new PropertyBuilders.ForceType());
+ }
+
+ /**
+ * Reads data from an URL to a String
+ *
+ * @param url The URL to read
+ * @return The read data as a String
+ * @throws IOException If the stream could not be read
+ */
+ private static String readCSS(InputStream in) throws IOException
+ {
+ BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+ StringBuffer buffer = new StringBuffer();
+ String line;
+ while ((line = reader.readLine()) != null)
+ {
+ buffer.append(line);
+ }
+ reader.close();
+ return buffer.toString();
+ }
+
+ /**
+ * Parses a style sheet. Really crude. Assumes data is nicely formatted on
+ * one line per entry
+ *
+ * @param urlString The URL to read
+ * @return A map of style class names mapped to StyleMaps
+ * @throws MalformedURLException
+ * @throws IOException
+ */
+ private Map<String, StyleMap> parseStylesheet(String urlString) throws MalformedURLException, IOException
+ {
+ Map<String, StyleMap> styleClasses = new HashMap<String, StyleMap>();
+ InputStream cssStream = null;
+ if (urlString.indexOf("://") < 0) {
+ cssStream = getClass().getResourceAsStream(urlString);
+ } else {
+ cssStream = new URL(urlString).openStream();
+ }
+ String css = readCSS(cssStream).toLowerCase();
+ int firstBrace = -1;
+ int secondBrace = -1;
+ while (!"".equals(css))
+ {
+ firstBrace = css.indexOf(LEFT_BRACE);
+ if (firstBrace >= 0)
+ {
+ secondBrace = css.indexOf(RIGHT_BRACE, firstBrace + 1);
+ }
+ if (firstBrace >= 0 && secondBrace >= 0 && firstBrace != secondBrace)
+ {
+ String styleName = css.substring(0, firstBrace).trim();
+ if (styleName.startsWith(".")) {
+ styleName = styleName.substring(1);
+ }
+ String styleString = css.substring(firstBrace + 1, secondBrace).trim();
+ StyleMap styleMap = StyleStringParser.of(styleString, propertyBuilders).parse();
+ styleClasses.put(styleName, styleMap);
+ css = css.substring(secondBrace + 1);
+ }
+ else
+ {
+ css = "";
+ }
+ }
+ return styleClasses;
+ }
+
+ /**
+ * Gets style from a component
+ *
+ * @param component The component to examine
+ * @return null if not found, otherwise style string
+ */
+ public static String getStyle(UIComponent component)
+ {
+ return getStyleProperty(component, STYLE_ATTRIBUTE);
+ }
+
+ /**
+ * Gets style class from a component
+ *
+ * @param component The component to examine
+ * @return null if not found, otherwise style class(es) string
+ */
+ public static String getStyleClass(UIComponent component)
+ {
+ return getStyleProperty(component, STYLE_CLASS_ATTRIBUTE);
+ }
+
+ /**
+ * Reads a property from a component
+ *
+ * @param component The component to examine
+ * @param field The field to read
+ * @return The value from the field
+ */
+ private static String getStyleProperty(UIComponent component, String field)
+ {
+ try
+ {
+ return (String) PropertyUtils.getProperty(component, field);
+ }
+ catch (NoSuchMethodException e)
+ {
+ // No panic, no property
+ return null;
+ }
+ catch (Exception e)
+ {
+ String message = Interpolator.instance().interpolate("Could not read field #0 of bean #1", field, component.getId());
+ throw new ExcelWorkbookException(message, e);
+ }
+ }
+
+ /**
+ * Cascades on parents, collecting them into list
+ *
+ * @param component The component to examine
+ * @param styleMaps The list of collected style maps
+ * @return The list of style maps
+ */
+ private List<StyleMap> cascadeStyleMap(UIComponent component, List<StyleMap> styleMaps)
+ {
+ styleMaps.add(getStyleMap(component));
+ if (component.getParent() != null)
+ {
+ cascadeStyleMap(component.getParent(), styleMaps);
+ }
+ return styleMaps;
+ }
+
+ /**
+ * Gets the cascaded style map for a component. Recurses on parents,
+ * collecting style maps. The reverses the list and merges the styles
+ *
+ * @param component The component to examine
+ * @return The merged style map
+ */
+ public StyleMap getCascadedStyleMap(UIComponent component)
+ {
+ List<StyleMap> styleMaps = cascadeStyleMap(component, new ArrayList<StyleMap>());
+ Collections.reverse(styleMaps);
+ StyleMap cascadedStyleMap = new StyleMap();
+ for (StyleMap styleMap : styleMaps)
+ {
+ cascadedStyleMap.putAll(styleMap);
+ }
+ return cascadedStyleMap;
+ }
+
+ /**
+ * Gets a style map for a component (from cache if available)
+ *
+ * @param component The component to examine
+ * @return The style map of the component
+ */
+ private StyleMap getStyleMap(UIComponent component)
+ {
+ if (cellStyleCache.containsKey(component))
+ {
+ return cellStyleCache.get(component);
+ }
+
+ StyleMap styleMap = new StyleMap();
+
+ String componentStyleClass = getStyleProperty(component, STYLE_CLASS_ATTRIBUTE);
+ if (componentStyleClass != null)
+ {
+ String[] styleClasses = StyleStringParser.trimArray(componentStyleClass.split(STYLE_SHORTHAND_SEPARATOR));
+ for (String styleClass : styleClasses)
+ {
+ if (!definedStyleClasses.containsKey(styleClass))
+ {
+ log.warn("Uknown style class #0", styleClass);
+ continue;
+ }
+ styleMap.putAll(definedStyleClasses.get(styleClass));
+ }
+ }
+
+ String componentStyle = getStyleProperty(component, STYLE_ATTRIBUTE);
+ if (componentStyle != null)
+ {
+ styleMap.putAll(StyleStringParser.of(componentStyle, propertyBuilders).parse());
+ }
+
+ cellStyleCache.put(component, styleMap);
+ return styleMap;
+ }
+
+// private StyleMap parseStyleString(String styleString)
+// {
+// StyleMap styleMap = new StyleMap();
+//
+// String[] styles = trimArray(styleString.split(STYLES_SEPARATOR));
+// for (String style : styles)
+// {
+// int breakpoint = style.indexOf(STYLE_NAME_VALUE_SEPARATOR);
+// if (breakpoint < 0) {
+// log.warn("Style component #0 should be of form <key>#1<value>", style, STYLE_NAME_VALUE_SEPARATOR);
+// continue;
+// }
+// String styleName = style.substring(0, breakpoint).toLowerCase().trim();
+// if (!propertyBuilders.containsKey(styleName))
+// {
+// log.warn("No property builder (unknown style) for property #0", styleName);
+// continue;
+// }
+// PropertyBuilder propertyBuilder = propertyBuilders.get(styleName);
+// String styleValue = style.substring(breakpoint + 1);
+// String[] styleValues = trimArray(styleValue.trim().split(STYLE_SHORTHAND_SEPARATOR));
+// styleMap.putAll(propertyBuilder.parseProperty(styleName, styleValues));
+// }
+//
+// return styleMap;
+// }
+
+ /**
+ * Setter for stylesheets. Loads them also.
+ *
+ * @param stylesheets The stylesheets to load
+ * @throws MalformedURLException If the URL is bad
+ * @throws IOException If the URL cannot be read
+ */
+ public void setStylesheets(List<UILink> stylesheets) throws MalformedURLException, IOException
+ {
+ loadStylesheets(stylesheets);
+ }
+}
Deleted: branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/Parser.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/Parser.java 2009-07-13 15:57:43 UTC (rev 11280)
+++ branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/Parser.java 2009-07-13 16:30:39 UTC (rev 11281)
@@ -1,399 +0,0 @@
-package org.jboss.seam.excel.css;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.faces.component.UIComponent;
-
-import org.apache.commons.beanutils.PropertyUtils;
-import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.excel.ExcelWorkbookException;
-import org.jboss.seam.excel.ui.UILink;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.log.Logging;
-
-/**
- * CSS parser for the XLS-CSS
- *
- * @author Nicklas Karlsson (nickarls(a)gmail.com)
- */
-public class Parser
-{
- // Where to look for the style
- private static final String STYLE_ATTRIBUTE = "style";
-
- // Where to look for the style class
- private static final String STYLE_CLASS_ATTRIBUTE = "styleClass";
-
- // What separates multiple XLS-CSS attributes in a style string
- private static final String STYLES_SEPARATOR = ";";
-
- // What separates the key and value in a XLS-CSS style
- private static final String STYLE_NAME_VALUE_SEPARATOR = ":";
-
- // What separates multiple style class references
- private static final String STYLE_SHORTHAND_SEPARATOR = " ";
-
- // What starts a rule block in a CSS file
- private static final String LEFT_BRACE = "{";
-
- // What ends a rule block in a CSS file
- private static final String RIGHT_BRACE = "}";
-
- // The style classes that have been read in from e:link referenced, mapped on
- // style class name
- private Map<String, StyleMap> definedStyleClasses = new HashMap<String, StyleMap>();
-
- // The registered property builders, mapped on attribute name
- private Map<String, PropertyBuilder> propertyBuilders = new HashMap<String, PropertyBuilder>();
-
- // A cache of previously parsed css, mapped on component
- private Map<UIComponent, StyleMap> cellStyleCache = new HashMap<UIComponent, StyleMap>();
-
- private Log log = Logging.getLog(Parser.class);
-
- /**
- * Constructor, initializes the property builders
- */
- public Parser()
- {
- initPropertyBuilders();
- }
-
- /**
- * Constructor with stylesheets
- *
- * @param stylesheets The list of referenced stylesheets in UILink elements
- * @throws MalformedURLException If the URL was bad
- * @throws IOException If the URL could not be read
- */
- public Parser(List<UILink> stylesheets) throws MalformedURLException, IOException
- {
- initPropertyBuilders();
- loadStylesheets(stylesheets);
- }
-
- /**
- * Loads stylesheets (merging by class name)
- *
- * @param stylesheets The stylesheets to read/merge
- * @throws MalformedURLException If the URL was bad
- * @throws IOException If the URL could not be read
- */
- private void loadStylesheets(List<UILink> stylesheets) throws MalformedURLException, IOException
- {
- for (UILink stylesheet : stylesheets)
- {
- definedStyleClasses.putAll(parseStylesheet(stylesheet.getURL()));
- }
- }
-
- /**
- * Registers the property builders
- */
- private void initPropertyBuilders()
- {
- propertyBuilders.put(CSSNames.FONT_FAMILY, new PropertyBuilders.FontFamily());
- propertyBuilders.put(CSSNames.FONT_SIZE, new PropertyBuilders.FontSize());
- propertyBuilders.put(CSSNames.FONT_COLOR, new PropertyBuilders.FontColor());
- propertyBuilders.put(CSSNames.FONT_ITALIC, new PropertyBuilders.FontItalic());
- propertyBuilders.put(CSSNames.FONT_SCRIPT_STYLE, new PropertyBuilders.FontScriptStyle());
- propertyBuilders.put(CSSNames.FONT_STRUCK_OUT, new PropertyBuilders.FontStruckOut());
- propertyBuilders.put(CSSNames.FONT_UNDERLINE_STYLE, new PropertyBuilders.FontUnderlineStyle());
- propertyBuilders.put(CSSNames.FONT_BOLD, new PropertyBuilders.FontBold());
- propertyBuilders.put(CSSNames.FONT, new PropertyBuilders.FontShorthand());
- propertyBuilders.put(CSSNames.BACKGROUND_PATTERN, new PropertyBuilders.BackgroundPattern());
- propertyBuilders.put(CSSNames.BACKGROUND_COLOR, new PropertyBuilders.BackgroundColor());
- propertyBuilders.put(CSSNames.BACKGROUND, new PropertyBuilders.BackgroundShorthand());
- propertyBuilders.put(CSSNames.BORDER_LEFT_COLOR, new PropertyBuilders.BorderLeftColor());
- propertyBuilders.put(CSSNames.BORDER_LEFT_LINE_STYLE, new PropertyBuilders.BorderLeftLineStyle());
- propertyBuilders.put(CSSNames.BORDER_LEFT, new PropertyBuilders.BorderLeftShorthand());
- propertyBuilders.put(CSSNames.BORDER_TOP_COLOR, new PropertyBuilders.BorderTopColor());
- propertyBuilders.put(CSSNames.BORDER_TOP_LINE_STYLE, new PropertyBuilders.BorderTopLineStyle());
- propertyBuilders.put(CSSNames.BORDER_TOP, new PropertyBuilders.BorderTopShorthand());
- propertyBuilders.put(CSSNames.BORDER_RIGHT_COLOR, new PropertyBuilders.BorderRightColor());
- propertyBuilders.put(CSSNames.BORDER_RIGHT_LINE_STYLE, new PropertyBuilders.BorderRightLineStyle());
- propertyBuilders.put(CSSNames.BORDER_RIGHT, new PropertyBuilders.BorderRightShorthand());
- propertyBuilders.put(CSSNames.BORDER_BOTTOM_COLOR, new PropertyBuilders.BorderBottomColor());
- propertyBuilders.put(CSSNames.BORDER_BOTTOM_LINE_STYLE, new PropertyBuilders.BorderBottomLineStyle());
- propertyBuilders.put(CSSNames.BORDER_BOTTOM, new PropertyBuilders.BorderBottomShorthand());
- propertyBuilders.put(CSSNames.BORDER, new PropertyBuilders.BorderShorthand());
- propertyBuilders.put(CSSNames.FORMAT_MASK, new PropertyBuilders.FormatMask());
- propertyBuilders.put(CSSNames.ALIGNMENT, new PropertyBuilders.Alignment());
- propertyBuilders.put(CSSNames.INDENTATION, new PropertyBuilders.Indentation());
- propertyBuilders.put(CSSNames.ORIENTATION, new PropertyBuilders.Orientation());
- propertyBuilders.put(CSSNames.LOCKED, new PropertyBuilders.Locked());
- propertyBuilders.put(CSSNames.SHRINK_TO_FIT, new PropertyBuilders.ShrinkToFit());
- propertyBuilders.put(CSSNames.WRAP, new PropertyBuilders.Wrap());
- propertyBuilders.put(CSSNames.VERICAL_ALIGNMENT, new PropertyBuilders.VericalAlignment());
- propertyBuilders.put(CSSNames.COLUMN_WIDTH, new PropertyBuilders.ColumnWidth());
- propertyBuilders.put(CSSNames.COLUMN_AUTO_SIZE, new PropertyBuilders.ColumnAutoSize());
- propertyBuilders.put(CSSNames.COLUMN_HIDDEN, new PropertyBuilders.ColumnHidden());
- propertyBuilders.put(CSSNames.COLUMN_EXPORT, new PropertyBuilders.ColumnExport());
- propertyBuilders.put(CSSNames.COLUMN_WIDTHS, new PropertyBuilders.ColumnWidths());
- propertyBuilders.put(CSSNames.FORCE_TYPE, new PropertyBuilders.ForceType());
- }
-
- /**
- * Reads data from an URL to a String
- *
- * @param url The URL to read
- * @return The read data as a String
- * @throws IOException If the stream could not be read
- */
- private static String readCSS(InputStream in) throws IOException
- {
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
- StringBuffer buffer = new StringBuffer();
- String line;
- while ((line = reader.readLine()) != null)
- {
- buffer.append(line);
- }
- reader.close();
- return buffer.toString();
- }
-
- /**
- * Parses a style sheet. Really crude. Assumes data is nicely formatted on
- * one line per entry
- *
- * @param urlString The URL to read
- * @return A map of style class names mapped to StyleMaps
- * @throws MalformedURLException
- * @throws IOException
- */
- private Map<String, StyleMap> parseStylesheet(String urlString) throws MalformedURLException, IOException
- {
- Map<String, StyleMap> styleClasses = new HashMap<String, StyleMap>();
- InputStream cssStream = null;
- if (urlString.indexOf("://") < 0) {
- cssStream = getClass().getResourceAsStream(urlString);
- } else {
- cssStream = new URL(urlString).openStream();
- }
- String css = readCSS(cssStream).toLowerCase();
- int firstBrace = -1;
- int secondBrace = -1;
- while (!"".equals(css))
- {
- firstBrace = css.indexOf(LEFT_BRACE);
- if (firstBrace >= 0)
- {
- secondBrace = css.indexOf(RIGHT_BRACE, firstBrace + 1);
- }
- if (firstBrace >= 0 && secondBrace >= 0 && firstBrace != secondBrace)
- {
- String styleName = css.substring(0, firstBrace).trim();
- if (styleName.startsWith(".")) {
- styleName = styleName.substring(1);
- }
- String styleString = css.substring(firstBrace + 1, secondBrace).trim();
- StyleMap styleMap = parseStyleString(styleString);
- styleClasses.put(styleName, styleMap);
- css = css.substring(secondBrace + 1);
- }
- else
- {
- css = "";
- }
- }
- return styleClasses;
- }
-
- /**
- * Gets style from a component
- *
- * @param component The component to examine
- * @return null if not found, otherwise style string
- */
- public static String getStyle(UIComponent component)
- {
- return getStyleProperty(component, STYLE_ATTRIBUTE);
- }
-
- /**
- * Gets style class from a component
- *
- * @param component The component to examine
- * @return null if not found, otherwise style class(es) string
- */
- public static String getStyleClass(UIComponent component)
- {
- return getStyleProperty(component, STYLE_CLASS_ATTRIBUTE);
- }
-
- /**
- * Reads a property from a component
- *
- * @param component The component to examine
- * @param field The field to read
- * @return The value from the field
- */
- private static String getStyleProperty(UIComponent component, String field)
- {
- try
- {
- return (String) PropertyUtils.getProperty(component, field);
- }
- catch (NoSuchMethodException e)
- {
- // No panic, no property
- return null;
- }
- catch (Exception e)
- {
- String message = Interpolator.instance().interpolate("Could not read field #0 of bean #1", field, component.getId());
- throw new ExcelWorkbookException(message, e);
- }
- }
-
- /**
- * Cascades on parents, collecting them into list
- *
- * @param component The component to examine
- * @param styleMaps The list of collected style maps
- * @return The list of style maps
- */
- private List<StyleMap> cascadeStyleMap(UIComponent component, List<StyleMap> styleMaps)
- {
- styleMaps.add(getStyleMap(component));
- if (component.getParent() != null)
- {
- cascadeStyleMap(component.getParent(), styleMaps);
- }
- return styleMaps;
- }
-
- /**
- * Gets the cascaded style map for a component. Recurses on parents,
- * collecting style maps. The reverses the list and merges the styles
- *
- * @param component The component to examine
- * @return The merged style map
- */
- public StyleMap getCascadedStyleMap(UIComponent component)
- {
- List<StyleMap> styleMaps = cascadeStyleMap(component, new ArrayList<StyleMap>());
- Collections.reverse(styleMaps);
- StyleMap cascadedStyleMap = new StyleMap();
- for (StyleMap styleMap : styleMaps)
- {
- cascadedStyleMap.putAll(styleMap);
- }
- return cascadedStyleMap;
- }
-
- /**
- * Gets a style map for a component (from cache if available)
- *
- * @param component The component to examine
- * @return The style map of the component
- */
- private StyleMap getStyleMap(UIComponent component)
- {
- if (cellStyleCache.containsKey(component))
- {
- return cellStyleCache.get(component);
- }
-
- StyleMap styleMap = new StyleMap();
-
- String componentStyleClass = getStyleProperty(component, STYLE_CLASS_ATTRIBUTE);
- if (componentStyleClass != null)
- {
- String[] styleClasses = trimArray(componentStyleClass.split(STYLE_SHORTHAND_SEPARATOR));
- for (String styleClass : styleClasses)
- {
- if (!definedStyleClasses.containsKey(styleClass))
- {
- log.warn("Uknown style class #0", styleClass);
- continue;
- }
- styleMap.putAll(definedStyleClasses.get(styleClass));
- }
- }
-
- String componentStyle = getStyleProperty(component, STYLE_ATTRIBUTE);
- if (componentStyle != null)
- {
- styleMap.putAll(parseStyleString(componentStyle));
- }
-
- cellStyleCache.put(component, styleMap);
- return styleMap;
- }
-
- /**
- * Parses a stringle style string
- *
- * @param styleString The string to parse
- * @return The parsed StyleMap
- */
- private StyleMap parseStyleString(String styleString)
- {
- StyleMap styleMap = new StyleMap();
-
- String[] styles = trimArray(styleString.split(STYLES_SEPARATOR));
- for (String style : styles)
- {
- int breakpoint = style.indexOf(STYLE_NAME_VALUE_SEPARATOR);
- if (breakpoint < 0) {
- log.warn("Style component #0 should be of form <key>#1<value>", style, STYLE_NAME_VALUE_SEPARATOR);
- continue;
- }
- String styleName = style.substring(0, breakpoint).toLowerCase().trim();
- if (!propertyBuilders.containsKey(styleName))
- {
- log.warn("No property builder (unknown style) for property #0", styleName);
- continue;
- }
- PropertyBuilder propertyBuilder = propertyBuilders.get(styleName);
- String styleValue = style.substring(breakpoint + 1);
- String[] styleValues = trimArray(styleValue.trim().split(STYLE_SHORTHAND_SEPARATOR));
- styleMap.putAll(propertyBuilder.parseProperty(styleName, styleValues));
- }
-
- return styleMap;
- }
-
- /**
- * Utility for trimming (lowercase & trim) an array of string values
- *
- * @param array The array to trim
- * @return The trimmed array
- */
- private String[] trimArray(String[] array)
- {
- List<String> validValues = new ArrayList<String>();
- for (int i = 0; i < array.length; i++)
- {
- if (!"".equals(array[i]) && !" ".equals(array[i]))
- {
- validValues.add(array[i].toLowerCase().trim());
- }
- }
- return validValues.toArray(new String[validValues.size()]);
- }
-
- /**
- * Setter for stylesheets. Loads them also.
- *
- * @param stylesheets The stylesheets to load
- * @throws MalformedURLException If the URL is bad
- * @throws IOException If the URL cannot be read
- */
- public void setStylesheets(List<UILink> stylesheets) throws MalformedURLException, IOException
- {
- loadStylesheets(stylesheets);
- }
-}
Added: branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/StyleStringParser.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/StyleStringParser.java (rev 0)
+++ branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/css/StyleStringParser.java 2009-07-13 16:30:39 UTC (rev 11281)
@@ -0,0 +1,103 @@
+package org.jboss.seam.excel.css;
+
+import java.text.CharacterIterator;
+import java.text.StringCharacterIterator;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.seam.log.Log;
+import org.jboss.seam.log.Logging;
+
+public class StyleStringParser
+{
+ private static final char STYLE_SEPARATOR = ';';
+ private static final String KEY_VALUE_SEPARATOR = ":";
+ private static final String STYLE_SHORTHAND_SEPARATOR = " ";
+ private static final char ESCAPE_CHAR = '\'';
+
+ private Log log = Logging.getLog(StyleStringParser.class);
+
+ private String styleString;
+ private Map<String, PropertyBuilder> propertyBuilderMap;
+ private StyleMap styleMap = new StyleMap();
+ private boolean escaping = false;
+
+ public static StyleStringParser of(String styleString, Map<String, PropertyBuilder> propertyBuilderMap)
+ {
+ return new StyleStringParser(styleString, propertyBuilderMap);
+ }
+
+ protected StyleStringParser(String styleString, Map<String, PropertyBuilder> propertyBuilderMap)
+ {
+ this.styleString = styleString;
+ this.propertyBuilderMap = propertyBuilderMap;
+ }
+
+ private void addStyle(StringBuilder styleBuilder)
+ {
+ String styleString = styleBuilder.toString();
+ int keyValueBreakpointIndex = styleString.indexOf(KEY_VALUE_SEPARATOR);
+ if (keyValueBreakpointIndex < 0)
+ {
+ log.warn("Key-value separator character #0 not found in style #1, dropping", KEY_VALUE_SEPARATOR + styleBuilder.toString());
+ return;
+ }
+ String styleName = styleString.substring(0, keyValueBreakpointIndex).toLowerCase().trim();
+ if (!propertyBuilderMap.containsKey(styleName))
+ {
+ log.warn("No property builder (unknown style) for property #0", styleName);
+ return;
+ }
+ PropertyBuilder propertyBuilder = propertyBuilderMap.get(styleName);
+ String styleValue = styleString.substring(keyValueBreakpointIndex + 1);
+ log.trace("Parsed style #0 to #1 => #2", styleString, styleName, styleValue);
+ String[] styleValues = trimArray(styleValue.trim().split(STYLE_SHORTHAND_SEPARATOR));
+ styleMap.putAll(propertyBuilder.parseProperty(styleName, styleValues));
+ }
+
+ public static String[] trimArray(String[] array)
+ {
+ List<String> validValues = new ArrayList<String>();
+ for (int i = 0; i < array.length; i++)
+ {
+ if (!"".equals(array[i]) && !" ".equals(array[i]))
+ {
+ validValues.add(array[i].toLowerCase().trim());
+ }
+ }
+ return validValues.toArray(new String[validValues.size()]);
+ }
+
+ public StyleMap parse()
+ {
+ CharacterIterator iterator = new StringCharacterIterator(styleString);
+ StringBuilder styleBuilder = new StringBuilder();
+ for (char c = iterator.first(); c != CharacterIterator.DONE; c = iterator.next())
+ {
+ if (ESCAPE_CHAR == c)
+ {
+ escaping = !escaping;
+ }
+ else if (STYLE_SEPARATOR == c && !escaping)
+ {
+ addStyle(styleBuilder);
+ styleBuilder = new StringBuilder();
+ }
+ else
+ {
+ styleBuilder.append(c);
+ }
+ }
+ if (styleBuilder.length() > 0)
+ {
+ addStyle(styleBuilder);
+ }
+
+ if (escaping)
+ {
+ log.warn("Unbalanced escape characters #0 in style #1", ESCAPE_CHAR, styleBuilder.toString());
+ }
+ return styleMap;
+ }
+}
Modified: branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java 2009-07-13 15:57:43 UTC (rev 11280)
+++ branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java 2009-07-13 16:30:39 UTC (rev 11281)
@@ -27,7 +27,7 @@
import org.jboss.seam.excel.ExcelWorkbookException;
import org.jboss.seam.excel.css.CSSNames;
import org.jboss.seam.excel.css.ColumnStyle;
-import org.jboss.seam.excel.css.Parser;
+import org.jboss.seam.excel.css.CSSParser;
import org.jboss.seam.excel.css.StyleMap;
import org.jboss.seam.excel.ui.ExcelComponent;
import org.jboss.seam.excel.ui.UICell;
@@ -78,7 +78,7 @@
{
excelWorkbook = ExcelFactory.instance().getExcelWorkbook(type);
- Parser parser = new Parser();
+ CSSParser parser = new CSSParser();
// Gets the datatable
UIData dataTable = (UIData) FacesContext.getCurrentInstance().getViewRoot().findComponent(dataTableId);
@@ -92,8 +92,8 @@
excelWorkbook.createWorkbook(uiWorkbook);
UIWorksheet uiWorksheet = new UIWorksheet();
uiWorkbook.getChildren().add(uiWorksheet);
- uiWorksheet.setStyle(Parser.getStyle(dataTable));
- uiWorksheet.setStyleClass(Parser.getStyleClass(dataTable));
+ uiWorksheet.setStyle(CSSParser.getStyle(dataTable));
+ uiWorksheet.setStyleClass(CSSParser.getStyleClass(dataTable));
excelWorkbook.createOrSelectWorksheet(uiWorksheet);
// Saves the datatable var
@@ -141,7 +141,7 @@
private Map<Integer, Integer> parseColumnWidths(UIWorksheet worksheet)
{
Map<Integer, Integer> columnWidths = new HashMap<Integer, Integer>();
- Parser parser = new Parser();
+ CSSParser parser = new CSSParser();
StyleMap styleMap = parser.getCascadedStyleMap(worksheet);
for (Map.Entry<String, Object> entry : styleMap.entrySet())
@@ -235,8 +235,8 @@
column.getChildren().add(cell);
cell.setId(output.getId());
cell.setValue(output.getValue());
- cell.setStyle(Parser.getStyle(output));
- cell.setStyleClass(Parser.getStyleClass(output));
+ cell.setStyle(CSSParser.getStyle(output));
+ cell.setStyleClass(CSSParser.getStyleClass(output));
excelWorkbook.addItem(cell);
}
Modified: branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/jxl/JXLHelper.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/jxl/JXLHelper.java 2009-07-13 15:57:43 UTC (rev 11280)
+++ branches/enterprise/JBPAPP_5_0/src/excel/org/jboss/seam/excel/jxl/JXLHelper.java 2009-07-13 16:30:39 UTC (rev 11281)
@@ -32,7 +32,7 @@
import org.jboss.seam.excel.ExcelWorkbookException;
import org.jboss.seam.excel.css.CellStyle;
import org.jboss.seam.excel.css.ColumnStyle;
-import org.jboss.seam.excel.css.Parser;
+import org.jboss.seam.excel.css.CSSParser;
import org.jboss.seam.excel.ui.ExcelComponent;
import org.jboss.seam.excel.ui.UICell;
import org.jboss.seam.excel.ui.UICellBase;
@@ -67,7 +67,7 @@
private static Log log = Logging.getLog(JXLHelper.class);
// The CSS parser
- private Parser parser = new Parser();
+ private CSSParser parser = new CSSParser();
// A cache of cell info
private CellInfoCache cellInfoCache = new CellInfoCache();
15 years, 4 months
Seam SVN: r11280 - in branches/enterprise/JBPAPP_5_0: doc/Seam_Reference_Guide/en-US and 1 other directory.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-07-13 11:57:43 -0400 (Mon, 13 Jul 2009)
New Revision: 11280
Modified:
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Text.xml
branches/enterprise/JBPAPP_5_0/seam-text.g
Log:
back ported JBSEAM-4221
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Text.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Text.xml 2009-07-13 15:50:48 UTC (rev 11279)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Text.xml 2009-07-13 15:57:43 UTC (rev 11280)
@@ -226,4 +226,72 @@
</section>
-</chapter>
\ No newline at end of file
+ <section>
+ <title>Using the SeamTextParser</title>
+
+ <para>
+ The <literal><s:formattedText/></literal> JSF component internally uses the
+ <literal>org.jboss.seam.text.SeamTextParser</literal>. You can use that class directly and implement
+ your own text parsing, rendering, or HTML sanitation procedure. This is especially useful if you have
+ a custom frontend for entering rich text, such as a Javascript-based HTML editor, and you want to validate
+ user input to protect your website against Cross-Site Scripting (XSS) attacks. Another usecase
+ are custom wiki text parsing and rendering engines.
+ </para>
+
+ <para>
+ The following example defines a custom text parser that overrides the default HTML sanitizer:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[public class MyTextParser extends SeamTextParser {
+
+ public MyTextParser(String myText) {
+ super(new SeamTextLexer(new StringReader(myText)));
+
+ setSanitizer(
+ new DefaultSanitizer() {
+ @Override
+ public void validateHtmlElement(Token element) throws SemanticException {
+ // TODO: I want to validate HTML elements myself!
+ }
+ }
+ );
+ }
+
+ // Customizes rendering of Seam text links such as [Some Text=>http://example.com]
+ @Override
+ protected String linkTag(String descriptionText, String linkText) {
+ return "<a href=\"" + linkText + "\">My Custom Link: " + descriptionText + "</a>";
+ }
+
+ // Renders a <p> or equivalent tag
+ @Override
+ protected String paragraphOpenTag() {
+ return "<p class=\"myCustomStyle\">";
+ }
+
+ public void parse() throws ANTLRException {
+ startRule();
+ }
+
+}]]></programlisting>
+
+ <para>
+ The <literal>linkTag()</literal> and <literal>paragraphOpenTag()</literal> methods are just some of many
+ you can override to customize rendered output. These methods generally return <literal>String</literal>.
+ See the Javadoc for more details.
+ </para>
+
+ <para>
+ Also consult the Javadoc of <literal>org.jboss.seam.text.SeamTextParser.DefaultSanitizer</literal> for
+ more information on what HTML elements, attributes, and attribute values or filtered by default.
+ </para>
+
+ </section>
+
+</chapter>
+
+
+<!--
+ <programlisting role="JAVA"><![CDATA[
+]]></programlisting>
+-->
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_5_0/seam-text.g
===================================================================
--- branches/enterprise/JBPAPP_5_0/seam-text.g 2009-07-13 15:50:48 UTC (rev 11279)
+++ branches/enterprise/JBPAPP_5_0/seam-text.g 2009-07-13 15:57:43 UTC (rev 11280)
@@ -91,6 +91,7 @@
/**
* Implementation of the rules in http://wiki.whatwg.org/wiki/Sanitization_rules
*
+ * <pre>
* Changes and additions:
*
* 1. Expanded all -* wildcard values to their full CSS property name (e.g. border-*).
@@ -107,10 +108,10 @@
*
* 7. Not implemented filtering of CSS url() - it's an invalid value always.
*
- * 8. Removed all <form>, <input> and other form tags. Attackers might use them compromise "outer" forms when entering
- * markup in a textarea.
+ * 8. Removed all <form>, <input> and other form tags. Attackers might use them to compromise
+ * "outer" forms when entering such markup in a textarea.
+ * </pre>
*
- *
*/
public static class DefaultSanitizer implements SeamTextParser.Sanitizer {
15 years, 4 months