[jboss-svn-commits] JBoss PortletSwap SVN: r146 - in portlets/src/framework/Seam: ear and 37 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Nov 10 09:08:16 EST 2007


Author: wesleyhales
Date: 2007-11-10 09:08:15 -0500 (Sat, 10 Nov 2007)
New Revision: 146

Added:
   portlets/src/framework/Seam/ear/
   portlets/src/framework/Seam/ear/pom.xml
   portlets/src/framework/Seam/ear/src/
   portlets/src/framework/Seam/ear/src/main/
   portlets/src/framework/Seam/ear/src/main/deployment/
   portlets/src/framework/Seam/ear/src/main/resources/
   portlets/src/framework/Seam/ear/src/main/resources/META-INF/
   portlets/src/framework/Seam/ear/src/main/resources/META-INF/jboss-app.xml
   portlets/src/framework/Seam/ejb/
   portlets/src/framework/Seam/ejb/pom.xml
   portlets/src/framework/Seam/ejb/src/
   portlets/src/framework/Seam/ejb/src/main/
   portlets/src/framework/Seam/ejb/src/main/java/
   portlets/src/framework/Seam/ejb/src/main/java/com/
   portlets/src/framework/Seam/ejb/src/main/java/com/sun/
   portlets/src/framework/Seam/ejb/src/main/java/com/sun/facelets/
   portlets/src/framework/Seam/ejb/src/main/java/com/sun/facelets/FaceletPortletViewHandler.java
   portlets/src/framework/Seam/ejb/src/main/java/com/testapp/
   portlets/src/framework/Seam/ejb/src/main/java/com/testapp/Authenticator.java
   portlets/src/framework/Seam/ejb/src/main/java/com/testapp/ObserveInitialization.java
   portlets/src/framework/Seam/ejb/src/main/java/com/testapp/SecurityHelper.java
   portlets/src/framework/Seam/ejb/src/main/java/com/testapp/web/
   portlets/src/framework/Seam/ejb/src/main/java/javax/
   portlets/src/framework/Seam/ejb/src/main/java/javax/portlet/
   portlets/src/framework/Seam/ejb/src/main/java/org/
   portlets/src/framework/Seam/ejb/src/main/java/org/jboss/
   portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/
   portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/contexts/
   portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/contexts/Contexts.java
   portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/jsf/
   portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java
   portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/portlet/
   portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/security/
   portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/security/Identity.java
   portlets/src/framework/Seam/ejb/src/main/resources/
   portlets/src/framework/Seam/ejb/src/main/resources/META-INF/
   portlets/src/framework/Seam/ejb/src/main/resources/META-INF/ejb-jar.xml
   portlets/src/framework/Seam/ejb/src/main/resources/META-INF/persistence.xml
   portlets/src/framework/Seam/ejb/src/main/resources/ds/
   portlets/src/framework/Seam/ejb/src/main/resources/ds/testSeam-dev-ds.xml
   portlets/src/framework/Seam/ejb/src/main/resources/ds/testSeam-prod-ds.xml
   portlets/src/framework/Seam/ejb/src/main/resources/log4j.xml
   portlets/src/framework/Seam/ejb/src/main/resources/login-config.xml
   portlets/src/framework/Seam/ejb/src/main/resources/pageflow/
   portlets/src/framework/Seam/ejb/src/main/resources/pageflow/test.jpdl.xml
   portlets/src/framework/Seam/ejb/src/main/resources/properties/
   portlets/src/framework/Seam/ejb/src/main/resources/properties/labels_en.properties
   portlets/src/framework/Seam/ejb/src/main/resources/properties/messages.properties
   portlets/src/framework/Seam/ejb/src/main/resources/properties/roles.properties
   portlets/src/framework/Seam/ejb/src/main/resources/properties/seam.properties
   portlets/src/framework/Seam/ejb/src/main/resources/properties/testapp.skin.properties
   portlets/src/framework/Seam/ejb/src/main/resources/properties/users.properties
   portlets/src/framework/Seam/ejb/src/main/resources/security.drl
   portlets/src/framework/Seam/ejb/src/test/
   portlets/src/framework/Seam/ejb/src/test/embedded/
   portlets/src/framework/Seam/ejb/src/test/filters/
   portlets/src/framework/Seam/ejb/src/test/filters/components.properties
   portlets/src/framework/Seam/ejb/src/test/java/
   portlets/src/framework/Seam/ejb/src/test/resources/
   portlets/src/framework/Seam/ejb/src/test/resources/META-INF/
   portlets/src/framework/Seam/ejb/src/test/resources/WEB-INF/
   portlets/src/framework/Seam/pom.xml
   portlets/src/framework/Seam/web/
   portlets/src/framework/Seam/web/pom.xml
   portlets/src/framework/Seam/web/src/
   portlets/src/framework/Seam/web/src/main/
   portlets/src/framework/Seam/web/src/main/filters/
   portlets/src/framework/Seam/web/src/main/filters/jboss.properties
   portlets/src/framework/Seam/web/src/main/filters/tomcat.properties
   portlets/src/framework/Seam/web/src/main/resources/
   portlets/src/framework/Seam/web/src/main/resources/components.xml
   portlets/src/framework/Seam/web/src/main/resources/context.xml
   portlets/src/framework/Seam/web/src/main/resources/portal/
   portlets/src/framework/Seam/web/src/main/resources/portal/ajaxportlet-object.xml
   portlets/src/framework/Seam/web/src/main/resources/portal/jboss-portlet.xml
   portlets/src/framework/Seam/web/src/main/resources/portal/portlet-instances.xml
   portlets/src/framework/Seam/web/src/main/resources/portal/portlet.xml
   portlets/src/framework/Seam/web/src/main/webapp/
   portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/
   portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/faces-config.xml
   portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/jboss-web.xml
   portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/lib/
   portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/pages.xml
   portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/rewriter-config.xml
   portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/tags/
   portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/trinidad-config.xml
   portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/trinidad-skins.xml
   portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/web.xml
   portlets/src/framework/Seam/web/src/main/webapp/about.xhtml
   portlets/src/framework/Seam/web/src/main/webapp/css/
   portlets/src/framework/Seam/web/src/main/webapp/css/master.css
   portlets/src/framework/Seam/web/src/main/webapp/home.xhtml
   portlets/src/framework/Seam/web/src/main/webapp/index.html
   portlets/src/framework/Seam/web/src/test/
   portlets/src/framework/Seam/web/src/test/resources-filter/
   portlets/src/framework/Seam/web/src/test/resources/
Log:
Initial import of seam booking portlet

Added: portlets/src/framework/Seam/ear/pom.xml
===================================================================
--- portlets/src/framework/Seam/ear/pom.xml	                        (rev 0)
+++ portlets/src/framework/Seam/ear/pom.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,323 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+   <modelVersion>4.0.0</modelVersion>
+   <parent>
+      <groupId>org.jboss.portal.example</groupId>
+      <artifactId>JBossPortalExample</artifactId>
+      <version>1.0</version>
+   </parent>
+   <groupId>org.jboss.portal.example</groupId>
+   <artifactId>SeamBookingPortlet</artifactId>
+   <packaging>ear</packaging>
+   <name>JBoss Portal Seam Booking Portlet Example EAR</name>
+   <version>1.0</version>
+
+   <dependencies>
+
+      <dependency>
+         <groupId>org.jboss.portal.example</groupId>
+         <artifactId>SeamBookingPortletEjb</artifactId>
+         <version>${project.version}</version>
+         <!--<scope>provided</scope>-->
+         <type>ejb</type>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.portal.example</groupId>
+         <artifactId>SeamBookingPortletWeb</artifactId>
+         <version>${project.version}</version>
+         <type>war</type>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam</artifactId>
+         <exclusions>
+            <exclusion>
+               <groupId>javax.el</groupId>
+               <artifactId>el-api</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-el</artifactId>
+         <exclusions>
+            <exclusion>
+               <groupId>javax.el</groupId>
+               <artifactId>el-api</artifactId>
+            </exclusion>
+         </exclusions>
+         <type>jar</type>
+      </dependency>
+
+      <dependency>
+         <groupId>org.drools</groupId>
+         <artifactId>drools-core</artifactId>
+      </dependency>
+
+      <dependency>
+         <groupId>org.drools</groupId>
+         <artifactId>drools-compiler</artifactId>
+      </dependency>
+
+      <dependency>
+         <groupId>janino</groupId>
+         <artifactId>janino</artifactId>
+      </dependency>
+
+      <dependency>
+         <groupId>org.mvel</groupId>
+         <artifactId>mvel14</artifactId>
+      </dependency>
+
+      <dependency>
+         <groupId>antlr</groupId>
+         <artifactId>antlr</artifactId>
+      </dependency>
+
+      <dependency>
+         <groupId>org.mvel</groupId>
+         <artifactId>mvel14</artifactId>
+      </dependency>
+
+
+   </dependencies>
+
+   <profiles>
+      <profile>
+         <id>jboss</id>
+         <activation>
+            <!--            <property>
+                <name>!tomcat</name>
+            </property>-->
+            <activeByDefault>true</activeByDefault>
+         </activation>
+
+         <build>
+
+            <resources>
+
+               <resource>
+                  <targetPath>../${project.artifactId}-${project.version}</targetPath>
+                  <filtering>false</filtering>
+                  <directory>src/main/resources</directory>
+                  <includes>
+                     <include>META-INF/*.xml</include>
+                  </includes>
+               </resource>
+
+               <resource>
+                  <targetPath>../${project.artifactId}-${project.version}</targetPath>
+                  <filtering>false</filtering>
+                  <directory>../ejb/src/main/resources/pageflow</directory>
+                  <includes>
+                     <include>*.xml</include>
+                  </includes>
+               </resource>
+
+               <resource>
+                  <targetPath>../${project.artifactId}-${project.version}</targetPath>
+                  <filtering>false</filtering>
+                  <directory>../ejb/src/main/resources</directory>
+                  <includes>
+                     <include>security.drl</include>
+                  </includes>
+               </resource>
+
+            </resources>
+
+            <plugins>
+               <plugin>
+                  <groupId>org.apache.maven.plugins</groupId>
+                  <artifactId>maven-ear-plugin</artifactId>
+
+                  <configuration>
+                     <displayName>${artifactId}</displayName>
+                     <description>${name}</description>
+                     <version>1.4</version>
+                     <loader-repository>seam.jboss.org:loader=SeamBookingPortlet</loader-repository>
+                     <modules>
+
+                        <webModule>
+                           <groupId>org.jboss.portal.example</groupId>
+                           <artifactId>SeamBookingPortletWeb</artifactId>
+                           <contextRoot>/SeamBookingPortletWeb-${version}</contextRoot>
+                        </webModule>
+
+                        <ejbModule>
+                           <groupId>org.jboss.portal.example</groupId>
+                           <artifactId>SeamBookingPortletEjb</artifactId>
+                        </ejbModule>
+
+                        <jarModule>
+                           <groupId>org.jboss.seam</groupId>
+                           <artifactId>jboss-seam</artifactId>
+                           <includeInApplicationXml>true</includeInApplicationXml>
+                        </jarModule>
+
+                        <jarModule>
+                           <groupId>org.jboss.seam</groupId>
+                           <artifactId>jboss-el</artifactId>
+                           <!--<includeInApplicationXml>true</includeInApplicationXml>-->
+                           <bundleDir>lib</bundleDir>
+                        </jarModule>
+
+                        <!--The drools/jbpm jars (below) are contained in the ear for Jboss deployment-->
+
+                        <jarModule>
+                           <groupId>org.drools</groupId>
+                           <artifactId>drools-core</artifactId>
+                           <includeInApplicationXml>true</includeInApplicationXml>
+                        </jarModule>
+
+                        <jarModule>
+                           <groupId>org.drools</groupId>
+                           <artifactId>drools-compiler</artifactId>
+                           <includeInApplicationXml>true</includeInApplicationXml>
+                        </jarModule>
+
+                        <jarModule>
+                           <groupId>janino</groupId>
+                           <artifactId>janino</artifactId>
+                           <includeInApplicationXml>true</includeInApplicationXml>
+                        </jarModule>
+
+                        <jarModule>
+                           <groupId>org.mvel</groupId>
+                           <artifactId>mvel14</artifactId>
+                           <includeInApplicationXml>true</includeInApplicationXml>
+                        </jarModule>
+
+
+                        <jarModule>
+                           <groupId>antlr</groupId>
+                           <artifactId>antlr</artifactId>
+                           <includeInApplicationXml>true</includeInApplicationXml>
+                        </jarModule>
+
+                        <jarModule>
+                           <groupId>org.mvel</groupId>
+                           <artifactId>mvel14</artifactId>
+                           <includeInApplicationXml>true</includeInApplicationXml>
+                        </jarModule>
+
+                     </modules>
+                     <!--<jboss>
+                     <version>4</version>
+                     <unauthenticated-principal>guest</unauthenticated-principal>-->
+                     <!--<security-domain></security-domain>-->
+                     <!--<jmx-name></jmx-name>-->
+                     <!--</jboss>-->
+                  </configuration>
+               </plugin>
+
+                  <plugin>
+                     <groupId>org.codehaus.cargo</groupId>
+                     <artifactId>cargo-maven2-plugin</artifactId>
+                     <version>0.3.1</version>
+                     <configuration>
+
+                         <wait>${cargo.wait}</wait>
+
+                         <container>
+                             <containerId>${cargo.container}</containerId>
+
+                             <zipUrlInstaller>
+                                 <url>${cargo.container.url}</url>
+                                 <installDir>target/installs</installDir>
+                             </zipUrlInstaller>
+                         </container>
+
+                         <configuration>
+                             <type>existing</type>
+                             <home>{env.JBOSS_HOME}</home>
+                             <properties>
+                                 <cargo.jboss.configuration>default</cargo.jboss.configuration>
+                                 <cargo.jvmarg>${cargo.jvmarg}</cargo.jvmarg>
+                                 <cargo.host>${cargo.host}</cargo.host>
+                                 <cargo.servlet.port>${cargo.port}</cargo.servlet.port>
+                                 <cargo.logging>low</cargo.logging>
+                             </properties>
+                         </configuration>
+
+                         <!--<deployer>
+                             <type>installed</type>
+                             <deployables>
+                                 <deployable>
+                                     <groupId> </groupId>
+                                     <artifactId> </artifactId>
+                                     <type>ear</type>
+                                     <pingURL>{URL}</pingURL>
+                                 </deployable>
+                             </deployables>
+                         </deployer>-->
+                     </configuration>
+                 </plugin>
+
+            </plugins>
+
+         </build>
+
+         <properties>
+            <containerId>jboss4x</containerId>
+            <url>http://internap.dl.sourceforge.net/sourceforge/jboss/jboss-4.0.4.GA.zip</url>
+         </properties>
+      </profile>
+
+   </profiles>
+
+   <!--<repositories>
+      <repository>
+            <id>m2-snapshot-repository</id>
+            <name>m2-snapshot-repository</name>
+            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+        </repository>
+      <repository>
+            <id>ibiblio</id>
+            <name>ibiblio-repo</name>
+            <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
+            <layout>legacy</layout>
+        </repository>
+      <repository>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+            <id>maven2-snapshots.ajax4jsf.org</id>
+            <name>Ajax4jsf Repository for Maven Snapshots</name>
+            <url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
+            <layout>default</layout>
+        </repository>
+   </repositories>-->
+
+   <pluginRepositories>
+    <pluginRepository>
+    <id>apache.snapshots</id>
+    <url>http://cvs.apache.org/maven-snapshot-repository</url>
+    <snapshots>
+    <enabled>true</enabled>
+    </snapshots>
+    </pluginRepository>
+    </pluginRepositories>
+
+   <properties>
+
+      <installDir>${java.io.tmpdir}/cargo-installs</installDir>
+
+      <ear.name>${artifactId}-${project.version}</ear.name>
+
+      <remoteServer>localhost</remoteServer>
+      <remotePort>8080</remotePort>
+      <remoteUsername>admin</remoteUsername>
+      <remotePassword></remotePassword>
+
+   </properties>
+
+</project>

Added: portlets/src/framework/Seam/ear/src/main/resources/META-INF/jboss-app.xml
===================================================================
--- portlets/src/framework/Seam/ear/src/main/resources/META-INF/jboss-app.xml	                        (rev 0)
+++ portlets/src/framework/Seam/ear/src/main/resources/META-INF/jboss-app.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,8 @@
+<!DOCTYPE jboss-app
+          PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN"
+          "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
+<jboss-app>
+    <loader-repository>
+        seam.jboss.org:loader=SeamPortlet
+    </loader-repository>
+</jboss-app>

Added: portlets/src/framework/Seam/ejb/pom.xml
===================================================================
--- portlets/src/framework/Seam/ejb/pom.xml	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/pom.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+   <modelVersion>4.0.0</modelVersion>
+   <parent>
+      <groupId>org.jboss.portal.example</groupId>
+      <artifactId>JBossPortalExample</artifactId>
+      <version>1.0</version>
+   </parent>
+   <groupId>org.jboss.portal.example</groupId>
+   <artifactId>SeamBookingPortletEjb</artifactId>
+   <packaging>ejb</packaging>
+   <version>1.0</version>
+   <name>JBoss Portal Seam Booking Portlet Example EJB</name>
+
+   <dependencies>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam</artifactId>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam-ui</artifactId>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam-pdf</artifactId>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam-remoting</artifactId>
+         <version>2.0.0.CR1</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam-ioc</artifactId>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam-ioc</artifactId>
+         <scope>provided</scope>
+      </dependency>
+
+
+      <dependency>
+         <groupId>com.sun.facelets</groupId>
+         <artifactId>jsf-facelets</artifactId>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-el</artifactId>
+         <scope>provided</scope>
+      </dependency>
+
+
+
+      <dependency>
+         <groupId>javax.faces</groupId>
+         <artifactId>jsf-api</artifactId>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>javax.faces</groupId>
+         <artifactId>jsf-impl</artifactId>
+         <scope>provided</scope>
+      </dependency>
+
+
+      <dependency>
+         <groupId>org.jboss.embedded</groupId>
+         <artifactId>hibernate-all</artifactId>
+         <version>beta2</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>apache-log4j</groupId>
+         <artifactId>log4j</artifactId>
+         <version>1.2.8</version>
+         <scope>provided</scope>
+      </dependency>
+
+
+      <dependency>
+         <groupId>org.jboss.embedded</groupId>
+         <artifactId>jboss-embedded-all</artifactId>
+         <version>beta2</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>javax.servlet</groupId>
+         <artifactId>servlet-api</artifactId>
+         <version>2.5</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>commons-lang</groupId>
+         <artifactId>commons-lang</artifactId>
+         <version>2.1</version>
+         <scope>provided</scope>
+      </dependency>
+
+
+
+      <dependency>
+         <groupId>javax.xml</groupId>
+         <artifactId>jaxb-api</artifactId>
+         <version>2.0EA3</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>javax.xml</groupId>
+         <artifactId>jaxb-impl</artifactId>
+         <version>2.0EA3</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>portlet-api</groupId>
+         <artifactId>portlet-api</artifactId>
+         <version>1.0</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+            <groupId>javax.faces</groupId>
+            <artifactId>jsf-impl</artifactId>
+            <version>1.2_05</version>
+            <scope>provided</scope>
+         </dependency>
+         <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+         </dependency>
+         <dependency>
+            <groupId>javax.servlet.jsp</groupId>
+            <artifactId>jsp-api</artifactId>
+            <version>2.1</version>
+            <scope>provided</scope>
+         </dependency>
+      
+       <dependency>
+          <groupId>commons-logging</groupId>
+         <artifactId>commons-logging</artifactId>
+          <version>1.0.4</version>
+          <scope>provided</scope>
+       </dependency>
+
+      <dependency>
+         <groupId>org.richfaces.framework</groupId>
+         <artifactId>richfaces-impl</artifactId>
+         <version>3.2.0-SNAPSHOT</version>
+         <scope>provided</scope>
+         <exclusions>
+            <exclusion>
+               <groupId>commons-logging</groupId>
+               <artifactId>commons-logging</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>junit</groupId>
+               <artifactId>junit</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-api</artifactId>
+            </exclusion>
+
+            <exclusion>
+               <groupId>javax.servlet</groupId>
+               <artifactId>servlet-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-impl</artifactId>
+            </exclusion>
+
+         </exclusions>
+      </dependency>
+
+   </dependencies>
+
+
+   <build>
+
+      <resources>
+
+         <resource>
+            <filtering>false</filtering>
+            <directory>${basedir}/src/main/resources</directory>
+            <includes>
+               <include>log4j.xml</include>
+               <include>login-config.xml</include>
+               <include>META-INF/ejb-jar.xml</include>
+               <include>META-INF/persistence.xml</include>
+            </includes>
+            <excludes>
+               <exclude>*-ds.xml</exclude>
+            </excludes>
+         </resource>
+
+         <resource>
+            <filtering>false</filtering>
+            <directory>${basedir}/src/main/resources/properties</directory>
+            <includes>
+               <include>*.properties</include>
+            </includes>
+         </resource>
+
+      </resources>
+      <plugins>
+         <plugin>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <configuration>
+               <encoding>iso-8859-1</encoding>
+            </configuration>
+         </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-ejb-plugin</artifactId>
+            <configuration>
+               <!--
+                   <generateClient>true</generateClient>
+                   <clientExcludes>
+                   <clientExclude>**/ejb/*Bean.class</clientExclude>
+                   </clientExcludes>
+               -->
+            </configuration>
+         </plugin>
+         <!--<plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <version>2.2</version>
+            <configuration>
+               <suiteXmlFiles>
+                  <suiteXmlFile>src/test/java/com/jboss/dvd/seam/testng.xml</suiteXmlFile>
+               </suiteXmlFiles>
+            </configuration>
+         </plugin>-->
+
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-jar-plugin</artifactId>
+            <configuration>
+               <archive>
+                  <manifest>
+                     <addClasspath>true</addClasspath>
+                  </manifest>
+               </archive>
+            </configuration>
+         </plugin>
+      </plugins>
+
+   </build>
+
+   <profiles>
+
+      <profile>
+         <id>tomcat</id>
+         <activation>
+            <activeByDefault>false</activeByDefault>
+         </activation>
+
+         <build>
+            <resources>
+
+               <resource>
+                  <filtering>false</filtering>
+                  <directory>${basedir}/src/main/resources</directory>
+                  <includes>
+                        <include>security.drl</include>
+                  </includes>
+                  <excludes>
+                     <exclude>*-ds.xml</exclude>
+                  </excludes>
+               </resource>
+
+            </resources>
+         </build>
+
+      </profile>
+
+
+   </profiles>
+
+</project>

Added: portlets/src/framework/Seam/ejb/src/main/java/com/sun/facelets/FaceletPortletViewHandler.java
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/java/com/sun/facelets/FaceletPortletViewHandler.java	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/java/com/sun/facelets/FaceletPortletViewHandler.java	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,54 @@
+package com.sun.facelets;
+
+   import java.io.IOException;
+
+  import javax.faces.FacesException;
+  import javax.faces.application.ViewHandler;
+  import javax.faces.context.ExternalContext;
+  import javax.faces.context.FacesContext;
+  import javax.faces.context.ResponseWriter;
+  import javax.faces.render.RenderKit;
+  import javax.portlet.RenderRequest;
+  import javax.portlet.RenderResponse;
+
+  /**
+   * ViewHandler implementation for Facelets used in Portlets
+   *
+   */
+  public class FaceletPortletViewHandler extends FaceletViewHandler {
+
+      public FaceletPortletViewHandler(ViewHandler parent) {
+          super(parent);
+      }
+
+      protected ResponseWriter createResponseWriter(FacesContext context)
+              throws IOException, FacesException {
+          ExternalContext extContext = context.getExternalContext();
+          RenderKit renderKit = context.getRenderKit();
+
+          RenderRequest request = (RenderRequest) extContext.getRequest();
+          RenderResponse response = (RenderResponse) extContext.getResponse();
+
+          String contenttype = request.getResponseContentType();
+          if (contenttype == null) {
+              contenttype = "text/html";
+          }
+
+          String encoding = response.getCharacterEncoding();
+          if (encoding == null) {
+              encoding = "ISO-8859-1";
+          }
+
+          ResponseWriter writer = renderKit.createResponseWriter(NullWriter.Instance, contenttype, encoding);
+
+          contenttype = writer.getContentType();
+
+          // apply them to the response
+          response.setContentType(contenttype);
+
+          // Now, clone with the real writer
+          writer = writer.cloneWithWriter(response.getWriter());
+
+          return writer;
+      }
+  }

Added: portlets/src/framework/Seam/ejb/src/main/java/com/testapp/Authenticator.java
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/java/com/testapp/Authenticator.java	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/java/com/testapp/Authenticator.java	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,25 @@
+package com.testapp;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.security.Identity;
+
+ at Name("authenticator")
+public class Authenticator {
+	@Logger
+	Log log;
+
+	@In
+	Identity identity;
+
+	public boolean authenticate() {
+		log.info("authenticating #0", identity.getUsername());
+		//write your authentication logic here,
+		//return true if the authentication was
+		//successful, false otherwise
+		identity.addRole("admin");
+		return true;
+	}
+}

Added: portlets/src/framework/Seam/ejb/src/main/java/com/testapp/ObserveInitialization.java
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/java/com/testapp/ObserveInitialization.java	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/java/com/testapp/ObserveInitialization.java	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,46 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package com.testapp;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.security.Identity;
+
+import javax.persistence.EntityManager;
+
+/**
+ * @author <a href="mailto:whales at redhat.com">Wesley Hales</a>
+ * @version $Revision: 630 $
+ */
+ at Name("observeInitialization")
+public class ObserveInitialization {
+   @In
+   EntityManager entityManager;
+
+   @Observer("org.jboss.seam.postInitialize")
+   public void observe() {
+      System.out.println("-------------------------------------observer");
+      Identity.setSecurityEnabled(false);
+   }
+}

Added: portlets/src/framework/Seam/ejb/src/main/java/com/testapp/SecurityHelper.java
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/java/com/testapp/SecurityHelper.java	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/java/com/testapp/SecurityHelper.java	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,46 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package com.testapp;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.security.Identity;
+
+import javax.persistence.EntityManager;
+
+/**
+ * @author <a href="mailto:whales at redhat.com">Wesley Hales</a>
+ * @version $Revision: 630 $
+ */
+ at Name("securityHelper")
+public class SecurityHelper {
+   @In
+   EntityManager entityManager;
+
+   @Observer("org.jboss.seam.postInitialize")
+   public void observe() {
+      System.out.println("-------------------------------------observer");
+      Identity.setSecurityEnabled(false);
+   }
+}

Added: portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/contexts/Contexts.java
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/contexts/Contexts.java	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/contexts/Contexts.java	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,431 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.contexts;
+
+import java.util.Map;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.bpm.BusinessProcess;
+import org.jboss.seam.core.Events;
+import org.jboss.seam.core.Init;
+import org.jboss.seam.core.Manager;
+import org.jboss.seam.core.Mutable;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
+import org.jboss.seam.transaction.Transaction;
+import org.jboss.seam.web.Session;
+
+/**
+ * Provides access to the current contexts associated with the thread.
+ *
+ * @author Gavin King
+ * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
+ */
+public class Contexts
+{
+
+   private static final LogProvider log = Logging.getLogProvider(Contexts.class);
+
+   static final ThreadLocal<Context> applicationContext = new ThreadLocal<Context>();
+   static final ThreadLocal<Context> methodContext = new ThreadLocal<Context>();
+   static final ThreadLocal<Context> eventContext = new ThreadLocal<Context>();
+   static final ThreadLocal<Context> pageContext = new ThreadLocal<Context>();
+   static final ThreadLocal<Context> sessionContext = new ThreadLocal<Context>();
+   static final ThreadLocal<Context> conversationContext = new ThreadLocal<Context>();
+   static final ThreadLocal<Context> businessProcessContext = new ThreadLocal<Context>();
+
+   public static Context getEventContext()
+   {
+      return eventContext.get();
+   }
+
+   public static Context getMethodContext()
+   {
+      return methodContext.get();
+   }
+
+   public static Context getPageContext()
+   {
+      return pageContext.get();
+   }
+
+   public static Context getSessionContext()
+   {
+      return sessionContext.get();
+   }
+
+   public static Context getApplicationContext()
+   {
+      return applicationContext.get();
+   }
+
+   public static Context getConversationContext()
+   {
+      return conversationContext.get();
+   }
+
+   public static Context getBusinessProcessContext()
+   {
+      return businessProcessContext.get();
+   }
+
+   public static boolean isConversationContextActive()
+   {
+      return getConversationContext() != null;
+   }
+
+   public static boolean isEventContextActive()
+   {
+      return eventContext.get() != null;
+   }
+
+   public static boolean isMethodContextActive()
+   {
+      return methodContext.get() != null;
+   }
+
+   public static boolean isPageContextActive()
+   {
+      return pageContext.get() != null;
+   }
+
+   public static boolean isSessionContextActive()
+   {
+      return sessionContext.get() != null;
+   }
+
+   public static boolean isApplicationContextActive()
+   {
+      return applicationContext.get() != null;
+   }
+
+    public static boolean isBusinessProcessContextActive()
+    {
+        return businessProcessContext.get() != null;
+    }
+
+    /**
+     * Remove the named component from all contexts.
+     */
+   public static void removeFromAllContexts(String name)
+   {
+      log.debug("removing from all contexts: " + name);
+      if (isMethodContextActive())
+      {
+         getMethodContext().remove(name);
+      }
+      if (isEventContextActive())
+      {
+         getEventContext().remove(name);
+      }
+      if (isPageContextActive())
+      {
+         getPageContext().remove(name);
+      }
+      if (isConversationContextActive())
+      {
+         getConversationContext().remove(name);
+      }
+      if (isSessionContextActive())
+      {
+         getSessionContext().remove(name);
+      }
+      if (isBusinessProcessContextActive())
+      {
+         getBusinessProcessContext().remove(name);
+      }
+      if (isApplicationContextActive())
+      {
+         getApplicationContext().remove(name);
+      }
+   }
+
+   /**
+    * Search for a named attribute in all contexts, in the
+    * following order: method, event, page, conversation,
+    * session, business process, application.
+    *
+    * @return the first component found, or null
+    */
+   public static Object lookupInStatefulContexts(String name)
+   {
+      if (isMethodContextActive())
+      {
+         Object result = getMethodContext().get(name);
+         if (result!=null)
+         {
+            log.debug("found in method context: " + name);
+            return result;
+         }
+      }
+
+      if (isEventContextActive())
+      {
+         Object result = getEventContext().get(name);
+         if (result!=null)
+         {
+            log.debug("found in event context: " + name);
+            return result;
+         }
+      }
+
+      if ( isPageContextActive() )
+      {
+         Object result = getPageContext().get(name);
+         if (result!=null)
+         {
+            log.debug("found in page context: " + name);
+            return result;
+         }
+      }
+
+      if (isConversationContextActive())
+      {
+         Object result = getConversationContext().get(name);
+         if (result!=null)
+         {
+            log.debug("found in conversation context: " + name);
+            return result;
+         }
+      }
+
+      if (isSessionContextActive())
+      {
+         Object result = getSessionContext().get(name);
+         if (result!=null)
+         {
+            log.debug("found in session context: " + name);
+            return result;
+         }
+      }
+
+      if (isBusinessProcessContextActive())
+      {
+         Object result = getBusinessProcessContext().get(name);
+         if (result!=null)
+         {
+            log.debug("found in business process context: " + name);
+            return result;
+         }
+      }
+
+      if (isApplicationContextActive())
+      {
+         Object result = getApplicationContext().get(name);
+         if (result!=null)
+         {
+            log.debug("found in application context: " + name);
+            return result;
+         }
+      }
+
+      return null;
+
+   }
+
+   /**
+    * Destroy all components in the given context
+    */
+   static void destroy(Context context)
+   {
+      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preDestroyContext." + context.getType().toString());
+
+      Lifecycle.startDestroying();
+      try
+      {
+         for ( String name: context.getNames() )
+         {
+            Component component = Component.forName(name);
+            log.debug("destroying: " + name);
+            if ( component!=null )
+            {
+               Object object = context.get(name);
+               if (object!=null) //in a portal environment, this is possible
+               {
+                  if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preDestroy." + name);
+                  component.destroy(object);
+               }
+            }
+         }
+      }
+      finally
+      {
+         Lifecycle.stopDestroying();
+      }
+
+      if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postDestroyContext." + context.getType().toString());
+   }
+
+   /**
+    * Startup all @Startup components in the given scope
+    */
+   static void startup(ScopeType scopeType)
+   {
+      Context context = Contexts.getApplicationContext();
+      for ( String name: context.getNames() )
+      {
+         Object object = context.get(name);
+         if ( object!=null && (object instanceof Component) )
+         {
+            Component component = (Component) object;
+            if ( component.isStartup() && component.getScope()==scopeType )
+            {
+               startup(component);
+            }
+         }
+      }
+   }
+
+   /**
+    * Startup a component and all its dependencies
+    */
+   static void startup(Component component)
+   {
+      if ( component.isStartup() )
+      {
+         for ( String dependency: component.getDependencies() )
+         {
+            Component dependentComponent = Component.forName(dependency);
+            if (dependentComponent!=null)
+            {
+               startup(dependentComponent);
+            }
+         }
+      }
+
+      if ( !component.getScope().getContext().isSet( component.getName() ) )
+      {
+         log.info( "starting up: " + component.getName() );
+         //if (component.getName().equals("org.jboss.seam.security.identity")){
+         //log.info( "no identity: " + component.getName() );
+         //}else{
+         component.newInstance();
+         //}
+
+      }
+   }
+
+   /**
+    * Does this context attribute need to be force-replicated?
+    */
+   static boolean isAttributeDirty(Object attribute)
+   {
+      return attribute instanceof Mutable && ( (Mutable) attribute ).clearDirty();
+   }
+
+   /**
+    * At the end of a request, flush all contexts to their underlying
+    * persistent stores, or destroy their attributes (one or the other!).
+    */
+   static void flushAndDestroyContexts()
+   {
+
+      if ( isConversationContextActive() )
+      {
+
+         if ( isBusinessProcessContextActive() )
+         {
+            boolean transactionActive = false;
+            try
+            {
+               transactionActive = Transaction.instance().isActive();
+            }
+            catch (Exception e)
+            {
+               log.error("could not discover transaction status");
+            }
+            if (transactionActive)
+            {
+               //in calls to MDBs and remote calls to SBs, the
+               //transaction doesn't commit until after contexts
+               //are destroyed, so pre-emptively flush here:
+               getBusinessProcessContext().flush();
+            }
+
+            //TODO: it would be nice if BP context spanned redirects along with the conversation
+            //      this would also require changes to BusinessProcessContext
+            boolean destroyBusinessProcessContext = !Init.instance().isJbpmInstalled() ||
+                  !BusinessProcess.instance().hasActiveProcess();
+            if (destroyBusinessProcessContext)
+            {
+               //TODO: note that this occurs from Lifecycle.endRequest(), after
+               //      the Seam-managed txn was committed, but Contexts.destroy()
+               //      calls BusinessProcessContext.getNames(), which hits the
+               //      database!
+               log.debug("destroying business process context");
+               destroy( getBusinessProcessContext() );
+            }
+         }
+
+         if ( !Manager.instance().isLongRunningConversation() )
+         {
+            log.debug("destroying conversation context");
+            destroy( getConversationContext() );
+         }
+         /*if ( !Init.instance().isClientSideConversations() )
+         {*/
+            //note that we need to flush even if the session is
+            //about to be invalidated, since we still need
+            //to destroy the conversation context in endSession()
+            log.debug("flushing server-side conversation context");
+            getConversationContext().flush();
+        //}
+
+         //uses the event and session contexts
+         if ( Session.getInstance()!=null )
+         {
+            Manager.instance().unlockConversation();
+         }
+
+      }
+
+      if ( isSessionContextActive() )
+      {
+         log.debug("flushing session context");
+         getSessionContext().flush();
+      }
+
+      //destroy the event context after the
+      //conversation context, since we need
+      //the manager to flush() conversation
+      if ( isEventContextActive() )
+      {
+         log.debug("destroying event context");
+         destroy( getEventContext() );
+      }
+
+   }
+
+   /**
+    * Destroy a conversation context that is not currently bound to the request, called
+    * due to a timeout.
+    *
+    * @param session the current session, to which both current and destroyed conversation belong
+    * @param conversationId the conversation id of the conversation to be destroyed
+    */
+   static void destroyConversationContext(Map<String, Object> session, String conversationId)
+   {
+      Context current = getConversationContext();
+      ServerConversationContext temp = new ServerConversationContext(session, conversationId);
+      conversationContext.set(temp);
+      try
+      {
+         destroy(temp);
+         if ( !Session.instance().isInvalid() ) //its also unnecessary during a session timeout
+         {
+            temp.clear();
+            temp.flush();
+         }
+      }
+      finally
+      {
+         conversationContext.set(current);
+      }
+   }
+
+}

Added: portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/jsf/SeamPhaseListener.java	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,601 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.jsf;
+
+import static javax.faces.event.PhaseId.ANY_PHASE;
+import static javax.faces.event.PhaseId.INVOKE_APPLICATION;
+import static javax.faces.event.PhaseId.PROCESS_VALIDATIONS;
+import static javax.faces.event.PhaseId.RENDER_RESPONSE;
+import static javax.faces.event.PhaseId.RESTORE_VIEW;
+
+import java.lang.reflect.Method;
+import java.util.Map;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+
+import org.jboss.seam.Seam;
+import org.jboss.seam.contexts.Context;
+import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.contexts.FacesLifecycle;
+import org.jboss.seam.core.ConversationList;
+import org.jboss.seam.core.ConversationPropagation;
+import org.jboss.seam.core.ConversationStack;
+import org.jboss.seam.core.Events;
+import org.jboss.seam.core.Init;
+import org.jboss.seam.core.Manager;
+import org.jboss.seam.exception.Exceptions;
+import org.jboss.seam.faces.FacesManager;
+import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.faces.FacesPage;
+import org.jboss.seam.faces.Switcher;
+import org.jboss.seam.faces.Validation;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
+import org.jboss.seam.navigation.Pages;
+import org.jboss.seam.pageflow.Pageflow;
+import org.jboss.seam.persistence.PersistenceContexts;
+import org.jboss.seam.transaction.Transaction;
+import org.jboss.seam.util.Reflections;
+
+/**
+ * Manages the Seam contexts associated with a JSF request
+ * throughout the lifecycle of the request. Performs
+ * transaction demarcation when Seam transaction management
+ * is enabled. Hacks the JSF lifecyle to provide page
+ * actions and page parameters.
+ *
+ * @author Gavin King
+ */
+public class SeamPhaseListener implements PhaseListener
+{
+   private static final long serialVersionUID = -9127555729455066493L;
+
+   private static final LogProvider log = Logging.getLogProvider(SeamPhaseListener.class);
+
+   private static boolean exists = false;
+
+   private static final Method SET_RENDER_PARAMETER;
+   private static final Class ACTION_RESPONSE;
+   private static final Class PORTLET_REQUEST;
+
+   static
+   {
+      Method method = null;
+      Class actionResponseClass = null;
+      Class portletRequestClass = null;
+      try
+      {
+         Class[] parameterTypes = { String.class, String.class };
+         actionResponseClass = Class.forName("javax.portlet.ActionResponse");
+         portletRequestClass = Class.forName("javax.portlet.PortletRequest");
+         method = actionResponseClass.getMethod("setRenderParameter", parameterTypes);
+      }
+      catch (Exception e) {}
+      SET_RENDER_PARAMETER = method;
+      ACTION_RESPONSE = actionResponseClass;
+      PORTLET_REQUEST = portletRequestClass;
+   }
+
+   public SeamPhaseListener()
+   {
+      if (exists)
+      {
+         log.warn("There should only be one Seam phase listener per application");
+      }
+      exists=true;
+   }
+
+   public PhaseId getPhaseId()
+   {
+      return ANY_PHASE;
+   }
+
+   public void beforePhase(PhaseEvent event)
+   {
+      log.trace( "before phase: " + event.getPhaseId() );
+
+      FacesLifecycle.setPhaseId( event.getPhaseId() );
+
+      try
+      {
+         if ( isPortletRequest(event) )
+         {
+            beforePortletPhase(event);
+         }
+         else
+         {
+            beforeServletPhase(event);
+         }
+         raiseEventsBeforePhase(event);
+      }
+      catch (Exception e)
+      {
+         log.error("uncaught exception", e);
+         try
+         {
+            Exceptions.instance().handle(e);
+         }
+         catch (Exception ehe)
+         {
+            log.error("swallowing exception", e);
+         }
+      }
+
+   }
+
+   private void beforeServletPhase(PhaseEvent event)
+   {
+      if ( event.getPhaseId() == RESTORE_VIEW )
+      {
+         beforeRestoreView( event.getFacesContext() );
+      }
+
+      handleTransactionsBeforePhase(event);
+
+      if ( event.getPhaseId() == RENDER_RESPONSE )
+      {
+         beforeRenderResponse( event.getFacesContext() );
+      }
+
+   }
+
+   private void beforePortletPhase(PhaseEvent event)
+   {
+
+      FacesContext facesContext = event.getFacesContext();
+
+      if ( event.getPhaseId() == RESTORE_VIEW || event.getPhaseId() == RENDER_RESPONSE )
+      {
+         beforeRestoreView(facesContext);
+      }
+
+      //delegate to subclass:
+      handleTransactionsBeforePhase(event);
+
+      if ( event.getPhaseId() == RENDER_RESPONSE )
+      {
+         afterRestoreView(facesContext);
+         beforeRenderResponse( event.getFacesContext() );
+      }
+   }
+
+   public void afterPhase(PhaseEvent event)
+   {
+      log.trace( "after phase: " + event.getPhaseId() );
+
+      try
+      {
+         raiseEventsAfterPhase(event);
+         if ( isPortletRequest(event) )
+         {
+            afterPortletPhase(event);
+         }
+         else
+         {
+            afterServletPhase(event);
+         }
+      }
+      catch (Exception e)
+      {
+         log.error("uncaught exception", e);
+         try
+         {
+            Exceptions.instance().handle(e);
+         }
+         catch (Exception ehe)
+         {
+            log.error("swallowing exception", e);
+         }
+      }
+
+      FacesLifecycle.clearPhaseId();
+
+   }
+
+   private void afterServletPhase(PhaseEvent event)
+   {
+
+      FacesContext facesContext = event.getFacesContext();
+
+      if ( event.getPhaseId() == RESTORE_VIEW )
+      {
+         afterRestoreView(facesContext);
+      }
+      else if ( event.getPhaseId() == INVOKE_APPLICATION )
+      {
+         afterInvokeApplication();
+      }
+      else if ( event.getPhaseId() == PROCESS_VALIDATIONS )
+      {
+         afterProcessValidations(facesContext);
+      }
+
+      //has to happen after, since restoreAnyConversationContext()
+      //can add messages
+      FacesMessages.afterPhase();
+
+      handleTransactionsAfterPhase(event);
+
+      if ( event.getPhaseId() == RENDER_RESPONSE )
+      {
+         afterRenderResponse(facesContext);
+      }
+      else if ( facesContext.getResponseComplete() )
+      {
+         afterResponseComplete(facesContext);
+      }
+   }
+
+   private void afterPortletPhase(PhaseEvent event)
+   {
+      FacesContext facesContext = event.getFacesContext();
+
+      if ( event.getPhaseId() == RESTORE_VIEW )
+      {
+         afterRestoreView(facesContext);
+      }
+      else if ( event.getPhaseId() == INVOKE_APPLICATION )
+      {
+         afterInvokeApplication();
+      }
+      else if ( event.getPhaseId() == PROCESS_VALIDATIONS )
+      {
+         afterProcessValidations(facesContext);
+      }
+
+      FacesMessages.afterPhase();
+
+      //delegate to subclass:
+      handleTransactionsAfterPhase(event);
+
+      if ( event.getPhaseId() == RENDER_RESPONSE )
+      {
+         //writeConversationIdToResponse( facesContext.getExternalContext().getResponse() );
+         afterRenderResponse(facesContext);
+      }
+      else if ( event.getPhaseId() == INVOKE_APPLICATION || facesContext.getRenderResponse() || facesContext.getResponseComplete() )
+      {
+         Manager manager = Manager.instance();
+         manager.beforeRedirect();
+         if ( manager.isLongRunningConversation() )
+         {
+            setPortletRenderParameter(
+                  facesContext.getExternalContext().getResponse(),
+                  manager.getConversationIdParameter(),
+                  manager.getCurrentConversationId()
+               );
+         }
+         afterResponseComplete(facesContext);
+      }
+
+   }
+
+   private static void setPortletRenderParameter(Object response, String conversationIdParameter, String conversationId)
+   {
+      if ( ACTION_RESPONSE.isInstance(response) )
+      {
+         Reflections.invokeAndWrap(SET_RENDER_PARAMETER, response, conversationIdParameter, conversationId);
+      }
+   }
+
+   private static boolean isPortletRequest(PhaseEvent event)
+   {
+      return PORTLET_REQUEST!=null &&
+            PORTLET_REQUEST.isInstance( event.getFacesContext().getExternalContext().getRequest() );
+   }
+
+   public void handleTransactionsBeforePhase(PhaseEvent event)
+   {
+      if ( Init.instance().isTransactionManagementEnabled() )
+      {
+         try{
+         PhaseId phaseId = event.getPhaseId();
+         boolean beginTran = phaseId == PhaseId.RENDER_RESPONSE ||
+               phaseId == ( Transaction.instance().isConversationContextRequired() ? PhaseId.APPLY_REQUEST_VALUES : PhaseId.RESTORE_VIEW );
+               //( phaseId == PhaseId.RENDER_RESPONSE && !Init.instance().isClientSideConversations() );
+
+         if (beginTran)
+         {
+            begin(phaseId);
+         }
+         }catch(Exception e){
+            log.error("-----------------swallow");
+            e.printStackTrace();
+         }
+      }
+   }
+
+   public void handleTransactionsAfterPhase(PhaseEvent event)
+   {
+      if ( Init.instance().isTransactionManagementEnabled() )
+      {
+         PhaseId phaseId = event.getPhaseId();
+         boolean commitTran = phaseId == PhaseId.INVOKE_APPLICATION ||
+               event.getFacesContext().getRenderResponse() || //TODO: no need to commit the tx if we failed to restore the view
+               event.getFacesContext().getResponseComplete() ||
+               phaseId == PhaseId.RENDER_RESPONSE;
+               //( phaseId == PhaseId.RENDER_RESPONSE && !Init.instance().isClientSideConversations() );
+
+         if (commitTran)
+         {
+            commitOrRollback(phaseId); //we commit before destroying contexts, cos the contexts have the PC in them
+         }
+      }
+   }
+
+   protected void handleTransactionsAfterPageActions(FacesContext facesContext)
+   {
+      if ( Init.instance().isTransactionManagementEnabled() )
+      {
+         commitOrRollback(PhaseId.INVOKE_APPLICATION);
+         if ( !facesContext.getResponseComplete() )
+         {
+            begin(PhaseId.INVOKE_APPLICATION);
+         }
+      }
+   }
+
+   protected void afterInvokeApplication()
+   {
+      if ( Init.instance().isTransactionManagementEnabled() )
+      {
+         addTransactionFailedMessage();
+      }
+   }
+
+   protected void afterProcessValidations(FacesContext facesContext)
+   {
+      Validation.instance().afterProcessValidations(facesContext);
+   }
+
+   /**
+    * Set up the Seam contexts, except for the conversation
+    * context
+    */
+   protected void beforeRestoreView(FacesContext facesContext)
+   {
+      FacesLifecycle.beginRequest( facesContext.getExternalContext() );
+   }
+
+   /**
+    * Restore the page and conversation contexts during a JSF request
+    */
+   protected void afterRestoreView(FacesContext facesContext)
+   {
+      FacesLifecycle.resumePage();
+      Map parameters = facesContext.getExternalContext().getRequestParameterMap();
+      ConversationPropagation.instance().restoreConversationId(parameters);
+      boolean conversationFound = Manager.instance().restoreConversation();
+      FacesLifecycle.resumeConversation( facesContext.getExternalContext() );
+      postRestorePage(facesContext, parameters, conversationFound);
+   }
+
+   public void raiseEventsBeforePhase(PhaseEvent event)
+   {
+      if ( Contexts.isApplicationContextActive() )
+      {
+         Events.instance().raiseEvent("org.jboss.seam.beforePhase", event);
+      }
+
+      /*if ( Contexts.isConversationContextActive() && Init.instance().isJbpmInstalled() && Pageflow.instance().isInProcess() )
+      {
+         String name;
+         PhaseId phaseId = event.getPhaseId();
+         if ( phaseId == PhaseId.PROCESS_VALIDATIONS )
+         {
+            name = "process-validations";
+         }
+         else if ( phaseId == PhaseId.UPDATE_MODEL_VALUES )
+         {
+            name = "update-model-values";
+         }
+         else if ( phaseId == PhaseId.INVOKE_APPLICATION )
+         {
+            name = "invoke-application";
+         }
+         else if ( phaseId == PhaseId.RENDER_RESPONSE )
+         {
+            name = "render-response";
+         }
+         else
+         {
+            return;
+         }
+         Pageflow.instance().processEvents(name);
+      }*/
+   }
+
+   public void raiseEventsAfterPhase(PhaseEvent event)
+   {
+      if ( Contexts.isApplicationContextActive() )
+      {
+         Events.instance().raiseEvent("org.jboss.seam.afterPhase", event);
+      }
+   }
+
+   /**
+    * Add a faces message when Seam-managed transactions fail.
+    */
+   protected void addTransactionFailedMessage()
+   {
+      try
+      {
+         if ( Transaction.instance().isRolledBackOrMarkedRollback() )
+         {
+            FacesMessages.instance().addFromResourceBundleOrDefault(
+                     FacesMessage.SEVERITY_WARN,
+                     "org.jboss.seam.TransactionFailed",
+                     "Transaction failed"
+                  );
+         }
+      }
+      catch (Exception e) {} //swallow silently, not important
+   }
+
+   protected void beforeRenderResponse(FacesContext facesContext)
+   {
+
+      if ( Contexts.isPageContextActive() )
+      {
+         Context pageContext = Contexts.getPageContext();
+         //after every time that the view may have changed,
+         //we need to flush the page context, since the
+         //attribute map is being discarder
+         pageContext.flush();
+         //force refresh of the conversation lists (they are kept in PAGE context)
+         pageContext.remove(Seam.getComponentName(Switcher.class));
+         pageContext.remove("org.jboss.seam.core.conversationList");
+         pageContext.remove("org.jboss.seam.core.conversationStack");
+      }
+
+      preRenderPage(facesContext);
+
+      if ( facesContext.getResponseComplete() )
+      {
+         //workaround for a bug in MyFaces prior to 1.1.3
+         if ( Init.instance().isMyFacesLifecycleBug() )
+         {
+            FacesLifecycle.endRequest( facesContext.getExternalContext() );
+         }
+      }
+      else //if the page actions did not call responseComplete()
+      {
+         FacesMessages.instance().beforeRenderResponse();
+         //do this both before and after render, since conversations
+         //and pageflows can begin during render
+         FacesManager.instance().prepareBackswitch(facesContext);
+      }
+
+      FacesPage.instance().storeConversation();
+      FacesPage.instance().storePageflow();
+
+      PersistenceContexts persistenceContexts = PersistenceContexts.instance();
+      if (persistenceContexts != null)
+      {
+          persistenceContexts.beforeRender();
+      }
+   }
+
+   protected void afterRenderResponse(FacesContext facesContext)
+   {
+      //do this both before and after render, since conversations
+      //and pageflows can begin during render
+      FacesManager.instance().prepareBackswitch(facesContext);
+
+      PersistenceContexts persistenceContexts = PersistenceContexts.instance();
+      if (persistenceContexts != null)
+      {
+          persistenceContexts.afterRender();
+      }
+
+      ExternalContext externalContext = facesContext.getExternalContext();
+      Manager.instance().endRequest( externalContext.getSessionMap() );
+      FacesLifecycle.endRequest(externalContext);
+   }
+
+   protected void afterResponseComplete(FacesContext facesContext)
+   {
+      //responseComplete() was called by one of the other phases,
+      //so we will never get to the RENDER_RESPONSE phase
+      //Note: we can't call Manager.instance().beforeRedirect() here,
+      //since a redirect is not the only reason for a responseComplete
+      ExternalContext externalContext = facesContext.getExternalContext();
+      Manager.instance().endRequest( externalContext.getSessionMap() );
+      FacesLifecycle.endRequest( facesContext.getExternalContext() );
+   }
+
+   private void postRestorePage(FacesContext facesContext, Map parameters, boolean conversationFound)
+   {
+      if ( !Pages.isDebugPage() )
+      {
+         // Only redirect to no-conversation-view if a login redirect isn't required
+         if (!conversationFound && !Pages.instance().isLoginRedirectRequired(facesContext))
+         {
+            Pages.instance().redirectToNoConversationView();
+         }
+
+         Manager.instance().handleConversationPropagation(parameters);
+
+         if ( Init.instance().isJbpmInstalled() )
+         {
+            Pageflow.instance().validatePageflow(facesContext);
+         }
+
+         Pages.instance().postRestore(facesContext);
+      }
+   }
+
+   private boolean preRenderPage(FacesContext facesContext)
+   {
+      if ( Pages.isDebugPage() )
+      {
+         return false;
+      }
+      else
+      {
+         FacesLifecycle.setPhaseId(PhaseId.INVOKE_APPLICATION);
+         boolean actionsWereCalled = false;
+         try
+         {
+            actionsWereCalled = Pages.instance().preRender(facesContext);
+            return actionsWereCalled;
+         }
+         finally
+         {
+            FacesLifecycle.setPhaseId(PhaseId.RENDER_RESPONSE);
+            if (actionsWereCalled)
+            {
+               FacesMessages.afterPhase();
+               handleTransactionsAfterPageActions(facesContext); //TODO: does it really belong in the finally?
+            }
+         }
+      }
+   }
+
+   void begin(PhaseId phaseId)
+   {
+      try
+      {
+         if ( !Transaction.instance().isActiveOrMarkedRollback() )
+         {
+            log.debug("beginning transaction prior to phase: " + phaseId);
+            Transaction.instance().begin();
+         }
+      }
+      catch (Exception e)
+      {
+         throw new IllegalStateException("Could not start transaction", e);
+      }
+   }
+
+   void commitOrRollback(PhaseId phaseId)
+   {
+      try
+      {
+         if ( Transaction.instance().isActive() )
+         {
+            log.debug("committing transaction after phase: " + phaseId);
+            Transaction.instance().commit();
+         }
+         else if ( Transaction.instance().isRolledBackOrMarkedRollback() )
+         {
+            log.debug("rolling back transaction after phase: " + phaseId);
+            Transaction.instance().rollback();
+         }
+      }
+      catch (Exception e)
+      {
+         throw new IllegalStateException("Could not commit transaction", e);
+      }
+   }
+
+}

Added: portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/security/Identity.java
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/security/Identity.java	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/java/org/jboss/seam/security/Identity.java	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,716 @@
+package org.jboss.seam.security;
+
+import static org.jboss.seam.ScopeType.SESSION;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
+
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.security.Principal;
+import java.security.acl.Group;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
+import javax.faces.context.FacesContext;
+import javax.security.auth.Subject;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.Seam;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Startup;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.annotations.security.Restrict;
+import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.core.Events;
+import org.jboss.seam.core.Expressions;
+import org.jboss.seam.core.Expressions.MethodExpression;
+import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.faces.Selector;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
+import org.jboss.seam.persistence.PersistenceProvider;
+import org.jboss.seam.util.Strings;
+import org.jboss.seam.web.Session;
+
+/**
+ * API for authorization and authentication via
+ * Seam security. This base implementation
+ * supports role-based authorization only.
+ * Subclasses may add more sophisticated
+ * permissioning mechanisms.
+ *
+ * @author Shane Bryzak
+ *
+ */
+ at Name("org.jboss.seam.security.identity")
+ at Scope(SESSION)
+ at Install(precedence = BUILT_IN)
+ at BypassInterceptors
+ at Startup
+public class Identity extends Selector
+{
+   private static boolean securityEnabled = true;
+
+   public static final String ROLES_GROUP = "Roles";
+
+   private static final String LOGIN_TRIED = "org.jboss.seam.security.loginTried";
+
+   private static final long serialVersionUID = 3751659008033189259L;
+
+   private static final LogProvider log = Logging.getLogProvider(Identity.class);
+
+   private String username;
+   private String password;
+
+   private MethodExpression authenticateMethod;
+
+   private Principal principal;
+   private Subject subject;
+
+   private String jaasConfigName = null;
+
+   private List<String> preAuthenticationRoles = new ArrayList<String>();
+
+   private boolean authenticateEveryRequest = false;
+
+   /**
+    * Flag that indicates we are in the process of authenticating
+    */
+   private boolean authenticating = false;
+
+   @Override
+   protected String getCookieName()
+   {
+      return "org.jboss.seam.security.username";
+   }
+
+   @Create
+   public void create()
+   {
+      subject = new Subject();
+      initCredentialsFromCookie();
+   }
+
+   public static boolean isSecurityEnabled()
+   {
+      System.out.println("------------------------------------security false");
+      return securityEnabled;
+
+   }
+
+   public static void setSecurityEnabled(boolean enabled)
+   {
+      securityEnabled = enabled;
+   }
+
+   public boolean getAuthenticateEveryRequest()
+   {
+      return authenticateEveryRequest;
+   }
+
+   public void setAuthenticateEveryRequest(boolean authenticateEveryRequest)
+   {
+      this.authenticateEveryRequest = authenticateEveryRequest;
+   }
+
+   protected void initCredentialsFromCookie()
+   {
+      FacesContext ctx = FacesContext.getCurrentInstance();
+      if (ctx != null)
+      {
+         setCookiePath(ctx.getExternalContext().getRequestContextPath());
+      }
+
+      username = getCookieValue();
+      if (username!=null)
+      {
+         setCookieEnabled(true);
+         postRememberMe();
+      }
+      setDirty();
+   }
+
+   public void beginRequest() {}
+
+   public void endRequest() {}
+
+   protected void postRememberMe()
+   {
+      Events.instance().raiseEvent("org.jboss.seam.rememberMe");
+   }
+
+   public static Identity instance()
+   {
+      if ( !Contexts.isSessionContextActive() )
+      {
+         throw new IllegalStateException("No active session context");
+      }
+
+      Identity instance = (Identity) Component.getInstance(Identity.class, ScopeType.SESSION);
+
+      if (instance == null)
+      {
+         throw new IllegalStateException("No Identity could be created");
+      }
+
+      return instance;
+   }
+
+   public boolean isLoggedIn()
+   {
+      return isLoggedIn(true);
+   }
+
+   public boolean isLoggedIn(boolean attemptLogin)
+   {
+      if (!authenticating && attemptLogin && getPrincipal() == null && isCredentialsSet() &&
+          Contexts.isEventContextActive() &&
+          !Contexts.getEventContext().isSet(LOGIN_TRIED))
+      {
+         Contexts.getEventContext().set(LOGIN_TRIED, true);
+         quietLogin();
+      }
+
+      // If there is a principal set, then the user is logged in.
+      return getPrincipal() != null;
+   }
+
+   public Principal getPrincipal()
+   {
+      return principal;
+   }
+
+   public Subject getSubject()
+   {
+      return subject;
+   }
+
+   public boolean isCredentialsSet()
+   {
+      return username != null && password != null;
+   }
+
+   /**
+    * Performs an authorization check, based on the specified security expression.
+    *
+    * @param expr The security expression to evaluate
+    * @throws NotLoggedInException Thrown if the authorization check fails and
+    * the user is not authenticated
+    * @throws AuthorizationException Thrown if the authorization check fails and
+    * the user is authenticated
+    */
+   public void checkRestriction(String expr)
+   {
+      if ( !evaluateExpression(expr) )
+      {
+         if ( !isLoggedIn() )
+         {
+            Events.instance().raiseEvent("org.jboss.seam.notLoggedIn");
+            log.debug(String.format(
+               "Error evaluating expression [%s] - User not logged in", expr));
+            throw new NotLoggedInException();
+         }
+         else
+         {
+            Events.instance().raiseEvent("org.jboss.seam.notAuthorized");
+            throw new AuthorizationException(String.format(
+               "Authorization check failed for expression [%s]", expr));
+         }
+      }
+   }
+
+   public String login()
+   {
+      try
+      {
+         authenticate();
+         if ( log.isDebugEnabled() )
+         {
+            log.debug("Login successful for: " + getUsername());
+         }
+         addLoginSuccessfulMessage();
+         return "loggedIn";
+      }
+      catch (LoginException ex)
+      {
+         if ( log.isDebugEnabled() )
+         {
+             log.debug("Login failed for: " + getUsername(), ex);
+         }
+         addLoginFailedMessage(ex);
+         return null;
+      }
+   }
+
+   /**
+    * Attempts a quiet login, suppressing any login exceptions and not creating
+    * any faces messages. This method is intended to be used primarily as an
+    * internal API call, however has been made public for convenience.
+    */
+   public void quietLogin()
+   {
+      try
+      {
+         if (isCredentialsSet()) authenticate();
+      }
+      catch (LoginException ex) { }
+   }
+
+   protected void addLoginFailedMessage(LoginException ex)
+   {
+      FacesMessages.instance().addFromResourceBundleOrDefault(
+               getLoginFailedMessageSeverity(),
+               getLoginFailedMessageKey(),
+               getLoginFailedMessage(),
+               ex);
+   }
+
+   protected String getLoginFailedMessage()
+   {
+      return "Login failed";
+   }
+
+   protected Severity getLoginFailedMessageSeverity()
+   {
+      return FacesMessage.SEVERITY_INFO;
+   }
+
+   protected String getLoginFailedMessageKey()
+   {
+      return "org.jboss.seam.loginFailed";
+   }
+
+   protected void addLoginSuccessfulMessage()
+   {
+      FacesMessages.instance().addFromResourceBundleOrDefault(
+               getLoginSuccessfulMessageSeverity(),
+               getLoginSuccessfulMessageKey(),
+               getLoginSuccessfulMessage(),
+               getUsername());
+   }
+
+   protected Severity getLoginSuccessfulMessageSeverity()
+   {
+      return FacesMessage.SEVERITY_INFO;
+   }
+
+   protected String getLoginSuccessfulMessage()
+   {
+      return "Welcome, #0";
+   }
+
+   protected String getLoginSuccessfulMessageKey()
+   {
+      return "org.jboss.seam.loginSuccessful";
+   }
+
+   public void authenticate()
+      throws LoginException
+   {
+      // If we're already authenticated, then don't authenticate again
+      if (!isLoggedIn())
+      {
+         authenticate( getLoginContext() );
+      }
+   }
+
+   public void authenticate(LoginContext loginContext)
+      throws LoginException
+   {
+      try
+      {
+         authenticating = true;
+         preAuthenticate();
+         loginContext.login();
+         postAuthenticate();
+      }
+      finally
+      {
+         authenticating = false;
+      }
+   }
+
+   protected void preAuthenticate()
+   {
+      unAuthenticate();
+      preAuthenticationRoles.clear();
+      Events.instance().raiseEvent("org.jboss.seam.preAuthenticate");
+   }
+
+   protected void postAuthenticate()
+   {
+      // Populate the working memory with the user's principals
+      for ( Principal p : getSubject().getPrincipals() )
+      {
+         if ( !(p instanceof Group))
+         {
+            if (principal == null)
+            {
+               principal = p;
+               setDirty();
+               break;
+            }
+         }
+      }
+
+      if (!preAuthenticationRoles.isEmpty() && isLoggedIn())
+      {
+         for (String role : preAuthenticationRoles)
+         {
+            addRole(role);
+         }
+         preAuthenticationRoles.clear();
+      }
+
+      if ( !isRememberMe() ) clearCookieValue();
+      setCookieValueIfEnabled( getUsername() );
+
+      password = null;
+      setDirty();
+
+      Events.instance().raiseEvent("org.jboss.seam.postAuthenticate");
+   }
+
+   /**
+    * Removes all Role objects from the security context, removes the "Roles"
+    * group from the user's subject.
+    *
+    */
+   protected void unAuthenticate()
+   {
+      principal = null;
+
+      for ( Group sg : getSubject().getPrincipals(Group.class) )
+      {
+         if ( ROLES_GROUP.equals( sg.getName() ) )
+         {
+            getSubject().getPrincipals().remove(sg);
+            break;
+         }
+      }
+   }
+
+   protected LoginContext getLoginContext() throws LoginException
+   {
+      if (getJaasConfigName() != null)
+      {
+         return new LoginContext(getJaasConfigName(), getSubject(),
+                  getDefaultCallbackHandler());
+      }
+
+      return new LoginContext(Configuration.DEFAULT_JAAS_CONFIG_NAME,
+               getSubject(), getDefaultCallbackHandler(), Configuration.instance());
+   }
+
+   public void logout()
+   {
+      principal = null;
+      Session.instance().invalidate();
+      Events.instance().raiseEvent("org.jboss.seam.loggedOut");
+   }
+
+   /**
+    * Checks if the authenticated Identity is a member of the specified role.
+    *
+    * @param role String The name of the role to check
+    * @return boolean True if the user is a member of the specified role
+    */
+   public boolean hasRole(String role)
+   {
+      isLoggedIn(true);
+
+      for ( Group sg : getSubject().getPrincipals(Group.class) )
+      {
+         if ( ROLES_GROUP.equals( sg.getName() ) )
+         {
+            return sg.isMember( new SimplePrincipal(role) );
+         }
+      }
+      return false;
+   }
+
+   /**
+    * Adds a role to the user's subject, and their security context
+    *
+    * @param role The name of the role to add
+    */
+   public boolean addRole(String role)
+   {
+      if (!isLoggedIn())
+      {
+         preAuthenticationRoles.add(role);
+         return false;
+      }
+      else
+      {
+         for ( Group sg : getSubject().getPrincipals(Group.class) )
+         {
+            if ( ROLES_GROUP.equals( sg.getName() ) )
+            {
+               return sg.addMember(new SimplePrincipal(role));
+            }
+         }
+
+         SimpleGroup roleGroup = new SimpleGroup(ROLES_GROUP);
+         roleGroup.addMember(new SimplePrincipal(role));
+         getSubject().getPrincipals().add(roleGroup);
+         return true;
+      }
+   }
+
+   /**
+    * Removes a role from the user's subject and their security context
+    *
+    * @param role The name of the role to remove
+    */
+   public void removeRole(String role)
+   {
+      for ( Group sg : getSubject().getPrincipals(Group.class) )
+      {
+         if ( ROLES_GROUP.equals( sg.getName() ) )
+         {
+            Enumeration e = sg.members();
+            while (e.hasMoreElements())
+            {
+               Principal member = (Principal) e.nextElement();
+               if (member.getName().equals(role))
+               {
+                  sg.removeMember(member);
+                  break;
+               }
+            }
+
+         }
+      }
+   }
+
+   /**
+    * Assert that the current authenticated Identity is a member of
+    * the specified role.
+    *
+    * @param role String The name of the role to check
+    * @throws AuthorizationException if not a member
+    */
+   public void checkRole(String role)
+   {
+      isLoggedIn(true);
+
+      if ( !hasRole(role) )
+      {
+         if ( !isLoggedIn() )
+         {
+            Events.instance().raiseEvent("org.jboss.seam.notLoggedIn");
+            throw new NotLoggedInException();
+         }
+         else
+         {
+            throw new AuthorizationException(String.format(
+                  "Authorization check failed for role [%s]", role));
+         }
+      }
+   }
+
+   /**
+    * Assert that the current authenticated Identity has permission for
+    * the specified name and action
+    *
+    * @param name String The permission name
+    * @param action String The permission action
+    * @param arg Object Optional object parameter used to make a permission decision
+    * @throws AuthorizationException if the user does not have the specified permission
+    */
+   public void checkPermission(String name, String action, Object...arg)
+   {
+      isLoggedIn(true);
+
+      if ( !hasPermission(name, action, arg) )
+      {
+         if ( !isLoggedIn() )
+         {
+            Events.instance().raiseEvent("org.jboss.seam.notLoggedIn");
+            throw new NotLoggedInException();
+         }
+         else
+         {
+            throw new AuthorizationException(String.format(
+                  "Authorization check failed for permission [%s,%s]", name, action));
+         }
+      }
+   }
+
+   /**
+    * Performs a permission check for the specified name and action
+    *
+    * @param name String The permission name
+    * @param action String The permission action
+    * @param arg Object Optional object parameter used to make a permission decision
+    * @return boolean True if the user has the specified permission
+    */
+   public boolean hasPermission(String name, String action, Object...arg)
+   {
+      return false;
+   }
+
+   /**
+    * Creates a callback handler that can handle a standard username/password
+    * callback, using the username and password properties.
+    */
+   protected CallbackHandler getDefaultCallbackHandler()
+   {
+      return new CallbackHandler()
+      {
+         public void handle(Callback[] callbacks)
+            throws IOException, UnsupportedCallbackException
+         {
+            for (int i=0; i<callbacks.length; i++)
+            {
+               if (callbacks[i] instanceof NameCallback)
+               {
+                  ( (NameCallback) callbacks[i] ).setName(getUsername());
+               }
+               else if (callbacks[i] instanceof PasswordCallback)
+               {
+                  ( (PasswordCallback) callbacks[i] ).setPassword( getPassword() != null ?
+                           getPassword().toCharArray() : null );
+               }
+               else
+               {
+                  throw new UnsupportedCallbackException(callbacks[i], "Unsupported callback");
+               }
+            }
+
+         }
+      };
+   }
+
+   /**
+    * Evaluates the specified security expression, which must return a boolean
+    * value.
+    *
+    * @param expr String The expression to evaluate
+    * @return boolean The result of the expression evaluation
+    */
+   protected boolean evaluateExpression(String expr)
+   {
+      // The following line doesn't work in MyFaces
+      return Expressions.instance().createValueExpression(expr, Boolean.class).getValue();
+   }
+
+   public String getUsername()
+   {
+      return username;
+   }
+
+   public void setUsername(String username)
+   {
+      setDirty(this.username, username);
+      this.username = username;
+   }
+
+   public String getPassword()
+   {
+      return password;
+   }
+
+   public void setPassword(String password)
+   {
+      setDirty(this.password, password);
+      this.password = password;
+   }
+
+   public MethodExpression getAuthenticateMethod()
+   {
+      return authenticateMethod;
+   }
+
+   public void setAuthenticateMethod(MethodExpression authMethod)
+   {
+      this.authenticateMethod = authMethod;
+   }
+
+   public boolean isRememberMe()
+   {
+      return isCookieEnabled();
+   }
+
+   public void setRememberMe(boolean remember)
+   {
+      setCookieEnabled(remember);
+   }
+
+   public String getJaasConfigName()
+   {
+      return jaasConfigName;
+   }
+
+   public void setJaasConfigName(String jaasConfigName)
+   {
+      this.jaasConfigName = jaasConfigName;
+   }
+
+   public void checkEntityPermission(Object entity, EntityAction action)
+   {
+      isLoggedIn(true);
+
+      PersistenceProvider provider = PersistenceProvider.instance();
+      Class beanClass = provider.getBeanClass(entity);
+
+      if (beanClass != null)
+      {
+         String name = Seam.getComponentName(entity.getClass());
+         if (name == null) name = beanClass.getName();
+
+         Method m = null;
+         switch (action)
+         {
+            case READ:
+               m = provider.getPostLoadMethod(beanClass);
+               break;
+            case INSERT:
+               m = provider.getPrePersistMethod(beanClass);
+               break;
+            case UPDATE:
+               m = provider.getPreUpdateMethod(beanClass);
+               break;
+            case DELETE:
+               m = provider.getPreRemoveMethod(beanClass);
+         }
+
+         Restrict restrict = null;
+
+         if (m != null && m.isAnnotationPresent(Restrict.class))
+         {
+            restrict = m.getAnnotation(Restrict.class);
+         }
+         else if (entity.getClass().isAnnotationPresent(Restrict.class))
+         {
+            restrict = entity.getClass().getAnnotation(Restrict.class);
+         }
+
+         if (restrict != null)
+         {
+            if (Strings.isEmpty(restrict.value()))
+            {
+               checkPermission(name, action.toString(), entity);
+            }
+            else
+            {
+               checkRestriction(restrict.value());
+            }
+         }
+      }
+   }
+}

Added: portlets/src/framework/Seam/ejb/src/main/resources/META-INF/ejb-jar.xml
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/META-INF/ejb-jar.xml	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/META-INF/ejb-jar.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+         version="3.0">
+
+   <interceptors>
+     <interceptor>
+       <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+     </interceptor>
+   </interceptors>
+
+   <assembly-descriptor>
+      <interceptor-binding>
+         <ejb-name>*</ejb-name>
+         <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+      </interceptor-binding>
+   </assembly-descriptor>
+
+</ejb-jar>

Added: portlets/src/framework/Seam/ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/META-INF/persistence.xml	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/META-INF/persistence.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Persistence deployment descriptor for dev profile -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+             version="1.0">
+
+   <persistence-unit name="seamtestapp">
+      <provider>org.hibernate.ejb.HibernatePersistence</provider>
+      <jta-data-source>java:/MasterDS</jta-data-source>
+      <properties>
+         <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
+         <property name="hibernate.hbm2ddl.auto" value="validate"/>
+         <property name="hibernate.cache.use_query_cache" value="true"/>
+         <!--<property name="hibernate.show_sql" value="true"/>-->
+         <property name="jboss.entity.manager.factory.jndi.name" value="java:/seamtestappEntityManagerFactory"/>
+      </properties>
+   </persistence-unit>
+
+</persistence>

Added: portlets/src/framework/Seam/ejb/src/main/resources/ds/testSeam-dev-ds.xml
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/ds/testSeam-dev-ds.xml	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/ds/testSeam-dev-ds.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE datasources
+    PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+<datasources>
+   
+   <local-tx-datasource>
+      <jndi-name>MasterDS</jndi-name>
+       <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}dvd</connection-url>
+        <!-- <connection-url>jdbc:hsqldb:.</connection-url> -->
+        <driver-class>org.hsqldb.jdbcDriver</driver-class>
+        <user-name>sa</user-name>
+        <password></password>
+    </local-tx-datasource>
+
+
+   <mbean code="org.jboss.jdbc.HypersonicDatabase" 
+           name="jboss:service=Hypersonic,database=dvd">
+        <attribute name="Database">dvd</attribute>
+        <attribute name="InProcessMode">true</attribute>
+    </mbean>
+    
+</datasources>
+

Added: portlets/src/framework/Seam/ejb/src/main/resources/ds/testSeam-prod-ds.xml
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/ds/testSeam-prod-ds.xml	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/ds/testSeam-prod-ds.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources>
+   
+   <!--<local-tx-datasource>
+      <jndi-name>testSeamDatasource</jndi-name>
+      <connection-url>jdbc:oracle:thin:@10.102.18.196:1521:dvmis</connection-url>
+      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
+      <user-name>api</user-name>
+      <password>api_freedom</password>-->
+<!-- 
+      <exception-sorter-class-name>
+         org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
+      </exception-sorter-class-name>
+      <metadata>
+         <type-mapping>mySQL</type-mapping>
+      </metadata>
+-->
+   <!--</local-tx-datasource>-->
+    
+</datasources>
+

Added: portlets/src/framework/Seam/ejb/src/main/resources/log4j.xml
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/log4j.xml	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/log4j.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 39945 2006-01-12 02:44:07Z bill $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+    
+    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+        <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+        <param name="Target" value="System.out"/>
+        <param name="Threshold" value="DEBUG"/>
+
+        <layout class="org.apache.log4j.PatternLayout">
+            <!-- The default pattern: Date Priority [Category] Messagen -->
+            <!--
+            <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+            -->
+            <!--<param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L)  -%m%n"/>-->
+            <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c] (%x) %m%n"/>
+        </layout>
+    </appender>
+
+    <root>
+        <appender-ref ref="CONSOLE"/>
+    </root>
+
+    <category name="com.arjuna">
+       <priority value="WARN"/>
+    </category>
+
+    <category name="org.jboss">
+        <priority value="WARN"/>
+    </category>
+
+</log4j:configuration>
\ No newline at end of file

Added: portlets/src/framework/Seam/ejb/src/main/resources/login-config.xml
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/login-config.xml	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/login-config.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,61 @@
+<?xml version='1.0'?>
+
+<!DOCTYPE policy PUBLIC
+      "-//JBoss//DTD JBOSS Security Config 3.0//EN"
+      "http://www.jboss.org/j2ee/dtd/security_config.dtd">
+
+<!-- The XML based JAAS login configuration read by the
+org.jboss.security.auth.login.XMLLoginConfig mbean. Add
+an application-policy element for each security domain.
+
+The outline of the application-policy is:
+<application-policy name="security-domain-name">
+  <authentication>
+    <login-module code="login.module1.class.name" flag="control_flag">
+      <module-option name = "option1-name">option1-value</module-option>
+      <module-option name = "option2-name">option2-value</module-option>
+      ...
+    </login-module>
+
+    <login-module code="login.module2.class.name" flag="control_flag">
+      ...
+    </login-module>
+    ...
+  </authentication>
+</application-policy>
+
+$Revision: 1.1 $
+-->
+
+<policy>
+  <!-- Used by clients within the application server VM such as
+  mbeans and servlets that access EJBs.
+  -->
+  <application-policy name="client-login">
+    <authentication>
+      <login-module code="org.jboss.security.ClientLoginModule" flag="required">
+         <!-- Any existing security context will be restored on logout -->
+         <module-option name="restore-login-identity">true</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <application-policy name="other">
+    <!-- A simple server login module, which can be used when the number
+    of users is relatively small. It uses two properties files:
+    users.properties, which holds users (key) and their password (value).
+    roles.properties, which holds users (key) and a comma-separated list of
+    their roles (value).
+    The unauthenticatedIdentity property defines the name of the principal
+    that will be used when a null username and password are presented as is
+    the case for an unuathenticated web client or MDB. If you want to
+    allow such users to be authenticated add the property, e.g.,
+    unauthenticatedIdentity="nobody"
+    -->
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required"/>
+    </authentication>
+  </application-policy>
+
+</policy>
+

Added: portlets/src/framework/Seam/ejb/src/main/resources/pageflow/test.jpdl.xml
===================================================================

Added: portlets/src/framework/Seam/ejb/src/main/resources/properties/labels_en.properties
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/properties/labels_en.properties	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/properties/labels_en.properties	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,2 @@
+util.firstName=Firstname
+nav.fulfillment=Fulfillment
\ No newline at end of file

Added: portlets/src/framework/Seam/ejb/src/main/resources/properties/messages.properties
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/properties/messages.properties	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/properties/messages.properties	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,90 @@
+up=\u2191
+down=\u2193
+left=\u2039
+right=\u203A
+
+validator.assertFalse=validation failed
+validator.assertTrue=validation failed
+validator.future=must be a future date
+validator.length=length must be between {min} and {max}
+validator.max=must be less than or equal to {value}
+validator.min=must be greater than or equal to {value}
+validator.notNull=may not be null
+validator.past=must be a past date
+validator.pattern=must match "{regex}"
+validator.range=must be between {min} and {max}
+validator.size=size must be between {min} and {max}
+validator.email=must be a well-formed email address
+
+org.jboss.seam.loginFailed=Login failed
+org.jboss.seam.loginSuccessful=Welcome, #0
+
+org.jboss.seam.TransactionFailed=Transaction failed
+org.jboss.seam.NoConversation=The conversation ended, timed out or was processing another request
+org.jboss.seam.IllegalNavigation=Illegal navigation
+org.jboss.seam.ProcessEnded=Process #0 already ended
+org.jboss.seam.ProcessNotFound=Process #0 not found
+org.jboss.seam.TaskEnded=Task #0 already ended
+org.jboss.seam.TaskNotFound=Task #0 not found
+org.jboss.seam.NotLoggedIn=Please log in first
+
+javax.faces.component.UIInput.CONVERSION=value could not be converted to the expected type
+javax.faces.component.UIInput.REQUIRED=value is required
+javax.faces.component.UIInput.UPDATE=an error occurred when processing your submitted information
+javax.faces.component.UISelectOne.INVALID=value is not valid
+javax.faces.component.UISelectMany.INVALID=value is not valid
+
+javax.faces.converter.BigDecimalConverter.DECIMAL=value must be a number
+javax.faces.converter.BigDecimalConverter.DECIMAL_detail=value must be a signed decimal number consisting of zero or more digits, optionally followed by a decimal point and fraction, eg. {1}
+javax.faces.converter.BigIntegerConverter.BIGINTEGER=value must be an integer
+javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=value must be a signed integer number consisting of zero or more digits
+javax.faces.converter.BooleanConverter.BOOLEAN=value must be true or false
+javax.faces.converter.BooleanConverter.BOOLEAN_detail=value must be true or false (any value other than true will evaluate to false)
+javax.faces.converter.ByteConverter.BYTE=value must be a number between 0 and 255
+javax.faces.converter.ByteConverter.BYTE_detail=value must be a number between 0 and 255
+javax.faces.converter.CharacterConverter.CHARACTER=value must be a character
+javax.faces.converter.CharacterConverter.CHARACTER_detail=value must be a valid ASCII character
+javax.faces.converter.DateTimeConverter.DATE=value must be a date
+javax.faces.converter.DateTimeConverter.DATE_detail=value must be a date,  eg. {1}
+javax.faces.converter.DateTimeConverter.TIME=value must be a time
+javax.faces.converter.DateTimeConverter.TIME_detail=value must be a time,  eg. {1}
+javax.faces.converter.DateTimeConverter.DATETIME=value must be a date and time
+javax.faces.converter.DateTimeConverter.DATETIME_detail=value must be a date and time,  eg. {1}
+javax.faces.converter.DateTimeConverter.PATTERN_TYPE=a pattern or type attribute must be specified to convert the value
+javax.faces.converter.DoubleConverter.DOUBLE=value must be a number
+javax.faces.converter.DoubleConverter.DOUBLE_detail=value must be a number between 4.9E-324 and 1.7976931348623157E308
+javax.faces.converter.EnumConverter.ENUM=value must be convertible to an enum
+javax.faces.converter.EnumConverter.ENUM_detail=value must be convertible to an enum or from the enum that contains the constant {1}
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS=value must be convertible to an enum or from the enum, but no enum class provided
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=value must be convertible to an enum or from the enum, but no enum class provided
+javax.faces.converter.FloatConverter.FLOAT=value must be a number
+javax.faces.converter.FloatConverter.FLOAT_detail=value must be a number between 1.4E-45 and 3.4028235E38
+javax.faces.converter.IntegerConverter.INTEGER=value must be an integer
+javax.faces.converter.IntegerConverter.INTEGER_detail=value must be an integer number between -2147483648 and 2147483647
+javax.faces.converter.LongConverter.LONG=value must be an integer
+javax.faces.converter.LongConverter.LONG_detail=must be an integer number between -9223372036854775808 and 9223372036854775807
+javax.faces.converter.NumberConverter.CURRENCY=value must be a currency amount
+javax.faces.converter.NumberConverter.CURRENCY_detail=value must be a currency amount, eg. {1}
+javax.faces.converter.NumberConverter.PERCENT=value must be a percentage amount
+javax.faces.converter.NumberConverter.PERCENT_detail=value must be a percentage amount, eg. {1}
+javax.faces.converter.NumberConverter.NUMBER=value must be a number
+javax.faces.converter.NumberConverter.NUMBER_detail=value must be a number
+javax.faces.converter.NumberConverter.PATTERN=value must be a number
+javax.faces.converter.NumberConverter.PATTERN_detail=value must be a number
+javax.faces.converter.ShortConverter.SHORT=value must be an integer
+javax.faces.converter.ShortConverter.SHORT_detail=value must be an integer number between -32768 and 32767
+
+javax.faces.validator.DoubleRangeValidator.MAXIMUM=value must be less than or equal to {0}
+javax.faces.validator.DoubleRangeValidator.MINIMUM=value must be greater than or equal to {0}
+javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.validator.DoubleRangeValidator.TYPE=value is not of the correct type
+javax.faces.validator.LengthValidator.MAXIMUM=value is must be shorter than or equal to {0} characters
+javax.faces.validator.LengthValidator.MINIMUM=value is must be longer than or equal to {0} characters
+javax.faces.validator.LongRangeValidator.MAXIMUM=value must be less than or equal to {0}
+javax.faces.validator.LongRangeValidator.MINIMUM=value must be greater than or equal to {0}
+javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.validator.LongRangeValidator.TYPE=value is not of the correct type
+
+javax.faces.validator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.converter.STRING=value could not be converted to a string
+

Added: portlets/src/framework/Seam/ejb/src/main/resources/properties/roles.properties
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/properties/roles.properties	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/properties/roles.properties	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1 @@
+wes=admin
\ No newline at end of file

Added: portlets/src/framework/Seam/ejb/src/main/resources/properties/seam.properties
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/properties/seam.properties	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/properties/seam.properties	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1 @@
+#org.jboss.seam.core.init.jndiPattern = "#{ejbName}/local"
\ No newline at end of file

Added: portlets/src/framework/Seam/ejb/src/main/resources/properties/testapp.skin.properties
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/properties/testapp.skin.properties	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/properties/testapp.skin.properties	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,52 @@
+#Colors
+headerBackgroundColor=#FFD863
+headerGradientColor=#FF9B19
+headerTextColor=#000000
+headerWeightFont=bold
+
+generalBackgroundColor=#FFFFFF
+generalTextColor=#000000
+generalSizeFont=12px
+generalFamilyFont=Tahoma, Verdana, sans-serif
+
+controlTextColor=#000000
+controlBackgroundColor=#ffffff
+additionalBackgroundColor=#FFFFFF
+
+shadowBackgroundColor=#000000
+shadowOpacity=1
+
+panelBorderColor=#C0C0C0
+subBorderColor=#ffffff
+
+tabBackgroundColor=#dcdcdc
+tabDisabledTextColor=#dcdcdc
+
+trimColor=#dcdcdc
+
+tipBackgroundColor=#dcdcdc
+tipBorderColor=#dcdcdc
+
+selectControlColor=#dcdcdc
+
+
+generalLinkColor=#0078D0
+hoverLinkColor=#0090FF
+visitedLinkColor=#0090FF
+
+# Fonts
+headerSizeFont=12px
+headerFamilyFont=Tahoma, Verdana, sans-serif
+
+tabSizeFont=12
+tabFamilyFont=Tahoma, Verdana, sans-serif
+
+buttonSizeFont=12
+buttonFamilyFont=Tahoma, Verdana, sans-serif
+
+tableBackgroundColor=#FFFFFF
+tableFooterBackgroundColor=#cccccc
+tableSubfooterBackgroundColor=#f1f1f1
+tableBorderColor=#C0C0C0
+
+

Added: portlets/src/framework/Seam/ejb/src/main/resources/properties/users.properties
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/properties/users.properties	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/properties/users.properties	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1 @@
+admin=seamtestapp123
\ No newline at end of file

Added: portlets/src/framework/Seam/ejb/src/main/resources/security.drl
===================================================================
--- portlets/src/framework/Seam/ejb/src/main/resources/security.drl	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/main/resources/security.drl	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,6 @@
+package Permissions;
+
+import java.security.Principal;
+
+import org.jboss.seam.security.PermissionCheck;
+import org.jboss.seam.security.Role;
\ No newline at end of file

Added: portlets/src/framework/Seam/ejb/src/test/filters/components.properties
===================================================================
--- portlets/src/framework/Seam/ejb/src/test/filters/components.properties	                        (rev 0)
+++ portlets/src/framework/Seam/ejb/src/test/filters/components.properties	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,2 @@
+myFacesLifecycleBug=false
+jndiPattern=#{ejbName}/local

Added: portlets/src/framework/Seam/pom.xml
===================================================================
--- portlets/src/framework/Seam/pom.xml	                        (rev 0)
+++ portlets/src/framework/Seam/pom.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,161 @@
+<?xml version="1.0"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.jboss.seam</groupId>
+      <artifactId>root</artifactId>
+      <version>2.0.0.CR2</version>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>org.jboss.portal.example</groupId>
+   <artifactId>JBossPortalExample</artifactId>
+   <packaging>pom</packaging>
+   <version>1.0</version>
+   <name>JBoss Portal Seam Booking Portlet Example</name>
+
+   <repositories>
+      <repository>
+         <snapshots>
+            <enabled>true</enabled>
+         </snapshots>
+         <id>snapshots.jboss.org</id>
+         <name>JBoss Snapshot Repository</name>
+         <url>http://snapshots.jboss.org/maven2</url>
+      </repository>
+      <repository>
+         <id>repository.jboss.org</id>
+         <name>JBoss Repository</name>
+         <url>http://repository.jboss.org/maven2</url>
+      </repository>
+
+      <!--<repository>
+          <releases/>
+          <snapshots>
+              <enabled>false</enabled>
+              <updatePolicy>never</updatePolicy>
+          </snapshots>
+          <id>maven-repository.dev.java.net</id>
+          <name>Java.net Repository for Maven</name>
+          <url>https://maven-repository.dev.java.net/nonav/repository</url>
+          <layout>legacy</layout>
+      </repository>
+      <repository>
+          <id>ibiblio</id>
+          <name>ibiblio-repo</name>
+          <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
+          <layout>legacy</layout>
+      </repository>
+      <repository>
+          <id>m2-snapshot-repository</id>
+          <name>m2-snapshot-repository</name>
+          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+      </repository>-->
+
+   </repositories>
+
+
+   <modules>
+      <module>ejb</module>
+      <module>web</module>
+      <module>ear</module>
+   </modules>
+   <dependencies>
+
+      <dependency>
+         <groupId>org.testng</groupId>
+         <artifactId>testng</artifactId>
+         <version>4.7</version>
+         <classifier>jdk15</classifier>
+         <scope>test</scope>
+      </dependency>
+
+   </dependencies>
+
+   <dependencyManagement>
+      <dependencies>
+         <dependency>
+            <groupId>org.drools</groupId>
+            <artifactId>drools-core</artifactId>
+            <version>4.0.0</version>
+         </dependency>
+
+         <dependency>
+            <groupId>org.drools</groupId>
+            <artifactId>drools-compiler</artifactId>
+            <version>4.0.0</version>
+         </dependency>
+
+         <dependency>
+            <groupId>janino</groupId>
+            <artifactId>janino</artifactId>
+            <version>2.4.3</version>
+         </dependency>
+
+         <dependency>
+            <groupId>org.mvel</groupId>
+            <artifactId>mvel14</artifactId>
+            <version>1.2rc4rv908</version>
+         </dependency>
+
+         <dependency>
+            <groupId>antlr</groupId>
+            <artifactId>antlr</artifactId>
+            <version>2.7.7</version>
+         </dependency>
+
+         <dependency>
+            <groupId>org.mvel</groupId>
+            <artifactId>mvel14</artifactId>
+            <version>1.2rc4rv908</version>
+         </dependency>
+      </dependencies>
+   </dependencyManagement>
+
+   <build>
+
+      <pluginManagement>
+         <plugins>
+            <!--<plugin>
+              <inherited>true</inherited>
+              <groupId>org.codehaus.cargo</groupId>
+              <artifactId>cargo-maven2-plugin</artifactId>
+            </plugin>-->
+
+            <plugin>
+               <inherited>true</inherited>
+               <groupId>org.apache.maven.plugins</groupId>
+               <artifactId>maven-compiler-plugin</artifactId>
+               <configuration>
+                  <source>1.5</source>
+                  <target>1.5</target>
+               </configuration>
+            </plugin>
+
+
+         </plugins>
+      </pluginManagement>
+
+      <!--<plugins>
+          <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-compiler-plugin</artifactId>
+              <configuration>
+                  <source>1.5</source>
+                  <target>1.5</target>
+              </configuration>
+          </plugin>
+      </plugins>-->
+
+   </build>
+
+   <reporting>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-report-plugin</artifactId>
+         </plugin>
+      </plugins>
+   </reporting>
+
+</project>

Added: portlets/src/framework/Seam/web/pom.xml
===================================================================
--- portlets/src/framework/Seam/web/pom.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/pom.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,635 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+   <parent>
+      <groupId>org.jboss.portal.example</groupId>
+      <artifactId>JBossPortalExample</artifactId>
+      <version>1.0</version>
+   </parent>
+   <groupId>org.jboss.portal.example</groupId>
+   <artifactId>SeamBookingPortletWeb</artifactId>
+   <packaging>war</packaging>
+   <version>1.0</version>
+   <name>JBoss Portal Seam Booking Portlet Example WAR</name>
+
+
+   <build>
+      <defaultGoal>install</defaultGoal>
+      <!--this will be the name of your war file-->
+      <finalName>${artifactId}-${version}</finalName>
+
+      <resources>
+
+         <resource>
+            <directory>${basedir}/src/main/resources</directory>
+            <filtering>true</filtering>
+            <targetPath>../${build.finalName}/WEB-INF</targetPath>
+            <includes>
+               <include>components.xml</include>
+            </includes>
+         </resource>
+
+      </resources>
+
+      <plugins>
+         <plugin>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <configuration>
+               <encoding>iso-8859-1</encoding>
+            </configuration>
+         </plugin>
+         <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.1</version>
+            <configuration>
+               <tasks>
+                  <!--<echo level="info">${project.parent.name}</echo>-->
+               </tasks>
+            </configuration>
+            <executions>
+               <execution>
+                  <phase>pre-integration-test</phase>
+                  <goals>
+                     <goal>run</goal>
+                  </goals>
+               </execution>
+            </executions>
+         </plugin>
+         <!--<plugin>
+           <groupId>org.apache.maven.plugins</groupId>
+           <artifactId>maven-war-plugin</artifactId>
+           <version>2.0</version>
+           <configuration>
+              <webappDirectory>target/${build.finalName}.war</webappDirectory>
+           </configuration>
+         </plugin>-->
+
+      </plugins>
+
+   </build>
+
+   <reporting>
+      <plugins>
+         <plugin>
+            <artifactId>maven-changes-plugin</artifactId>
+         </plugin>
+         <plugin>
+            <artifactId>maven-checkstyle-plugin</artifactId>
+         </plugin>
+         <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>cobertura-maven-plugin</artifactId>
+         </plugin>
+         <plugin>
+            <artifactId>maven-javadoc-plugin</artifactId>
+         </plugin>
+         <plugin>
+            <artifactId>maven-jxr-plugin</artifactId>
+         </plugin>
+         <plugin>
+            <artifactId>maven-pmd-plugin</artifactId>
+         </plugin>
+         <plugin>
+            <artifactId>maven-surefire-report-plugin</artifactId>
+         </plugin>
+      </plugins>
+   </reporting>
+   <dependencies>
+
+      <dependency>
+         <groupId>org.jboss.portal.example</groupId>
+         <artifactId>SeamBookingPortletEjb</artifactId>
+         <version>${project.version}</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam-ui</artifactId>
+         <exclusions>
+            <exclusion>
+               <groupId>javax.el</groupId>
+               <artifactId>el-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.servlet</groupId>
+               <artifactId>servlet-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.servlet.jsp</groupId>
+               <artifactId>jsp-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>org.jboss.seam</groupId>
+               <artifactId>jboss-el</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam-pdf</artifactId>
+         <exclusions>
+            <exclusion>
+               <groupId>javax.el</groupId>
+               <artifactId>el-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.servlet</groupId>
+               <artifactId>servlet-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-api</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam-remoting</artifactId>
+         <version>2.0.0.CR1</version>
+         <exclusions>
+            <exclusion>
+               <groupId>javax.servlet</groupId>
+               <artifactId>servlet-api</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam-ioc</artifactId>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.seam</groupId>
+         <artifactId>jboss-seam-ioc</artifactId>
+         <exclusions>
+            <exclusion>
+               <groupId>javax.servlet</groupId>
+               <artifactId>servlet-api</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+
+
+      <dependency>
+         <groupId>com.sun.facelets</groupId>
+         <artifactId>jsf-facelets</artifactId>
+         <!--<scope>provided</scope>-->
+      </dependency>
+
+
+
+
+      <!--Trinidad Needs to be added to seam repo-->
+      <!--<dependency>
+         <groupId>seam.lib</groupId>
+         <artifactId>trinidad-api-1.0.2-SNAPSHOT</artifactId>
+         <version>2.0-SNAPSHOT</version>
+      </dependency>
+
+      <dependency>
+         <groupId>seam.lib</groupId>
+         <artifactId>trinidad-impl-1.0.2-SNAPSHOT</artifactId>
+         <version>2.0-SNAPSHOT</version>
+      </dependency>-->
+
+      <dependency>
+         <groupId>org.richfaces.framework</groupId>
+         <artifactId>richfaces-api</artifactId>
+         <version>3.2.0-SNAPSHOT</version>
+         <exclusions>
+            <exclusion>
+               <groupId>commons-logging</groupId>
+               <artifactId>commons-logging</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>junit</groupId>
+               <artifactId>junit</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>servlet-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-impl</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+
+      <dependency>
+         <groupId>org.richfaces.framework</groupId>
+         <artifactId>richfaces-impl</artifactId>
+         <version>3.2.0-SNAPSHOT</version>
+         <exclusions>
+            <exclusion>
+               <groupId>commons-logging</groupId>
+               <artifactId>commons-logging</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>junit</groupId>
+               <artifactId>junit</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.servlet</groupId>
+               <artifactId>servlet-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-impl</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+
+      <dependency>
+         <groupId>org.richfaces.ui</groupId>
+         <artifactId>richfaces-ui</artifactId>
+         <version>3.2.0-SNAPSHOT</version>
+         <exclusions>
+            <exclusion>
+               <groupId>commons-logging</groupId>
+               <artifactId>commons-logging</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-api</artifactId>
+            </exclusion>
+
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>servlet-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-impl</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>org.jboss.seam</groupId>
+               <artifactId>jboss-seam</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>
+
+     <!-- <dependency>
+         <groupId>org.richfaces.extensions</groupId>
+         <artifactId>portlet</artifactId>
+         <version>3.2.0-SNAPSHOT</version>
+         <exclusions>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-api</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-impl</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency>-->
+
+      <dependency>
+          <groupId>org.apache.myfaces.portlet-bridge</groupId>
+          <artifactId>jsf-portlet-bridge-impl</artifactId>
+          <version>1.0.0-SNAPSHOT</version>
+          <exclusions>
+            <exclusion>
+               <groupId>org.apache.myfaces.core</groupId>
+               <artifactId>myfaces-api</artifactId>
+            </exclusion>
+             <!--<exclusion>
+               <groupId>org.apache.myfaces.portlet-bridge</groupId>
+               <artifactId>jsf-portlet-bridge-api</artifactId>
+            </exclusion>-->
+          </exclusions>
+       </dependency>
+
+       <dependency>
+          <groupId>org.apache.myfaces.portlet-bridge</groupId>
+          <artifactId>jsf-portlet-bridge-api</artifactId>
+          <version>1.0.0-SNAPSHOT</version>
+          <exclusions>
+            <exclusion>
+               <groupId>org.apache.myfaces.core</groupId>
+               <artifactId>myfaces-api</artifactId>
+            </exclusion>
+          </exclusions>
+       </dependency>
+
+      <dependency>
+         <groupId>commons-lang</groupId>
+         <artifactId>commons-lang</artifactId>
+         <version>2.1</version>
+      </dependency>
+
+
+
+
+   </dependencies>
+
+   <repositories>
+      <!-- repository for tomahawk -->
+      <repository>
+         <id>apache-repo</id>
+         <name>apache-repo</name>
+         <url>http://myfaces.zones.apache.org/dist/maven-repository</url>
+      </repository>
+
+      <repository>
+         <id>Maven Snapshots</id>
+         <url>http://snapshots.maven.codehaus.org/maven2/</url>
+         <snapshots>
+            <enabled>true</enabled>
+         </snapshots>
+         <releases>
+            <enabled>false</enabled>
+         </releases>
+      </repository>
+   </repositories>
+
+   <pluginRepositories>
+
+      <pluginRepository>
+         <id>codehaus-repo</id>
+         <url>http://repository.codehaus.org/</url>
+      </pluginRepository>
+
+      <pluginRepository>
+         <id>Maven Snapshots</id>
+         <url>http://snapshots.maven.codehaus.org/maven2/</url>
+         <snapshots>
+            <enabled>true</enabled>
+         </snapshots>
+         <releases>
+            <enabled>false</enabled>
+         </releases>
+      </pluginRepository>
+   </pluginRepositories>
+
+
+   <profiles>
+
+      <profile>
+         <id>portlet</id>
+         <activation>
+            <activeByDefault>true</activeByDefault>
+         </activation>
+
+         <dependencies>
+            <!--<dependency>
+                <groupId>org.apache.myfaces.portlet-bridge</groupId>
+                <artifactId>jsf-portlet-bridge-impl</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+                <exclusions>
+                  <exclusion>
+                     <groupId>org.apache.myfaces.core</groupId>
+                     <artifactId>myfaces-api</artifactId>
+                  </exclusion>
+                </exclusions>
+             </dependency>
+             <dependency>
+                <groupId>org.apache.myfaces.portlet-bridge</groupId>
+                <artifactId>jsf-portlet-bridge-api</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+                <exclusions>
+                  <exclusion>
+                     <groupId>org.apache.myfaces.core</groupId>
+                     <artifactId>myfaces-api</artifactId>
+                  </exclusion>
+                </exclusions>
+             </dependency>-->
+         </dependencies>
+         <build>
+            <resources>
+
+               <resource>
+                  <directory>${basedir}/src/main/resources/portal</directory>
+                  <filtering>false</filtering>
+                  <targetPath>../${build.finalName}/WEB-INF</targetPath>
+                  <includes>
+                     <include>*.xml</include>
+                  </includes>
+               </resource>
+
+            </resources>
+         </build>
+      </profile>
+
+      <profile>
+         <id>jboss</id>
+         <activation>
+            <activeByDefault>true</activeByDefault>
+         </activation>
+
+         <dependencies/>
+
+         <build>
+              <filters>
+                 <filter>src/main/filters/jboss.properties</filter>
+              </filters>
+         </build>
+
+      </profile>
+      <profile>
+         <id>tomcat</id>
+         <activation>
+            <activeByDefault>false</activeByDefault>
+         </activation>
+         <dependencies>
+
+            <dependency>
+               <groupId>org.jboss.seam</groupId>
+               <artifactId>jboss-seam</artifactId>
+               <exclusions>
+                  <exclusion>
+                     <groupId>javax.el</groupId>
+                     <artifactId>el-api</artifactId>
+                  </exclusion>
+               </exclusions>
+            </dependency>
+
+            <dependency>
+               <groupId>org.jboss.seam</groupId>
+               <artifactId>jboss-el</artifactId>
+               <exclusions>
+                  <exclusion>
+                     <groupId>javax.el</groupId>
+                     <artifactId>el-api</artifactId>
+                  </exclusion>
+               </exclusions>
+            </dependency>
+
+            <dependency>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-api</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>org.jboss.portal.example</groupId>
+               <artifactId>SeamBookingPortletEjb</artifactId>
+               <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-impl</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>portlet-api</groupId>
+               <artifactId>portlet-api</artifactId>
+               <version>1.0</version>
+            </dependency>
+
+            <dependency>
+               <groupId>org.drools</groupId>
+               <artifactId>drools-core</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>org.drools</groupId>
+               <artifactId>drools-compiler</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>janino</groupId>
+               <artifactId>janino</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>org.mvel</groupId>
+               <artifactId>mvel14</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>antlr</groupId>
+               <artifactId>antlr</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>org.mvel</groupId>
+               <artifactId>mvel14</artifactId>
+            </dependency>
+
+         </dependencies>
+
+         <build>
+
+            <filters>
+               <filter>src/main/filters/tomcat.properties</filter>
+            </filters>
+
+            <resources>
+               <resource>
+                  <directory>${basedir}/src/main/resources</directory>
+                  <filtering>true</filtering>
+                  <targetPath>../${build.finalName}/META-INF</targetPath>
+                  <includes>
+                     <include>context.xml</include>
+                  </includes>
+               </resource>
+            </resources>
+
+            <plugins>
+               <plugin>
+                  <groupId>org.codehaus.cargo</groupId>
+                  <artifactId>cargo-maven2-plugin</artifactId>
+                  <version>0.3.1</version>
+                  <configuration>
+                     <wait>${cargo.wait}</wait>
+                     <container>
+                        <containerId>${cargo.container}</containerId>
+                        <zipUrlInstaller>
+                           <url>${cargo.container.url}</url>
+                           <installDir>${basedir}/target/installs</installDir>
+                        </zipUrlInstaller>
+                        <!--Security mode-->
+                        <!--<systemProperties>
+                            <java.security.manager>default</java.security.manager>
+                            <java.security.policy>${catalina.home}\conf\catalina.policy</java.security.policy>
+                        </systemProperties>-->
+                     </container>
+                     <configuration>
+                        <type>existing</type>
+                        <home>${tomcat.local.install}</home>
+                        <properties>
+                           <cargo.jvmarg>${cargo.jvmarg}</cargo.jvmarg>
+                           <cargo.servlet.port>${cargo.port}</cargo.servlet.port>
+                           <cargo.logging>low</cargo.logging>
+                        </properties>
+
+                     </configuration>
+
+
+                     <deployer>
+                        <deployables>
+                           <deployable>
+                              <location>target/${context.path}</location>
+                              <pingURL>http://localhost:8080/${context.path}/login.seam</pingURL>
+                           </deployable>
+                        </deployables>
+                     </deployer>
+
+                  </configuration>
+                  <executions>
+                     <execution>
+                        <id>start</id>
+                        <phase>install</phase>
+                        <goals>
+                           <goal>start</goal>
+                        </goals>
+                     </execution>
+
+                  </executions>
+
+
+               </plugin>
+
+
+            </plugins>
+
+         </build>
+
+      </profile>
+
+
+   </profiles>
+   <properties>
+      <!-- Cargo settings -->
+      <tomcat.local.install>${basedir}/target/installs/tomcat-6.0.13-with-embedded-Beta2-2.0.0.CR2</tomcat.local.install>
+      <cargo.container>tomcat5x</cargo.container>
+      <cargo.container.home>${env.CATALINA_HOME}</cargo.container.home>
+
+      <!--copy the zip somewhere locally so you don't waste time and bandwidth, then modify below-->
+      <cargo.container.url>
+         file:/C:/dev/repository.jboss.org/maven2/org/jboss/embedded/tomcat-with-embedded/tomcat-6.0.13-with-embedded/Beta2-2.0.0.CR2/tomcat-6.0.13-with-embedded-Beta2-2.0.0.CR2.zip
+      </cargo.container.url>
+
+      <!--<cargo.container.url>
+         http://repository.jboss.org/maven2/org/jboss/embedded/tomcat-6.0.13-with-embedded/Beta2-2.0.0.CR2/tomcat-6.0.13-with-embedded-Beta2-2.0.0.CR2.zip
+      </cargo.container.url>-->
+      <cargo.jvmargs>-Xms256m -Xmx1024m -XX:PermSize=1024m -XX:MaxPermSize=1024m</cargo.jvmargs>
+      <cargo.host>localhost</cargo.host>
+      <cargo.port>8080</cargo.port>
+      <cargo.wait>true</cargo.wait>
+
+      <!--This must be the same as the context.path defined in tomcat.properties-->
+      <context.path>${project.build.finalName}</context.path>
+   </properties>
+   <!--Might have to use MAVEN_OPTS=-Xms256m -Xmx1024m -XX:PermSize=1024m -XX:MaxPermSize=1024m
+if the cargo JVM settings don't work (you will know if you start seeing tomcat memory errors) -->
+</project>

Added: portlets/src/framework/Seam/web/src/main/filters/jboss.properties
===================================================================
--- portlets/src/framework/Seam/web/src/main/filters/jboss.properties	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/filters/jboss.properties	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1 @@
+jndi.pattern=SeamBookingPortlet-1.0/#{ejbName}/local
\ No newline at end of file

Added: portlets/src/framework/Seam/web/src/main/filters/tomcat.properties
===================================================================
--- portlets/src/framework/Seam/web/src/main/filters/tomcat.properties	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/filters/tomcat.properties	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,3 @@
+jndi.pattern=#{ejbName}/local
+context.docBase=${basedir}/target/${project.build.finalName}
+context.path=/${project.build.finalName}
\ No newline at end of file

Added: portlets/src/framework/Seam/web/src/main/resources/components.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/resources/components.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/resources/components.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+            xmlns:core="http://jboss.com/products/seam/core"
+            xmlns:drools="http://jboss.com/products/seam/drools"
+            xmlns:persistence="http://jboss.com/products/seam/persistence"
+            xmlns:security="http://jboss.com/products/seam/security"
+            xmlns:web="http://jboss.com/products/seam/web"
+            xmlns:mail="http://jboss.com/products/seam/mail"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation=
+                    "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
+                 http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
+                 http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd
+                 http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
+                 http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd
+                 http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
+                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
+
+    <core:init jndi-pattern="${jndi.pattern}"/>
+
+    <core:manager auto-create="true" conversation-timeout="120000"
+                  concurrent-request-timeout="500"
+                  conversation-id-parameter="cid"/>
+
+    <persistence:managed-persistence-context name="entityManager"
+                                             auto-create="true"
+                                             persistence-unit-jndi-name="java:/seamtestappEntityManagerFactory"/>
+
+
+
+    <security:identity authenticate-method="#{authenticator.authenticate}"
+                       jaas-config-name="test-policy" installed=""/>
+
+  
+</components>

Added: portlets/src/framework/Seam/web/src/main/resources/context.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/resources/context.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/resources/context.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1 @@
+<Context path="${context.path}" docBase="${context.docBase}" debug="99" reloadable="true"/>
\ No newline at end of file

Added: portlets/src/framework/Seam/web/src/main/resources/portal/ajaxportlet-object.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/resources/portal/ajaxportlet-object.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/resources/portal/ajaxportlet-object.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployments>
+  <deployment>
+    <parent-ref>default</parent-ref>
+    <if-exists>overwrite</if-exists>
+    <instance>
+      <instance-name>SeamPortletInstance</instance-name>
+      <component-ref>seamPortletApp.seamPortlet</component-ref>
+    </instance>
+  </deployment>
+  <!--
+  	<deployment>
+  	<parent-ref>default</parent-ref>
+  	<if-exists>overwrite</if-exists>
+  	<page>
+  	<page-name>ajaxPortlet</page-name>
+  	<window>
+  	<window-name>ajaxportletWindow</window-name>
+  	<instance-ref>AjaxPortletInstance</instance-ref>
+  	<default>true</default>
+  	<region>center</region>
+  	<height>0</height>
+  	</window>
+  	<window>
+  	<window-name>ajaxportletSecondWindow</window-name>
+  	<instance-ref>AjaxPortletSecondInstance</instance-ref>
+  	<default>true</default>
+  	<region>center</region>
+  	<height>0</height>
+  	</window>
+  	</page>
+  	</deployment>
+  -->
+  <deployment>
+      <if-exists>overwrite</if-exists>
+      <parent-ref>default.default</parent-ref>
+	    <window>
+		    <window-name>otherSeamportletWindow</window-name>
+		    <instance-ref>SeamPortletInstance</instance-ref>
+		    <default>true</default>
+		    <region>center</region>
+		    <height>0</height>
+	    </window>
+  </deployment><!--
+  <deployment>
+    <parent-ref>default</parent-ref>
+    <if-exists>overwrite</if-exists>
+    <instance>
+      <instance-name>AjaxPortletSecondInstance</instance-name>
+      <component-ref>ajaxPortletApp.ajaxPortlet</component-ref>
+    </instance>
+  </deployment>
+--></deployments>

Added: portlets/src/framework/Seam/web/src/main/resources/portal/jboss-portlet.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/resources/portal/jboss-portlet.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/resources/portal/jboss-portlet.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE portlet-app PUBLIC
+   "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+   "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd"><portlet-app>
+    <portlet>
+         <portlet-name>seamPortlet</portlet-name>
+    </portlet>
+</portlet-app> 
\ No newline at end of file

Added: portlets/src/framework/Seam/web/src/main/resources/portal/portlet-instances.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/resources/portal/portlet-instances.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/resources/portal/portlet-instances.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<deployments>
+	<deployment>
+		<instance>
+			<instance-id>SeamPortletInstance</instance-id>
+			<portlet-ref>seamPortlet</portlet-ref>
+		</instance>
+	</deployment>
+	<deployment>
+		<instance>
+			<instance-id>SeamPortletSecondInstance</instance-id>
+			<portlet-ref>seamPortlet</portlet-ref>
+		</instance>
+	</deployment>
+</deployments>

Added: portlets/src/framework/Seam/web/src/main/resources/portal/portlet.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/resources/portal/portlet.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/resources/portal/portlet.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,36 @@
+<portlet-app version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/portlet"
+  xmlns="http://java.sun.com/xml/ns/portlet">
+  <portlet>
+    <portlet-name>seamPortlet</portlet-name>
+    <portlet-class>
+      javax.portlet.faces.GenericFacesPortlet
+    </portlet-class>
+
+       <init-param>
+        <name>javax.portlet.faces.defaultViewId.view</name>
+        <value>/home.xhtml</value>
+        </init-param>
+
+        <init-param>
+         <name>javax.portlet.faces.defaultViewId.edit</name>
+        <value>/home.xhtml</value>
+       </init-param>
+
+       <init-param>
+         <name>javax.portlet.faces.defaultViewId.help</name>
+         <value>/home.xhtml</value>
+       </init-param>
+
+    <expiration-cache>-0</expiration-cache>
+    <portlet-info>
+       <title>Seam Portlet</title>
+    </portlet-info>
+    <supports>
+      <mime-type>text/html</mime-type>
+      <portlet-mode>VIEW</portlet-mode>
+      <portlet-mode>EDIT</portlet-mode>
+      <portlet-mode>HELP</portlet-mode>
+    </supports>
+  </portlet>
+</portlet-app>

Added: portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/faces-config.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/faces-config.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE faces-config PUBLIC
+          "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+          "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<!--suppress ALL -->
+<faces-config>
+   <application>
+      <!--<view-handler>
+         org.ajax4jsf.portlet.application.PortletViewHandler
+      </view-handler>
+      <state-manager>
+         org.ajax4jsf.portlet.application.PortalStateManager
+      </state-manager>-->
+         <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
+   </application>
+   <factory>
+      <!--<faces-context-factory>
+         org.ajax4jsf.portlet.context.FacesContextFactoryImpl
+      </faces-context-factory>-->
+   </factory>
+   
+</faces-config>

Added: portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/jboss-web.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/jboss-web.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,8 @@
+<jboss-web>  
+  <class-loading java2ClassLoadingCompliance="false">
+    <loader-repository>
+      seam.jboss.org:loader=seamtestapp
+      <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
+    </loader-repository>
+  </class-loading>
+</jboss-web>

Added: portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/pages.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/pages.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,65 @@
+<!DOCTYPE pages PUBLIC
+          "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
+          "http://jboss.com/products/seam/pages-1.2.dtd">
+
+<pages no-conversation-view-id="/index.xhtml"
+                 login-view-id="/login.xhtml"
+      conversation-required="false">
+
+    <!--<page view-id="*" action="#{stickyConversationManager.test}"  propagation="none"/>-->
+
+
+
+
+
+   <exception class="java.util.EmptyStackException">
+        <redirect view-id="/index.xhtml">
+            <message>Error 777</message>
+        </redirect>
+    </exception>
+
+    <exception class="org.jboss.seam.framework.EntityNotFoundException">
+        <redirect view-id="/error.xhtml">
+            <message>Not found</message>
+        </redirect>
+    </exception>
+
+
+    <exception class="javax.persistence.NoResultException">
+        <redirect view-id="/error.xhtml">
+            <message>Dealer Not found</message>
+        </redirect>
+    </exception>
+    
+    <exception class="javax.persistence.EntityNotFoundException">
+        <redirect view-id="/error.xhtml">
+            <message>Not found</message>
+        </redirect>
+    </exception>
+    
+    <exception class="javax.persistence.OptimisticLockException">
+        <end-conversation/>
+        <redirect view-id="/error.xhtml">
+            <message>Another user changed the same data, please try again</message>
+        </redirect>
+    </exception>
+    
+    <exception class="org.jboss.seam.security.AuthorizationException">
+        <redirect>
+            <message>You don't have permission to do this</message>
+        </redirect>
+    </exception>
+    
+    <exception class="org.jboss.seam.security.NotLoggedInException">
+        <redirect view-id="/admin/login.xhtml">
+            <message>Please log in first</message>
+        </redirect>
+    </exception>
+     
+    <exception>
+        <redirect view-id="/error.xhtml">
+            <message>Unexpected error, please try again</message>
+        </redirect>
+    </exception>
+    
+</pages>
\ No newline at end of file

Added: portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/rewriter-config.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/rewriter-config.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/rewriter-config.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<rewriter-config xmlns:b="http://rewriter.softeu.cz/basic/">
+
+    <!-- configures usefull rewritings when using JSF and Facelets -->
+    <b:facelets />
+
+</rewriter-config>

Added: portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/trinidad-config.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/trinidad-config.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/trinidad-config.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
+  <!-- Disable client validation, I don't like it -->
+  <client-validation-disabled>true</client-validation-disabled>
+  <!-- Use our own skin, vaguely like the a4j blueSky skin -->
+  <skin-family>test</skin-family>
+  <!-- Enable debug output here -->
+  <debug-output>false</debug-output>
+  <!-- Improve a4j compatibility -->
+  <accessibility-mode>inaccessible</accessibility-mode>
+</trinidad-config>
\ No newline at end of file

Added: portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/trinidad-skins.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/trinidad-skins.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/trinidad-skins.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,10 @@
+<skins xmlns="http://myfaces.apache.org/trinidad/skin">
+    <skin>
+        <id>test.desktop</id>
+        <family>test</family>
+        <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
+        <style-sheet-name>css/skin.css</style-sheet-name>
+        <bundle-name>messages</bundle-name>
+
+    </skin>
+</skins>
\ No newline at end of file

Added: portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/webapp/WEB-INF/web.xml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+         version="2.4">
+
+   <description>JbossPortalSeamBookingPortlet</description>
+
+   <context-param>
+     <param-name>javax.portlet.faces.BridgeImplClass</param-name>
+     <param-value>org.apache.myfaces.portlet.faces.bridge.BridgeImpl</param-value>
+   </context-param>
+
+   <!-- <context-param>
+     <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+     <param-value>org.ajax4jsf.portlet.application.FaceletPortletViewHandler</param-value>
+    </context-param>
+   <filter>
+     <display-name>Ajax4jsf Filter</display-name>
+     <filter-name>ajax4jsf</filter-name>
+     <filter-class>org.ajax4jsf.Filter</filter-class>
+    </filter>
+
+    <filter-mapping>
+     <filter-name>ajax4jsf</filter-name>
+     <servlet-name>Faces Servlet</servlet-name>
+     <dispatcher>FORWARD</dispatcher>
+     <dispatcher>REQUEST</dispatcher>
+     <dispatcher>INCLUDE</dispatcher>
+    </filter-mapping>-->
+    <!-- Seam -->
+
+   <listener>
+      <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+   </listener>
+
+<!--
+   <servlet>
+      <servlet-name>Seam Resource Servlet</servlet-name>
+      <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
+   </servlet>
+
+   <servlet-mapping>
+      <servlet-name>Seam Resource Servlet</servlet-name>
+      <url-pattern>/seam/resource/*</url-pattern>
+   </servlet-mapping>
+-->
+
+   <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>
+
+
+   <!-- JSF -->
+   <!--<context-param>
+     <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
+     <param-value>NEKO,TIDY,NONE</param-value>
+   </context-param>-->
+   <!--<context-param>
+     <param-name>org.ajax4jsf.xmlparser.TIDY</param-name>
+     <param-value>/pages/repeater.xhtml,/pages/tabs.xhtml</param-value>
+   </context-param>-->
+
+   <context-param>
+      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+      <param-value>server</param-value>
+   </context-param>
+
+   <context-param>
+      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+      <param-value>.xhtml</param-value>
+   </context-param>
+
+   <context-param>
+      <param-name>facelets.DEVELOPMENT</param-name>
+      <param-value>false</param-value>
+   </context-param>
+
+   <servlet>
+      <servlet-name>Faces Servlet</servlet-name>
+      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+      <load-on-startup>1</load-on-startup>
+   </servlet>
+
+   <servlet-mapping>
+      <servlet-name>Faces Servlet</servlet-name>
+      <url-pattern>*.seam</url-pattern>
+   </servlet-mapping>
+
+   <listener>
+      <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+   </listener>
+
+   <session-config>
+      <session-timeout>30</session-timeout>
+   </session-config>
+
+   <welcome-file-list>
+      <welcome-file>index.html</welcome-file>
+   </welcome-file-list>
+
+
+</web-app>
\ No newline at end of file

Added: portlets/src/framework/Seam/web/src/main/webapp/about.xhtml
===================================================================
--- portlets/src/framework/Seam/web/src/main/webapp/about.xhtml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/webapp/about.xhtml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,162 @@
+<ui:composition
+               xmlns:ui="http://java.sun.com/jsf/facelets"
+               xmlns:h="http://java.sun.com/jsf/html"
+               xmlns:f="http://java.sun.com/jsf/core"
+               xmlns:c="http://java.sun.com/jstl/core"
+               xmlns:a4j="http://richfaces.org/a4j"
+               xmlns:rich="http://richfaces.org/rich"
+               xmlns:s="http://jboss.com/products/seam/taglib">
+
+
+
+<div class="community-menu-container float-left third-width">
+   <div class="community-menu-header"/>
+   <div class="community-menu-main align-center">
+      <br/>
+      <h:form id="form">
+
+         <rich:panelMenu style="width:200px" styleClass="align-center-margin" mode="ajax"
+                         iconExpandedGroup="disc" iconCollapsedGroup="disc"
+                         iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
+                         iconCollapsedTopGroup="chevronDown" iconCollapsedTopPosition="right"  itemClass="white" hoveredItemClass="blue">
+
+            <rich:panelMenuGroup label="items" expanded="true">
+               <rich:panelMenuItem label="item1">
+                  <f:param name="current" value="item1"/>
+                  <s:conversationPropagation type="none"/>
+               </rich:panelMenuItem>
+               <rich:panelMenuItem label="item2">
+                  <f:param name="current" value="item2"/>
+                  <s:conversationPropagation type="none"/>
+               </rich:panelMenuItem>
+               <rich:panelMenuItem label="item3">
+                  <f:param name="current" value="item3"/>
+                  <s:conversationPropagation type="none"/>
+               </rich:panelMenuItem>
+
+            </rich:panelMenuGroup>
+
+         </rich:panelMenu>
+
+
+      </h:form>
+      <br/>
+   </div>
+   <div class="community-menu-footer"/>
+</div>
+
+<div class="community-about float-right" style="width:65%">
+
+<rich:panel>
+
+<a4j:outputPanel ajaxRendered="true">
+
+
+
+
+
+<rich:dataTable onRowMouseOver="this.style.backgroundColor='#F1F1F1'" rendered="#{param.current == 'item1'}"
+                onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
+                cellpadding="0" cellspacing="0" width="100%" border="0" var="none" value="">
+
+   <f:facet name="header">
+      <rich:columnGroup>
+         <rich:column colspan="2">
+            <div class="float-left half-width align-left">
+               <h3>item1</h3>
+
+            </div>
+            <div class="float-right half-width">
+               <rich:subTable
+                     onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
+                     onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" var="traddnsactions"
+                     value="">
+                  <rich:column colspan="2">
+                        item1
+                     </rich:column>
+
+                  <rich:columnGroup>
+
+                     <rich:column>
+                        <h3 class="bold-black">item</h3>
+                     </rich:column>
+                     <rich:column styleClass="yellow">
+                        <h3 class="bold-black">item</h3>
+                     </rich:column>
+                  </rich:columnGroup>
+                  <rich:columnGroup>
+
+                     <rich:column>
+                        <h3 class="bold-black">item</h3>
+                     </rich:column>
+                     <rich:column styleClass="green">
+                        <h3 class="bold-black">item</h3>
+                     </rich:column>
+                  </rich:columnGroup>
+                  <rich:columnGroup>
+
+                     <rich:column>
+                        <h3 class="bold-black">item</h3>
+                     </rich:column>
+                     <rich:column styleClass="blue">
+                        <h3 class="bold-black">item</h3>
+                     </rich:column>
+                  </rich:columnGroup>
+               </rich:subTable>
+            </div>
+         </rich:column>
+         <rich:column breakBefore="true">
+
+           <h3> <h:outputText value="item"/></h3>
+
+         </rich:column>
+
+         <rich:column>
+
+           <h3> <h:outputText value="item"/></h3>
+
+         </rich:column>
+
+
+      </rich:columnGroup>
+   </f:facet>
+
+   <rich:column colspan="2" style="background-color:#ececec">
+      <h3 class="bold-black">item</h3>
+   </rich:column>
+   <rich:columnGroup>
+      <rich:column>
+         item
+      </rich:column>
+      <rich:column styleClass="blue">
+         item
+      </rich:column>
+   </rich:columnGroup>
+   <rich:columnGroup>
+      <rich:column>
+         item
+      </rich:column>
+      <rich:column styleClass="blue">
+         item
+      </rich:column>
+   </rich:columnGroup>
+   <rich:columnGroup>
+      <rich:column>
+         item
+      </rich:column>
+      <rich:column styleClass="blue">
+         item
+      </rich:column>
+   </rich:columnGroup>
+
+
+</rich:dataTable>
+
+
+</a4j:outputPanel>
+</rich:panel>
+
+ </div>
+
+
+</ui:composition>

Added: portlets/src/framework/Seam/web/src/main/webapp/css/master.css
===================================================================
--- portlets/src/framework/Seam/web/src/main/webapp/css/master.css	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/webapp/css/master.css	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,147 @@
+body {
+   font: normal 12px Lucida Sans, Trebuchet, tahoma, sans-serif;
+}
+
+.align-center {
+   text-align: center;
+}
+
+.align-left {
+   text-align: left;
+}
+
+.align-center-margin {
+   margin: 0 auto 0 auto;
+}
+
+.float-left {
+   float: left;
+}
+
+.float-right {
+   float: right;
+}
+
+.align-left {
+   text-align: left;
+}
+
+.align-right {
+   text-align: right;
+}
+
+.half-width {
+   width: 49%;
+}
+
+.quarter-width {
+   width: 24.9%;
+}
+
+.three-quarter-width {
+   width: 74.9%;
+}
+
+.full-width {
+   width: 100%;
+}
+
+.third-width {
+   width: 32.9%;
+}
+
+.two-third-width {
+   width: 65.5%;
+}
+
+.tenpx-top-bottom {
+   margin: 10px 0 10px 0;
+}
+
+.relative {
+   position:relative
+}
+
+.absolute{
+   position:absolute
+}
+
+p.white-padded{
+   color:#fff;
+   padding:5px;
+}
+
+.clear {
+   clear: both;
+}
+
+img {
+   margin: 0;
+   padding: 0;
+   border: 0;
+}
+
+   div,
+   form,
+   ul,
+   li{
+   margin: 0;
+   padding: 0;
+}
+
+ul{
+
+}
+
+/*--------------------------------Decoration*/
+
+h2 {
+   font-size: 1.9em;
+   color: #fff;
+   margin: 0;
+   padding: 0;
+}
+
+h3 {
+   font-size: 1.0em;
+   color: #fff;
+   margin: 0;
+   padding: 0;
+}
+
+a {
+   color: #e1d77e;
+}
+
+p {
+   margin: 0;
+   padding: 0;
+}
+
+.white-border {
+   border: 1px solid #fff;
+}
+
+.bold-black {
+   font-size: 1.0em;
+   color: #000;
+}
+
+.yellow {
+   background-color:#FFFF00;
+}
+
+.blue {
+   background-color:#3333CC;
+}
+
+.green {
+   background-color:#009933;
+}
+
+.white {
+   background-color:#fff;
+}
+
+/*---------------------------Main layout*/
+

Added: portlets/src/framework/Seam/web/src/main/webapp/home.xhtml
===================================================================
--- portlets/src/framework/Seam/web/src/main/webapp/home.xhtml	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/webapp/home.xhtml	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,12 @@
+<ui:composition
+               xmlns:ui="http://java.sun.com/jsf/facelets"
+               xmlns:h="http://java.sun.com/jsf/html"
+               xmlns:f="http://java.sun.com/jsf/core"
+               xmlns:c="http://java.sun.com/jstl/core"
+               xmlns:s="http://jboss.com/products/seam/taglib">
+
+      <h:form id="form">
+        <s:button view="/about.xhtml">Test to about</s:button>
+      </h:form>
+
+</ui:composition>

Added: portlets/src/framework/Seam/web/src/main/webapp/index.html
===================================================================
--- portlets/src/framework/Seam/web/src/main/webapp/index.html	                        (rev 0)
+++ portlets/src/framework/Seam/web/src/main/webapp/index.html	2007-11-10 14:08:15 UTC (rev 146)
@@ -0,0 +1,5 @@
+<html>
+<head>
+  <meta http-equiv="Refresh" content="0; URL=home.seam">
+</head>
+</html>
\ No newline at end of file




More information about the jboss-svn-commits mailing list