You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xi...@apache.org on 2010/08/19 11:01:07 UTC
svn commit: r987088 [1/2] - in
/geronimo/server/trunk/testsuite/javaee6-testsuite: ./ webbean1.0-test/
webbean1.0-test/conversation-test/ webbean1.0-test/conversation-test/src/
webbean1.0-test/conversation-test/src/main/
webbean1.0-test/conversation-te...
Author: xiaming
Date: Thu Aug 19 09:01:05 2010
New Revision: 987088
URL: http://svn.apache.org/viewvc?rev=987088&view=rev
Log:
GERONIMO-5538 add two test bucket about scope annotation in web bean and webbean+EJB, provided by Lu Jiang
Added:
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/pom.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Item.java (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Products.java (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBean.java (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/beans.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/faces-config.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/geronimo-web.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/web.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/buy.xhtml
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/index.html (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/listing.xhtml
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/webbeans/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/webbeans/TestConversation.java (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/resources/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/resources/testng.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/pom.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/pom.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/OperationBean.java (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/Telephone.java (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/TelephoneBean.java (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/entity/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/entity/Record.java (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/util/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/util/FacesMessageUtil.java (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/persistence.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/persistence_derby_openjpa.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/persistence_eclipselink.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/persistence_hsql_openjpa.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/WEB-INF/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/WEB-INF/beans.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/WEB-INF/faces-config.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/WEB-INF/geronimo-web.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/WEB-INF/web.xml (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/contact.xhtml
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/index.html (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/org/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/org/apache/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/org/apache/webbean/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/org/apache/webbean/sample/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/org/apache/webbean/sample/ejbtelephone/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/org/apache/webbean/sample/ejbtelephone/test/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/org/apache/webbean/sample/ejbtelephone/test/EjbtelephoneTest.java (with props)
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/resources/
geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/resources/testng.xml (with props)
Modified:
geronimo/server/trunk/testsuite/javaee6-testsuite/pom.xml
Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/pom.xml?rev=987088&r1=987087&r2=987088&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/pom.xml (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/pom.xml Thu Aug 19 09:01:05 2010
@@ -62,6 +62,7 @@
<module>managedbean1.0-test</module>
<module>di1.0-test</module>
<module>interceptors1.1-test</module>
+ <module>webbean1.0-test</module>
-->
<module>commonannotation1.1-test</module>
<module>jta1.1-test</module>
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/pom.xml?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/pom.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/pom.xml Thu Aug 19 09:01:05 2010
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<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.apache.geronimo.testsuite</groupId>
+ <artifactId>webbean1.0-test</artifactId>
+ <version>3.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>conversation-test</artifactId>
+ <name>Geronimo TestSuite :: Java EE 6 Testsuite :: Web Bean :: conversation-test</name>
+ <packaging>war</packaging>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>myfaces</artifactId>
+ <version>${geronimoVersion}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+
+ <dependencies>
+ <!-- JSR-314 API - JSF 2.0 -->
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- JSR-299 API - Web Beans 1.0-->
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jcdi_1.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- JSR-330 API - Dependency Injection for Java 1.0-->
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-atinject_1.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <archiveClasses>false</archiveClasses>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>it</id>
+ <activation>
+ <property>
+ <name>it</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.geronimo.buildsupport</groupId>
+ <artifactId>geronimo-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>deploy-wars</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>deploy-module</goal>
+ </goals>
+ <configuration>
+ <moduleArchive>${project.build.directory}/${project.artifactId}-${project.version}.war</moduleArchive>
+ </configuration>
+ </execution>
+ <execution>
+ <id>undeploy-war-as-moduleId</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>undeploy-module</goal>
+ </goals>
+ <configuration>
+ <moduleId>${project.groupId}/${project.artifactId}/${project.version}/war</moduleId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <suiteXmlFiles>
+ <suiteXmlFile>${project.build.testOutputDirectory}/testng.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ <testFailureIgnore>true</testFailureIgnore>
+ <systemPropertyVariables>
+ <appContext>${project.artifactId}</appContext>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Item.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Item.java?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Item.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Item.java Thu Aug 19 09:01:05 2010
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.samples.conversation;
+
+import java.io.Serializable;
+
+public class Item implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ private String name;
+
+ private long price;
+
+ public Item()
+ {
+
+ }
+
+ public Item(String name, long price)
+ {
+ this.name = name;
+ this.price = price;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * @return the price
+ */
+ public long getPrice()
+ {
+ return price;
+ }
+
+ /**
+ * @param price the price to set
+ */
+ public void setPrice(long price)
+ {
+ this.price = price;
+ }
+
+
+
+}
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Item.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Item.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Item.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Products.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Products.java?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Products.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Products.java Thu Aug 19 09:01:05 2010
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.samples.conversation;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Named;
+
+@Named
+@ApplicationScoped
+public class Products implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ private List<Item> products = new ArrayList<Item>();
+
+ public Products()
+ {
+
+ }
+
+ @PostConstruct
+ public void afterInit()
+ {
+ for(int i=1;i<6;i++)
+ {
+ Item item = new Item("Item-" + i,i*1500L);
+ products.add(item);
+ }
+ }
+
+ @PreDestroy
+ public void preDestroy()
+ {
+ products.clear();
+ }
+
+ /**
+ * @return the products
+ */
+ public List<Item> getProducts()
+ {
+ return products;
+ }
+
+
+}
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Products.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Products.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/Products.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBean.java?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBean.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBean.java Thu Aug 19 09:01:05 2010
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.samples.conversation;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.enterprise.context.Conversation;
+import javax.enterprise.context.ConversationScoped;
+import javax.enterprise.inject.New;
+import javax.enterprise.inject.Produces;
+import javax.faces.component.UIData;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+@Named
+@ConversationScoped
+public class ShoppingBean implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ private @Inject Products products;
+
+ private @Inject Conversation conversation;
+
+ private List<Item> items = new ArrayList<Item>();
+
+ private UIData uiTable;
+
+
+ public ShoppingBean()
+ {
+
+ }
+
+ @Inject
+ public ShoppingBean(@New Item defaultItem)
+ {
+ defaultItem.setName("Default Item");
+ defaultItem.setPrice(1000L);
+
+ items.add(defaultItem);
+ }
+
+
+ public String startShopping()
+ {
+ this.conversation.begin();
+
+ return null;
+ }
+
+ public String checkout()
+ {
+ this.conversation.end();
+
+ return null;
+ }
+
+ public Conversation getConversation()
+ {
+ return this.conversation;
+ }
+
+ @Produces @Named("selectedItems")
+ public List<Item> listSelectedItems()
+ {
+ return this.items;
+ }
+
+ public String buy()
+ {
+ Item item = (Item) uiTable.getRowData();
+ this.items.add(item);
+
+ return null;
+ }
+
+ @Produces @Named("allProducts")
+ public List<Item> listAllProducts()
+ {
+ return this.products.getProducts();
+ }
+
+ /**
+ * @return the uiTable
+ */
+ public UIData getUiTable()
+ {
+ return uiTable;
+ }
+
+ /**
+ * @param uiTable the uiTable to set
+ */
+ public void setUiTable(UIData uiTable)
+ {
+ this.uiTable = uiTable;
+ }
+
+}
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBean.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBean.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/beans.xml?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/beans.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/beans.xml Thu Aug 19 09:01:05 2010
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<beans/>
\ No newline at end of file
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/faces-config.xml?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/faces-config.xml Thu Aug 19 09:01:05 2010
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version
+ 2.0 (the "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+ applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the
+ License.
+-->
+<faces-config version="2.0"
+ 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_2.0.xsd">
+
+</faces-config>
\ No newline at end of file
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/geronimo-web.xml?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/geronimo-web.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/geronimo-web.xml Thu Aug 19 09:01:05 2010
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
+ xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
+ xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
+ xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
+
+ <sys:environment>
+ <sys:moduleId>
+ <sys:groupId>${project.groupId}</sys:groupId>
+ <sys:artifactId>${project.artifactId}</sys:artifactId>
+ <sys:version>${project.version}</sys:version>
+ <sys:type>war</sys:type>
+ </sys:moduleId>
+ <sys:dependencies/>
+ <sys:hidden-classes/>
+ <sys:non-overridable-classes/>
+ </sys:environment>
+
+ <context-root>/${project.artifactId}</context-root>
+
+</web-app>
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/web.xml?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/web.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/web.xml Thu Aug 19 09:01:05 2010
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version
+ 2.0 (the "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+ applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the
+ License.
+-->
+<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>Web Beans Conversation example</display-name>
+
+
+ <!-- JSF -->
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+</web-app>
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/buy.xhtml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/buy.xhtml?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/buy.xhtml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/buy.xhtml Thu Aug 19 09:01:05 2010
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version
+ 2.0 (the "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+ applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the
+ License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+ <head>
+ <title>OpenWebBeans :: Examples</title>
+ </head>
+ <body>
+
+ <div>
+ <h3>Shopping Card Example</h3>
+ <ul>
+ <li>When user clicks <b style="color:red;">"Starts Shopping"</b> button, new conversation is started. When user clicks <b style="color:red;">"Checkout"</b> button, conversation ends.</li>
+ <li>When user clicks <b style="color:red;">"Add Item"</b> link in the table, it adds new item to the buyer's shopping card.</li>
+ <li>When user clicks <b style="color:red;">"To Listing Page"</b> button, it shows content of buyer shopping card in a new page.</li>
+ </ul>
+ </div>
+
+ <h:form id="form">
+ <div>
+ <h:outputText value="Current Conversation Id : " style="color:red;"/>
+ <h:outputText value="#{shoppingBean.conversation.id}" id="conversation" style="font-weight:bold;" />
+ </div>
+
+ <div style="margin-top: 10px;">
+ <h:commandButton id="button1" value="Starts Shopping" action="#{shoppingBean.startShopping}">
+ </h:commandButton>
+
+ <h:commandButton id="button3" value="To Listing Page" action="toListingPage">
+ </h:commandButton>
+
+ <h:commandButton id="button4" value="Checkout" action="#{shoppingBean.checkout}">
+ </h:commandButton>
+
+ </div>
+
+ <div style="margin-top: 10px;">
+ <h3>Products Details</h3>
+ <h:dataTable cellpadding="1" cellspacing="5" value="#{allProducts}" var="item" binding="#{shoppingBean.uiTable}">
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Product Name" />
+ </f:facet>
+ <h:outputText id="#{item.name}name" value="#{item.name}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Product Price" />
+ </f:facet>
+ <h:outputText id="#{item.name}Price" value="#{item.price}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="" />
+ </f:facet>
+ <h:commandLink action="#{shoppingBean.buy}" value="Add Item to Card" />
+ </h:column>
+
+ </h:dataTable>
+ </div>
+
+ <div style="margin-top: 10px;">
+ <h3>Current Shopping Card Content</h3>
+ <h:dataTable cellpadding="1" cellspacing="5" value="#{selectedItems}" var="item">
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Product Name" />
+ </f:facet>
+ <h:outputText value="#{item.name}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Product Price" />
+ </f:facet>
+ <h:outputText value="#{item.price}" />
+ </h:column>
+ </h:dataTable>
+ </div>
+ </h:form>
+ </body>
+</html>
\ No newline at end of file
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/index.html?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/index.html (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/index.html Thu Aug 19 09:01:05 2010
@@ -0,0 +1,21 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version
+ 2.0 (the "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+ applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the
+ License.
+-->
+<html>
+<head>
+ <meta http-equiv="Refresh" content="0; URL=buy.jsf">
+</head>
+</html>
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/index.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/index.html
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/index.html
------------------------------------------------------------------------------
svn:mime-type = text/html
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/listing.xhtml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/listing.xhtml?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/listing.xhtml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/listing.xhtml Thu Aug 19 09:01:05 2010
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version
+ 2.0 (the "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+ applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the
+ License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+xmlns:h="http://java.sun.com/jsf/html"
+xmlns:f="http://java.sun.com/jsf/core">
+<head>
+ <title>OpenWebBeans :: Examples</title>
+</head>
+<body>
+
+ <div style="margin-top: 10px;">
+ <h3>Current Shopping Card Content</h3>
+ <h:dataTable cellpadding="1" cellspacing="5" value="#{selectedItems}" var="item">
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Product Name" />
+ </f:facet>
+ <h:outputText value="#{item.name}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Product Price" />
+ </f:facet>
+ <h:outputText value="#{item.price}" />
+ </h:column>
+
+ </h:dataTable>
+ </div>
+
+</body>
+</html>
\ No newline at end of file
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/webbeans/TestConversation.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/webbeans/TestConversation.java?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/webbeans/TestConversation.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/webbeans/TestConversation.java Thu Aug 19 09:01:05 2010
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans;
+
+import junit.framework.Assert;
+
+import org.testng.annotations.Test;
+import org.apache.geronimo.testsupport.SeleniumTestSupport;
+
+
+public class TestConversation extends SeleniumTestSupport {
+
+ //test non-conversational context
+ @Test
+ public void testNonConversation(){
+ String appContextStr = System.getProperty("appContext");
+ selenium.open(appContextStr+"/buy.jsf");
+// selenium.open("/conversation-test/buy.jsf");
+ selenium.click("//a[@onclick=\"mojarra.jsfcljs(document.getElementById('form'),{'form:j_idt8:1:j_idt15':'form:j_idt8:1:j_idt15'},'');return false\"]");
+ selenium.waitForPageToLoad("30000");
+ Assert.assertEquals(selenium.getText("xpath=/html/body/form/div[4]/table/tbody/tr[2]/td"),"Item-2");
+ Assert.assertEquals(selenium.getText("xpath=/html/body/form/div[4]/table/tbody/tr[2]/td[2]"),"3000");
+ selenium.click("//a[@onclick=\"mojarra.jsfcljs(document.getElementById('form'),{'form:j_idt8:3:j_idt15':'form:j_idt8:3:j_idt15'},'');return false\"]");
+ selenium.waitForPageToLoad("30000");
+ Assert.assertEquals(selenium.getText("xpath=/html/body/form/div[4]/table/tbody/tr[2]/td"),"Item-4");
+ Assert.assertEquals(selenium.getText("xpath=/html/body/form/div[4]/table/tbody/tr[2]/td[2]"),"6000");
+
+ }
+ //test start of the conversation
+ @Test(dependsOnMethods={"testNonConversation"})
+ public void testStartShopping(){
+ Assert.assertEquals(selenium.getText("xpath=//*[@id=\"form:conversation\"]"),"");
+ selenium.click("form:button1");
+ selenium.waitForPageToLoad("30000");
+ Assert.assertNotSame(selenium.getText("xpath=//*[@id=\"form:conversation\"]"), "");
+ }
+ @Test(dependsOnMethods={"testStartShopping"})
+ public void buyItemTwo() {
+ selenium.click("//a[@onclick=\"mojarra.jsfcljs(document.getElementById('form'),{'form:j_idt8:1:j_idt15':'form:j_idt8:1:j_idt15'},'');return false\"]");
+ selenium.waitForPageToLoad("30000");
+ Assert.assertEquals(selenium.getText("xpath=/html/body/form/div[4]/table/tbody/tr[2]/td"),"Item-2");
+ Assert.assertEquals(selenium.getText("xpath=/html/body/form/div[4]/table/tbody/tr[2]/td[2]"),"3000");
+
+ }
+ //test that data in the conversation is not lost
+ @Test(dependsOnMethods={"buyItemTwo"})
+ public void buyItemFour() {
+ //buy item-4
+ selenium.click("//a[@onclick=\"mojarra.jsfcljs(document.getElementById('form'),{'form:j_idt8:3:j_idt15':'form:j_idt8:3:j_idt15'},'');return false\"]");
+ selenium.waitForPageToLoad("30000");
+ Assert.assertEquals(selenium.getText("xpath=/html/body/form/div[4]/table/tbody/tr[2]/td"),"Item-2");
+ Assert.assertEquals(selenium.getText("xpath=/html/body/form/div[4]/table/tbody/tr[2]/td[2]"),"3000");
+ Assert.assertEquals(selenium.getText("xpath=/html/body/form/div[4]/table/tbody/tr[3]/td"),"Item-4");
+ Assert.assertEquals(selenium.getText("xpath=/html/body/form/div[4]/table/tbody/tr[3]/td[2]"),"6000");
+ }
+ //test checkout
+ @Test(dependsOnMethods={"buyItemFour"})
+ public void checkOut(){
+ selenium.click("form:button4");
+ selenium.waitForPageToLoad("30000");
+ Assert.assertEquals(selenium.getText("xpath=//*[@id=\"form:conversation\"]"),"");
+
+ }
+}
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/webbeans/TestConversation.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/webbeans/TestConversation.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/webbeans/TestConversation.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/resources/testng.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/resources/testng.xml?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/resources/testng.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/resources/testng.xml Thu Aug 19 09:01:05 2010
@@ -0,0 +1,25 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<suite name="Suite" parallel="false">
+ <test name="Test">
+ <classes>
+ <class name="org.apache.webbeans.TestConversation"/>
+ </classes>
+ </test>
+</suite>
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/resources/testng.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/resources/testng.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/resources/testng.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/pom.xml?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/pom.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/pom.xml Thu Aug 19 09:01:05 2010
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<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.apache.geronimo.testsuite</groupId>
+ <artifactId>javaee6-testsuite</artifactId>
+ <version>3.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>webbean1.0-test</artifactId>
+ <name>Geronimo TestSuite :: Java EE 6 Testsuite :: webbean1.0-test</name>
+ <packaging>pom</packaging>
+
+ <description>
+ Geronimo Java EE 6 webbean1.0 testsuite, including tests for these new features:
+ 1. WebBean+JPA
+ 2. WebBean+Servlet
+ 3. WebBean+EJB
+ 4. Four Scopes
+ 5. Basic Annotations
+ </description>
+
+ <modules>
+ <module>conversation-test</module>
+ <module>webbean-ejb-test</module>
+ </modules>
+</project>
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/pom.xml?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/pom.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/pom.xml Thu Aug 19 09:01:05 2010
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<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.apache.geronimo.testsuite</groupId>
+ <artifactId>webbean1.0-test</artifactId>
+ <version>3.0-SNAPSHOT</version>
+ </parent>
+
+
+ <artifactId>webbean-ejb-test</artifactId>
+ <name>Geronimo TestSuite :: Java EE 6 Testsuite :: Web Bean :: webbean-ejb-test</name>
+ <packaging>war</packaging>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>myfaces</artifactId>
+ <version>${geronimoVersion}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+
+ <dependencies>
+ <!-- JSR-314 API - JSF 2.0 -->
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- JSR-299 API - Web Beans 1.0-->
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jcdi_1.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- JSR-330 API - Dependency Injection for Java 1.0-->
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-atinject_1.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- EJB API -->
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-ejb_3.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- JPA API -->
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <archiveClasses>false</archiveClasses>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>it</id>
+ <activation>
+ <property>
+ <name>it</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.geronimo.buildsupport</groupId>
+ <artifactId>geronimo-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>deploy-wars</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>deploy-module</goal>
+ </goals>
+ <configuration>
+ <moduleArchive>${project.build.directory}/${project.artifactId}-${project.version}.war</moduleArchive>
+ </configuration>
+ </execution>
+ <execution>
+ <id>undeploy-war-as-moduleId</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>undeploy-module</goal>
+ </goals>
+ <configuration>
+ <moduleId>${project.groupId}/${project.artifactId}/${project.version}/war</moduleId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <suiteXmlFiles>
+ <suiteXmlFile>${project.build.testOutputDirectory}/testng.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ <testFailureIgnore>true</testFailureIgnore>
+ <systemPropertyVariables>
+ <appContext>${project.artifactId}</appContext>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/OperationBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/OperationBean.java?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/OperationBean.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/OperationBean.java Thu Aug 19 09:01:05 2010
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.telephone;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.enterprise.context.RequestScoped;
+import javax.faces.application.FacesMessage;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.apache.webbeans.telephone.ejbs.Telephone;
+import org.apache.webbeans.telephone.entity.Record;
+import org.apache.webbeans.telephone.util.FacesMessageUtil;
+
+@Named("operation")
+@RequestScoped
+public class OperationBean
+{
+ private @Inject Telephone operation;
+
+ private @Inject FacesMessageUtil messageUtil;
+
+ private String name;
+
+ private String surname;
+
+ private String telephone;
+
+ private boolean business;
+
+ private List<Record> records = new ArrayList<Record>();
+
+ public OperationBean()
+ {
+
+ }
+
+ @PostConstruct
+ public void afterConstruct()
+ {
+ System.out.println("After instance creation!");
+ }
+
+ @PreDestroy
+ public void beforeDestroy()
+ {
+ System.out.println("Before instance destroy!");
+ }
+
+ public String addRecord()
+ {
+ this.operation.addRecord(name, surname, telephone, business);
+
+ this.messageUtil.addMessage(FacesMessage.SEVERITY_INFO, "Record added", "Record added");
+
+ return null;
+ }
+
+ public String showList()
+ {
+ this.records = this.operation.getRecords();
+
+ return null;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * @return the surname
+ */
+ public String getSurname()
+ {
+ return surname;
+ }
+
+ /**
+ * @param surname the surname to set
+ */
+ public void setSurname(String surname)
+ {
+ this.surname = surname;
+ }
+
+ /**
+ * @return the telephone
+ */
+ public String getTelephone()
+ {
+ return telephone;
+ }
+
+ /**
+ * @param telephone the telephone to set
+ */
+ public void setTelephone(String telephone)
+ {
+ this.telephone = telephone;
+ }
+
+ /**
+ * @return the business
+ */
+ public boolean isBusiness()
+ {
+ return business;
+ }
+
+ /**
+ * @param business the business to set
+ */
+ public void setBusiness(boolean business)
+ {
+ this.business = business;
+ }
+
+ /**
+ * @return the records
+ */
+ public List<Record> getRecords()
+ {
+ return records;
+ }
+
+ /**
+ * @param records the records to set
+ */
+ public void setRecords(List<Record> records)
+ {
+ this.records = records;
+ }
+
+
+}
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/OperationBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/OperationBean.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/OperationBean.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/Telephone.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/Telephone.java?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/Telephone.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/Telephone.java Thu Aug 19 09:01:05 2010
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.telephone.ejbs;
+
+import java.util.List;
+
+import javax.ejb.Local;
+
+import org.apache.webbeans.telephone.entity.Record;
+
+@Local
+public interface Telephone
+{
+ public Record addRecord(String name, String surname, String telephone, boolean business);
+
+ public List<Record> getRecords();
+}
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/Telephone.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/Telephone.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/Telephone.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/TelephoneBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/TelephoneBean.java?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/TelephoneBean.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/TelephoneBean.java Thu Aug 19 09:01:05 2010
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.telephone.ejbs;
+
+import java.util.List;
+
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.enterprise.context.Dependent;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+
+import org.apache.webbeans.telephone.entity.Record;
+
+@Stateless
+@Dependent
+public class TelephoneBean implements Telephone
+{
+ private @PersistenceContext(name="pu") EntityManager entityManager;
+
+ @Override
+ public Record addRecord(String name, String surname, String telephone, boolean business)
+ {
+ Record record = new Record();
+ record.setName(name);
+ record.setSurname(surname);
+ record.setNumber(telephone);
+ record.setBusiness(business);
+
+ entityManager.persist(record);
+
+ return record;
+ }
+
+ @Override
+ @TransactionAttribute(TransactionAttributeType.SUPPORTS)
+ @SuppressWarnings("unchecked")
+ public List<Record> getRecords()
+ {
+ Query query = this.entityManager.createQuery("select c from Record c");
+ return (List<Record>)query.getResultList();
+
+ }
+
+}
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/TelephoneBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/TelephoneBean.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/TelephoneBean.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/entity/Record.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/entity/Record.java?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/entity/Record.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/entity/Record.java Thu Aug 19 09:01:05 2010
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.telephone.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+@Entity
+public class Record
+{
+ @Id
+ @GeneratedValue
+ private int id;
+
+ @Column
+ private String name;
+
+ @Column
+ private String surname;
+
+ @Column
+ private String number;
+
+ @Column
+ private boolean business;
+
+ public Record()
+ {
+
+ }
+
+ /**
+ * @return the id
+ */
+ public int getId()
+ {
+ return id;
+ }
+
+ /**
+ * @param id the id to set
+ */
+ public void setId(int id)
+ {
+ this.id = id;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * @return the surname
+ */
+ public String getSurname()
+ {
+ return surname;
+ }
+
+ /**
+ * @param surname the surname to set
+ */
+ public void setSurname(String surname)
+ {
+ this.surname = surname;
+ }
+
+ /**
+ * @return the number
+ */
+ public String getNumber()
+ {
+ return number;
+ }
+
+ /**
+ * @param number the number to set
+ */
+ public void setNumber(String number)
+ {
+ this.number = number;
+ }
+
+ /**
+ * @return the business
+ */
+ public boolean isBusiness()
+ {
+ return business;
+ }
+
+ /**
+ * @param business the business to set
+ */
+ public void setBusiness(boolean business)
+ {
+ this.business = business;
+ }
+
+
+}
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/entity/Record.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/entity/Record.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/entity/Record.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/util/FacesMessageUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/util/FacesMessageUtil.java?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/util/FacesMessageUtil.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/util/FacesMessageUtil.java Thu Aug 19 09:01:05 2010
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.telephone.util;
+
+import javax.enterprise.context.Dependent;
+import javax.inject.Named;
+import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
+import javax.faces.context.FacesContext;
+
+@Named(value="facesMessage")
+@Dependent
+public class FacesMessageUtil
+{
+
+ public FacesMessageUtil()
+ {
+
+ }
+
+ public void addMessage(Severity severity,String summary, String detail)
+ {
+ FacesMessage message = new FacesMessage(severity,summary,detail);
+ FacesContext.getCurrentInstance().addMessage(null, message);
+ }
+}
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/util/FacesMessageUtil.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/util/FacesMessageUtil.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/util/FacesMessageUtil.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/persistence.xml?rev=987088&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/persistence.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/persistence.xml Thu Aug 19 09:01:05 2010
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version
+ 2.0 (the "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+ applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the
+ License.
+-->
+
+<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_2_0.xsd"
+ version="2.0">
+ <persistence-unit name="pu" transaction-type="RESOURCE_LOCAL">
+ <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+ <class>org.apache.webbeans.telephone.entity.Record</class>
+ <properties>
+ <property name="openjpa.jdbc.DBDictionary" value="derby" />
+ <property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.ClientDriver"/>
+ <property name="openjpa.ConnectionURL" value="jdbc:derby://localhost:1527/sample;create=true"/>
+ <property name="openjpa.ConnectionUserName" value="app"/>
+ <property name="openjpa.ConnectionPassword" value="app"/>
+ <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+ <property name="openjpa.AutoDetach" value="close, commit, nontx-read"/>
+ <property name="openjpa.Log" value="DefaultLevel=TRACE"/>
+ </properties>
+ </persistence-unit>
+</persistence>