Author: manaRH
Date: 2009-01-29 10:48:00 -0500 (Thu, 29 Jan 2009)
New Revision: 9984
Added:
trunk/examples/jpa/build-websphere7.xml
trunk/examples/jpa/resources-websphere7/
trunk/examples/jpa/resources-websphere7/WEB-INF/
trunk/examples/jpa/resources-websphere7/WEB-INF/classes/
trunk/examples/jpa/resources-websphere7/WEB-INF/classes/log4j.xml
trunk/examples/jpa/resources-websphere7/WEB-INF/components.xml
trunk/examples/jpa/resources-websphere7/WEB-INF/faces-config.xml
trunk/examples/jpa/resources-websphere7/WEB-INF/pages.xml
trunk/examples/jpa/resources-websphere7/WEB-INF/web.xml
trunk/examples/jpa/resources-websphere7/import.sql
trunk/examples/jpa/resources-websphere7/seam.properties
trunk/examples/jpa/src/GlassfishDerbyDialect.java
Removed:
trunk/examples/jpa/resources-websphere61/WEB-INF/classes/GlassfishDerbyDialect.class
Modified:
trunk/examples/jpa/build.xml
Log:
JBSEAM-3570 - adding new configuration for WAS V7
Added: trunk/examples/jpa/build-websphere7.xml
===================================================================
--- trunk/examples/jpa/build-websphere7.xml (rev 0)
+++ trunk/examples/jpa/build-websphere7.xml 2009-01-29 15:48:00 UTC (rev 9984)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<project name="JPA Booking" default="noejb.archive"
basedir=".">
+
+ <!-- Naming -->
+ <property name="Name" value="The JPA Example for WebSphere 7"
/>
+ <property name="example.name" value="jboss-seam-jpa" />
+
+ <!-- resources -->
+ <property name="resources.dir" value="resources-websphere7"
/>
+ <property name="dist.dir" value="dist-websphere7" />
+ <property name="exploded-archives.dir"
value="exploded-archives-websphere7" />
+
+ <!-- Libraries to include -->
+ <property name="seam.ui.lib" value="true" />
+ <property name="seam.debug.lib" value="true" />
+ <property name="facelets.lib" value="true" />
+ <property name="richfaces.lib" value="true" />
+ <property name="el-ri.lib" value="true" />
+ <property name="jboss-common-core.lib" value="true" />
+
+ <import file="../build.xml" />
+
+ <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
+ <!-- Seam deps -->
+ <include name="lib/dom4j.jar" />
+ <include name="lib/javassist.jar" />
+
+ <!-- Misc -->
+ <include name="lib/commons-beanutils.jar" />
+ <include name="lib/commons-digester.jar" />
+ <include name="lib/commons-collections.jar" />
+ <!-- JSF (and related) implementation -->
+ <!-- <include name="lib/jsf-api.jar"/>-->
+<!-- <include name="lib/jsf-impl.jar" />-->
+<!-- <include name="lib/el-api.jar" />-->
+
+ <!-- Hibernate and deps -->
+ <include name="lib/hibernate.jar" />
+ <include name="lib/hibernate-commons-annotations.jar" />
+ <include name="lib/hibernate-annotations.jar" />
+ <include name="lib/hibernate-entitymanager.jar" />
+ <include name="lib/hibernate-validator.jar" />
+ <include name="lib/cglib.jar" />
+ <include name="lib/asm.jar" />
+ <include name="lib/antlr.jar" />
+ </fileset>
+
+ <fileset id="noejb.war.extras" dir="${resources.dir}">
+ <include name="WEB-INF/classes/**/*" />
+ </fileset>
+
+</project>
+
Property changes on: trunk/examples/jpa/build-websphere7.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/examples/jpa/build.xml
===================================================================
--- trunk/examples/jpa/build.xml 2009-01-29 00:13:36 UTC (rev 9983)
+++ trunk/examples/jpa/build.xml 2009-01-29 15:48:00 UTC (rev 9984)
@@ -42,6 +42,10 @@
<ant antfile="build-websphere61.xml"/>
</target>
+ <target name="websphere7" description="Build the JPA artifacts,
suitable for deployment to WebSphere 7">
+ <ant antfile="build-websphere7.xml"/>
+ </target>
+
<target name="tomcat55" description="Build the JPA artifacts,
suitable for deployment to Tomcat 5.5">
<ant antfile="build-tomcat55.xml"/>
</target>
@@ -65,12 +69,13 @@
<ant antfile="build-weblogic92.xml" target="clean" />
<ant antfile="build-weblogic10.xml" target="clean" />
<ant antfile="build-websphere61.xml" target="clean" />
+ <ant antfile="build-websphere7.xml" target="clean" />
<ant antfile="build-tomcat55.xml" target="clean" />
<ant antfile="build-tomcat6.xml" target="clean" />
<ant antfile="build-jboss-embedded.xml" target="clean"
/>
</target>
- <target name="all" depends="jboss, jboss405, glassfish,
weblogic92,weblogic10, websphere61, tomcat55, tomcat6"/>
+ <target name="all" depends="jboss, jboss405, glassfish,
weblogic92,weblogic10, websphere61, websphere7, tomcat55, tomcat6"/>
<target name="test">
<ant antfile="build-jboss.xml" target="test" />
Deleted:
trunk/examples/jpa/resources-websphere61/WEB-INF/classes/GlassfishDerbyDialect.class
===================================================================
(Binary files differ)
Added: trunk/examples/jpa/resources-websphere7/WEB-INF/classes/log4j.xml
===================================================================
--- trunk/examples/jpa/resources-websphere7/WEB-INF/classes/log4j.xml
(rev 0)
+++ trunk/examples/jpa/resources-websphere7/WEB-INF/classes/log4j.xml 2009-01-29 15:48:00
UTC (rev 9984)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 5723 2007-07-08 22:54:42Z myuan $ -->
+
+<!--
+ | 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">
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p
[%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!--
+ <category name="org.hibernate">
+ <priority value="DEBUG"/>
+ </category>
+ -->
+
+
+ <category name="org.jboss.seam">
+ <priority value="DEBUG"/>
+ </category>
+
+
+ <!--
+ <category name="org.jboss.kernel">
+ <priority value="DEBUG"/>
+ </category>
+ -->
+
+ <root>
+ <priority value="INFO"/>
+ <appender-ref ref="CONSOLE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: trunk/examples/jpa/resources-websphere7/WEB-INF/classes/log4j.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/resources-websphere7/WEB-INF/components.xml
===================================================================
--- trunk/examples/jpa/resources-websphere7/WEB-INF/components.xml
(rev 0)
+++ trunk/examples/jpa/resources-websphere7/WEB-INF/components.xml 2009-01-29 15:48:00 UTC
(rev 9984)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components
xmlns="http://jboss.com/products/seam/components"
+
xmlns:core="http://jboss.com/products/seam/core"
+
xmlns:persistence="http://jboss.com/products/seam/persistence"
+
xmlns:transaction="http://jboss.com/products/seam/transaction"
+
xmlns:security="http://jboss.com/products/seam/security"
+
xmlns:web="http://jboss.com/products/seam/web"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-2.1.xsd
+
http://jboss.com/products/seam/persistence
http://jboss.com/products/seam/persistence-2.1.xsd
+
http://jboss.com/products/seam/security
http://jboss.com/products/seam/security-2.1.xsd
+
http://jboss.com/products/seam/transaction
http://jboss.com/products/seam/transaction-2.1.xsd
+
http://jboss.com/products/seam/web
http://jboss.com/products/seam/web-2.1.xsd
+
http://jboss.com/products/seam/components
http://jboss.com/products/seam/components-2.1.xsd">
+
+ <core:manager conversation-timeout="120000"
+ concurrent-request-timeout="500"
+ conversation-id-parameter="cid"/>
+
+ <transaction:entity-transaction entity-manager="#{em}"/>
+
+ <persistence:entity-manager-factory name="bookingDatabase"/>
+
+ <persistence:managed-persistence-context name="em"
auto-create="true"
+ entity-manager-factory="#{bookingDatabase}"/>
+
+ <security:identity
authenticate-method="#{authenticator.authenticate}"/>
+
+</components>
Property changes on: trunk/examples/jpa/resources-websphere7/WEB-INF/components.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/resources-websphere7/WEB-INF/faces-config.xml
===================================================================
--- trunk/examples/jpa/resources-websphere7/WEB-INF/faces-config.xml
(rev 0)
+++ trunk/examples/jpa/resources-websphere7/WEB-INF/faces-config.xml 2009-01-29 15:48:00
UTC (rev 9984)
@@ -0,0 +1,12 @@
+<?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">
+
+ <!-- Facelets support -->
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+
+</faces-config>
Property changes on: trunk/examples/jpa/resources-websphere7/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/resources-websphere7/WEB-INF/pages.xml
===================================================================
--- trunk/examples/jpa/resources-websphere7/WEB-INF/pages.xml (rev
0)
+++ trunk/examples/jpa/resources-websphere7/WEB-INF/pages.xml 2009-01-29 15:48:00 UTC (rev
9984)
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pages
xmlns="http://jboss.com/products/seam/pages"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://jboss.com/products/seam/pages
http://jboss.com/products/seam/pages-2.1.xsd"
+
+ no-conversation-view-id="/main.xhtml"
+ login-view-id="/home.xhtml">
+
+ <page view-id="/register.xhtml">
+
+ <action if="#{validation.failed}"
+ execute="#{register.invalid}"/>
+
+ <navigation>
+ <rule if="#{register.registered}">
+ <redirect view-id="/home.xhtml"/>
+ </rule>
+ </navigation>
+
+ </page>
+
+ <page view-id="/home.xhtml"
action="#{identity.isLoggedIn}">
+
+ <navigation from-action="#{identity.isLoggedIn}">
+ <rule if-outcome="true">
+ <redirect view-id="/main.xhtml"/>
+ </rule>
+ </navigation>
+
+ <navigation>
+ <rule if="#{identity.loggedIn}">
+ <redirect view-id="/main.xhtml"/>
+ </rule>
+ </navigation>
+
+ </page>
+
+ <page view-id="/password.xhtml"
+ login-required="true">
+
+ <navigation>
+ <rule if="#{changePassword.changed}">
+ <redirect view-id="/main.xhtml"/>
+ </rule>
+ </navigation>
+
+ </page>
+
+ <page view-id="/main.xhtml"
+ login-required="true">
+
+ <navigation from-action="#{hotelBooking.selectHotel(hot)}">
+ <redirect view-id="/hotel.xhtml"/>
+ </navigation>
+
+ </page>
+
+ <page view-id="/hotel.xhtml"
+ conversation-required="true">
+
+ <description>View hotel: #{hotel.name}</description>
+
+ <navigation from-action="#{hotelBooking.bookHotel}">
+ <redirect view-id="/book.xhtml"/>
+ </navigation>
+
+ </page>
+
+ <page view-id="/book.xhtml"
+ conversation-required="true">
+
+ <description>Book hotel: #{hotel.name}</description>
+
+ <navigation from-action="#{hotelBooking.setBookingDetails}">
+ <rule if="#{hotelBooking.bookingValid}">
+ <redirect view-id="/confirm.xhtml"/>
+ </rule>
+ </navigation>
+
+ </page>
+
+ <page view-id="/confirm.xhtml"
+ conversation-required="true">
+
+ <description>Confirm booking: #{booking.description}</description>
+
+ <navigation from-action="#{hotelBooking.confirm}">
+ <redirect view-id="/main.xhtml"/>
+ </navigation>
+
+ </page>
+
+ <page view-id="*">
+
+ <navigation from-action="#{identity.logout}">
+ <redirect view-id="/home.xhtml"/>
+ </navigation>
+
+ <navigation from-action="#{hotelBooking.cancel}">
+ <redirect view-id="/main.xhtml"/>
+ </navigation>
+
+ </page>
+
+ <exception class="org.jboss.seam.security.NotLoggedInException">
+ <redirect view-id="/home.xhtml">
+ <message severity="warn">You must be logged in to use this
feature</message>
+ </redirect>
+ </exception>
+
+ <exception class="javax.faces.application.ViewExpiredException">
+ <redirect view-id="/home.xhtml">
+ <message severity="warn">Session expired, please log in
again</message>
+ </redirect>
+ </exception>
+
+</pages>
Property changes on: trunk/examples/jpa/resources-websphere7/WEB-INF/pages.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/resources-websphere7/WEB-INF/web.xml
===================================================================
--- trunk/examples/jpa/resources-websphere7/WEB-INF/web.xml (rev
0)
+++ trunk/examples/jpa/resources-websphere7/WEB-INF/web.xml 2009-01-29 15:48:00 UTC (rev
9984)
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app id="WebApp_ID" version="2.4"
+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">
+ <!-- Seam -->
+
+ <listener>
+ <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+ </listener>
+
+ <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>
+
+ <filter>
+ <filter-name>RichFaces Filter</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ <init-param>
+ <param-name>enable-cache</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>RichFaces Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <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>
+
+
+ <!-- Faces Servlet -->
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- Faces Servlet Mapping -->
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
+
+ <!-- JSF parameters -->
+
+ <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>
+
+ <listener>
+
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+</web-app>
Property changes on: trunk/examples/jpa/resources-websphere7/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/resources-websphere7/import.sql
===================================================================
--- trunk/examples/jpa/resources-websphere7/import.sql (rev 0)
+++ trunk/examples/jpa/resources-websphere7/import.sql 2009-01-29 15:48:00 UTC (rev 9984)
@@ -0,0 +1,22 @@
+insert into Customer (username, password, name) values ('gavin',
'foobar', 'Gavin King')
+insert into Customer (username, password, name) values ('demo', 'demo',
'Demo User')
+insert into Hotel (price, name, address, city, state, zip, country) values (120,
'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta',
'GA', '30305', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (180,
'Doubletree', 'Tower Place, Buckhead', 'Atlanta', 'GA',
'30305', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (450, 'W
Hotel', 'Union Square, Manhattan', 'NY', 'NY',
'10011', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (450, 'W
Hotel', 'Lexington Ave, Manhattan', 'NY', 'NY',
'10011', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (250,
'Hotel Rouge', '1315 16th Street NW', 'Washington', 'DC',
'20036', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (300, '70
Park Avenue Hotel', '70 Park Avenue', 'NY', 'NY',
'10011', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (300,
'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL',
'33131', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (80, 'Sea
Horse Inn', '2106 N Clairemont Ave', 'Eau Claire', 'WI',
'54703', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (90,
'Super 8 Eau Claire Campus Area', '1151 W Macarthur Ave', 'Eau
Claire', 'WI', '54701', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (160,
'Marriot Downtown', '55 Fourth Street', 'San Francisco',
'CA', '94103', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (200,
'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona',
'Catalunya', '08019', 'Spain')
+insert into Hotel (price, name, address, city, state, zip, country) values (210,
'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '',
'63405', 'Israel')
+insert into Hotel (price, name, address, city, state, zip, country) values (240,
'InterContinental Tokyo Bay', 'Takeshiba Pier', 'Tokyo',
'', '105', 'Japan')
+insert into Hotel (price, name, address, city, state, zip, country) values (130,
'Hotel Beaulac', ' Esplanade Leopold-Robert 2', 'Neuchatel',
'', '2000', 'Switzerland')
+insert into Hotel (price, name, address, city, state, zip, country) values (140,
'Conrad Treasury Place', 'William & George Streets',
'Brisbane', 'QLD', '4001', 'Australia')
+insert into Hotel (price, name, address, city, state, zip, country) values (230,
'Ritz Carlton', '1228 Sherbrooke St', 'West Montreal',
'Quebec', 'H3G1H6', 'Canada')
+insert into Hotel (price, name, address, city, state, zip, country) values (460,
'Ritz Carlton', 'Peachtree Rd, Buckhead', 'Atlanta', 'GA',
'30326', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (220,
'Swissotel', '68 Market Street', 'Sydney', 'NSW',
'2000', 'Australia')
+insert into Hotel (price, name, address, city, state, zip, country) values (250,
'Meli White House', 'Albany Street', 'Regents Park London',
'', 'NW13UP', 'Great Britain')
+insert into Hotel (price, name, address, city, state, zip, country) values (210,
'Hotel Allegro', '171 West Randolph Street', 'Chicago',
'IL', '60601', 'USA')
Added: trunk/examples/jpa/resources-websphere7/seam.properties
===================================================================
Property changes on: trunk/examples/jpa/resources-websphere7/seam.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/src/GlassfishDerbyDialect.java
===================================================================
--- trunk/examples/jpa/src/GlassfishDerbyDialect.java (rev 0)
+++ trunk/examples/jpa/src/GlassfishDerbyDialect.java 2009-01-29 15:48:00 UTC (rev 9984)
@@ -0,0 +1,19 @@
+import org.hibernate.dialect.DerbyDialect;
+import org.hibernate.id.IdentityGenerator;
+
+
+public class GlassfishDerbyDialect extends DerbyDialect {
+
+ public GlassfishDerbyDialect() {
+
+ }
+
+ @Override
+ public Class getNativeIdentifierGeneratorClass() {
+
+ return IdentityGenerator.class;
+ }
+
+
+
+}
Property changes on: trunk/examples/jpa/src/GlassfishDerbyDialect.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain