[seam-commits] Seam SVN: r10792 - in branches/community/Seam_2_1/examples/tasks/resources: META-INF and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue May 5 11:39:41 EDT 2009


Author: jharting
Date: 2009-05-05 11:39:40 -0400 (Tue, 05 May 2009)
New Revision: 10792

Added:
   branches/community/Seam_2_1/examples/tasks/resources/META-INF/
   branches/community/Seam_2_1/examples/tasks/resources/META-INF/application.xml
   branches/community/Seam_2_1/examples/tasks/resources/META-INF/ejb-jar.xml
   branches/community/Seam_2_1/examples/tasks/resources/META-INF/persistence.xml
   branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/
   branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/components.xml
   branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/faces-config.xml
   branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/pages.xml
   branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/web.xml
Log:
seam tasks example server part

Added: branches/community/Seam_2_1/examples/tasks/resources/META-INF/application.xml
===================================================================
--- branches/community/Seam_2_1/examples/tasks/resources/META-INF/application.xml	                        (rev 0)
+++ branches/community/Seam_2_1/examples/tasks/resources/META-INF/application.xml	2009-05-05 15:39:40 UTC (rev 10792)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application 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/application_5.xsd"
+	version="5">
+
+	<display-name>Seam Tasks</display-name>
+
+	<module>
+		<web>
+			<web-uri>jboss-seam-tasks.war</web-uri>
+			<context-root>/seam-tasks</context-root>
+		</web>
+	</module>
+
+	<module>
+		<ejb>jboss-seam-tasks.jar</ejb>
+	</module>
+
+	<module>
+		<ejb>jboss-seam.jar</ejb>
+	</module>
+
+</application>


Property changes on: branches/community/Seam_2_1/examples/tasks/resources/META-INF/application.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/community/Seam_2_1/examples/tasks/resources/META-INF/ejb-jar.xml
===================================================================
--- branches/community/Seam_2_1/examples/tasks/resources/META-INF/ejb-jar.xml	                        (rev 0)
+++ branches/community/Seam_2_1/examples/tasks/resources/META-INF/ejb-jar.xml	2009-05-05 15:39:40 UTC (rev 10792)
@@ -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>


Property changes on: branches/community/Seam_2_1/examples/tasks/resources/META-INF/ejb-jar.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/community/Seam_2_1/examples/tasks/resources/META-INF/persistence.xml
===================================================================
--- branches/community/Seam_2_1/examples/tasks/resources/META-INF/persistence.xml	                        (rev 0)
+++ branches/community/Seam_2_1/examples/tasks/resources/META-INF/persistence.xml	2009-05-05 15:39:40 UTC (rev 10792)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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="tasksDatabase">
+      <provider>org.hibernate.ejb.HibernatePersistence</provider>
+      <jta-data-source>java:/tasksDatasource</jta-data-source>
+      <properties>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+         <property name="hibernate.show_sql" value="true"/>
+         <!-- These are the default for JBoss EJB3, but not for HEM: -->
+         <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
+         <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
+         <property name="jboss.entity.manager.factory.jndi.name" value="java:/tasksEntityManagerFactory"/>
+      </properties>
+   </persistence-unit>
+</persistence>


Property changes on: branches/community/Seam_2_1/examples/tasks/resources/META-INF/persistence.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/components.xml	                        (rev 0)
+++ branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/components.xml	2009-05-05 15:39:40 UTC (rev 10792)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+	xmlns:core="http://jboss.com/products/seam/core" xmlns:security="http://jboss.com/products/seam/security"
+	xmlns:transaction="http://jboss.com/products/seam/transaction"
+	xmlns:persistence="http://jboss.com/products/seam/persistence"
+	xmlns:framework="http://jboss.com/products/seam/framework" xmlns:web="http://jboss.com/products/seam/web"
+	xmlns:resteasy="http://jboss.com/products/seam/resteasy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd
+		http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
+        http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.1.xsd
+        http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd
+        http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.1.xsd
+        http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
+        http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.1.xsd
+        http://jboss.com/products/seam/resteasy http://jboss.com/products/seam/resteasy-2.1.xsd">
+
+	<core:init jndi-pattern="@jndiPattern@" debug="false" />
+
+	<core:manager conversation-timeout="120000"
+		concurrent-request-timeout="500" conversation-id-parameter="cid" />
+
+	<transaction:ejb-transaction />
+
+	<persistence:managed-persistence-context
+	name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/tasksEntityManagerFactory" />
+
+	<framework:entity-home name="userHome"
+		entity-class="org.jboss.seam.example.tasks.entity.User" auto-create="true" />
+
+	<framework:entity-query name="contextQuery"
+		ejbql="select c from Context c">
+		<framework:restrictions>
+			<value>c.owner.username =
+				#{user.username}</value>
+		</framework:restrictions>
+	</framework:entity-query>
+
+	<resteasy:resource-query name="contextResourceQuery"
+		entity-query="#{contextQuery}" path="/auth/context"
+		entity-class="org.jboss.seam.example.tasks.entity.Context"
+		media-types="application/xml application/json application/fastinfoset">
+	</resteasy:resource-query>
+
+	<resteasy:application resource-path-prefix="/v1">
+		<resteasy:media-type-mappings>
+			<key>xml</key>
+			<value>application/xml</value>
+		</resteasy:media-type-mappings>
+	</resteasy:application>
+
+
+	<web:authentication-filter url-pattern="/seam/resource/v1/auth/*"
+	auth-type="basic" realm="Seam Tasks Application" />
+
+	<security:identity authenticate-method="#{authenticator.authenticate}" />
+
+</components>


Property changes on: branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/components.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/faces-config.xml	                        (rev 0)
+++ branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/faces-config.xml	2009-05-05 15:39:40 UTC (rev 10792)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<faces-config version="1.2"
+              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/web-facesconfig_1_2.xsd">
+    
+    <application>
+        <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+    </application>
+
+</faces-config>


Property changes on: branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/pages.xml
===================================================================
--- branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/pages.xml	                        (rev 0)
+++ branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/pages.xml	2009-05-05 15:39:40 UTC (rev 10792)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pages xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://jboss.com/products/seam/pages /home/jharting/jboss/workspace/Seam_trunk_working_copy/src/main/org/jboss/seam/pages-2.1.xsd"
+
+	no-conversation-view-id="/main.xhtml" login-view-id="/login.xhtml">
+
+	<page view-id="/login.xhtml">
+		<navigation from-action="#{identity.login}">
+			<rule if="#{identity.loggedIn}">
+				<redirect view-id="/tasks.xhtml" />
+			</rule>
+		</navigation>
+	</page>
+
+	<page view-id="/tasks.xhtml" login-required="true" />
+
+	<page view-id="/contexts.xhtml" login-required="true" />
+
+	<page view-id="/resolved.xhtml" login-required="true" />
+
+	<exception class="javax.persistence.NoResultException"
+		log-level="debug">
+		<http-error error-code="404" />
+	</exception>
+
+	<exception class="org.jboss.seam.security.AuthorizationException"
+		log-level="debug">
+		<http-error error-code="403">
+			<message>Unauthorized</message>
+		</http-error>
+	</exception>
+
+	<exception class="org.jboss.seam.framework.EntityNotFoundException"
+		log-level="debug">
+		<http-error error-code="404">
+			<message>Not Found</message>
+		</http-error>
+	</exception>
+
+	<exception
+		class="org.jboss.seam.example.tasks.exceptions.ResourceNotFoundException"
+		log-level="debug">
+		<http-error error-code="404">
+			<message>Not Found</message>
+		</http-error>
+	</exception>
+
+	<exception class="java.sql.BatchUpdateException" log-level="debug">
+		<http-error error-code="409">
+			<message>Conflict</message>
+		</http-error>
+	</exception>
+	
+	<exception class="javax.persistence.EntityExistsException" log-level="debug">
+		<http-error error-code="409">
+			<message>Conflict</message>
+		</http-error>
+	</exception>
+	
+	<exception class="org.hibernate.PropertyValueException"
+		log-level="debug">
+		<http-error error-code="400">
+			<message>Bad request</message>
+		</http-error>
+	</exception>
+
+	<exception>
+		<http-error error-code="500" />
+	</exception>
+
+</pages>


Property changes on: branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/pages.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/web.xml	                        (rev 0)
+++ branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/web.xml	2009-05-05 15:39:40 UTC (rev 10792)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5"
+    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/web-app_2_5.xsd">
+
+    <display-name>Seam Tasks Example</display-name>
+    
+    <!-- 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.SeamResourceServlet</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>javax.faces.DEFAULT_SUFFIX</param-name>
+        <param-value>.xhtml</param-value>
+    </context-param>
+    
+    <context-param>
+        <param-name>facelets.DEVELOPMENT</param-name>
+        <param-value>true</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>
+
+    <session-config>
+        <session-timeout>10</session-timeout> 
+    </session-config>    
+    
+</web-app>


Property changes on: branches/community/Seam_2_1/examples/tasks/resources/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the seam-commits mailing list