geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1164355 - in /geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test: conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ conversation-test/src/main/resources/ conversation-test/src/main/resources/META-INF/...
Date Fri, 02 Sep 2011 06:20:48 GMT
Author: xiaming
Date: Fri Sep  2 06:20:47 2011
New Revision: 1164355

URL: http://svn.apache.org/viewvc?rev=1164355&view=rev
Log:
Revise webbeans testsuite, provided by Xiao Shu

Added:
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBeanHelper.java   (with props)
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/resources/
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/resources/META-INF/
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/resources/META-INF/beans.xml   (with props)
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/beans.xml   (with props)
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBeanHelper.java   (with props)
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBeanHelper.java   (with props)
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/beans.xml   (with props)
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/resources/
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/resources/META-INF/
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/resources/META-INF/beans.xml   (with props)
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logon.html   (with props)
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logonError.html   (with props)
Modified:
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBean.java
    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/test/java/org/apache/webbeans/TestConversation.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/TelephoneBean.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/persistence.xml
    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/test/java/org/apache/webbean/sample/ejbtelephone/test/EjbtelephoneTest.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBean.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBean.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/addReservation.xhtml
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/listHotels.xhtml
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/test/java/org/apache/webbeans/sample/reservation/test/ReservationTest.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/WEB-INF/geronimo-web.xml
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/WEB-INF/web.xml
    geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/test/java/org/apache/webbean/sample/servlet/test/TestWebbeanServlet.java

Modified: 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=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBean.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBean.java Fri Sep  2 06:20:47 2011
@@ -26,7 +26,6 @@ import javax.enterprise.context.Conversa
 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;
 
@@ -42,8 +41,7 @@ public class ShoppingBean implements Ser
 
     private List<Item> items = new ArrayList<Item>();
         
-    private UIData uiTable;
-    
+    //private UIData uiTable;
     
     public ShoppingBean()
     {
@@ -85,34 +83,14 @@ public class ShoppingBean implements Ser
         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)
+    
+    public List<Item> getItems()
     {
-        this.uiTable = uiTable;
-    }
-     
+        return this.items;
+    }    
 }

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBeanHelper.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/ShoppingBeanHelper.java?rev=1164355&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBeanHelper.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBeanHelper.java Fri Sep  2 06:20:47 2011
@@ -0,0 +1,38 @@
+package org.apache.webbeans.samples.conversation;
+
+import javax.enterprise.context.RequestScoped;
+import javax.faces.component.UIData;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+@Named
+@RequestScoped
+public class ShoppingBeanHelper {
+
+    private UIData uiTable;
+
+    private @Inject ShoppingBean shopingBean;
+
+    /**
+     * @return the uiTable
+     */
+    public UIData getUiTable() {
+        return uiTable;
+    }
+
+    /**
+     * @param uiTable
+     *            the uiTable to set
+     */
+    public void setUiTable(UIData uiTable) {
+        this.uiTable = uiTable;
+    }
+
+    public String buy() {
+        Item item = (Item) uiTable.getRowData();
+        this.shopingBean.getItems().add(item);
+
+        return null;
+    }
+
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/java/org/apache/webbeans/samples/conversation/ShoppingBeanHelper.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/ShoppingBeanHelper.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/ShoppingBeanHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/resources/META-INF/beans.xml?rev=1164355&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/resources/META-INF/beans.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/resources/META-INF/beans.xml Fri Sep  2 06:20:47 2011
@@ -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/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: 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=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/buy.xhtml (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/main/webapp/buy.xhtml Fri Sep  2 06:20:47 2011
@@ -54,7 +54,7 @@
 
             <div style="margin-top: 10px;">
                 <h3>Products Details</h3>
-                <h:dataTable cellpadding="1" cellspacing="5" value="#{allProducts}" var="item" binding="#{shoppingBean.uiTable}">
+                <h:dataTable cellpadding="1" cellspacing="5" value="#{allProducts}" var="item" binding="#{shoppingBeanHelper.uiTable}">
 
                     <h:column>
                         <f:facet name="header">
@@ -74,7 +74,7 @@
                         <f:facet name="header">
                             <h:outputText value="" />
                         </f:facet>
-                        <h:commandLink action="#{shoppingBean.buy}" value="Add Item to Card" />
+                        <h:commandLink id="#{item.name}buy" action="#{shoppingBeanHelper.buy}" value="Add Item to Card" />
                     </h:column>
 
                 </h:dataTable>

Modified: 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=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/webbeans/TestConversation.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/conversation-test/src/test/java/org/apache/webbeans/TestConversation.java Fri Sep  2 06:20:47 2011
@@ -32,11 +32,11 @@ public class TestConversation extends Se
         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.click("form:j_id1807007596_6bb4bff0:1:buy");
 		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.click("form:j_id1807007596_6bb4bff0:3:buy");
 		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");
@@ -52,7 +52,7 @@ public class TestConversation extends Se
 	}
 	@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.click("form:j_id1807007596_6bb4bff0:1:buy");
 		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");
@@ -62,7 +62,7 @@ public class TestConversation extends Se
 	@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.click("form:j_id1807007596_6bb4bff0:3:buy");
 		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");
@@ -74,7 +74,7 @@ public class TestConversation extends Se
 	public void checkOut(){
 		selenium.click("form:button4");
 		selenium.waitForPageToLoad("30000");
-		Assert.assertEquals(selenium.getText("xpath=//*[@id=\"form:conversation\"]"),"");
+		Assert.assertNotSame(selenium.getText("xpath=//*[@id=\"form:conversation\"]"),"");
 		
 	}
 }

Modified: 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=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/TelephoneBean.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/java/org/apache/webbeans/telephone/ejbs/TelephoneBean.java Fri Sep  2 06:20:47 2011
@@ -34,7 +34,7 @@ import org.apache.webbeans.telephone.ent
 @Dependent
 public class TelephoneBean implements Telephone
 {
-    private @PersistenceContext(name="pu") EntityManager entityManager; 
+    private @PersistenceContext(unitName = "pu") EntityManager entityManager; 
 
     @Override
     public Record addRecord(String name, String surname, String telephone, boolean business)

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/beans.xml?rev=1164355&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/beans.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/beans.xml Fri Sep  2 06:20:47 2011
@@ -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/>

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: 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=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/persistence.xml (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/resources/META-INF/persistence.xml Fri Sep  2 06:20:47 2011
@@ -19,7 +19,7 @@
 <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">        
+    <persistence-unit name="pu" transaction-type="JTA">        
         <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
         <class>org.apache.webbeans.telephone.entity.Record</class>        
         <properties>

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/contact.xhtml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/contact.xhtml?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/contact.xhtml (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/main/webapp/contact.xhtml Fri Sep  2 06:20:47 2011
@@ -58,8 +58,8 @@
 					</h:outputLabel>
 					<h:selectBooleanCheckbox value="#{operation.business}" />
 										
-					<h:commandButton action="#{operation.addRecord}" value="Add New Record"></h:commandButton>
-					<h:commandButton action="#{operation.showList}" value="Show All Records"></h:commandButton>
+					<h:commandButton id="addNewRecord" action="#{operation.addRecord}" value="Add New Record"></h:commandButton>
+					<h:commandButton id="showAllRecords" action="#{operation.showList}" value="Show All Records"></h:commandButton>
 					
 				</h:panelGrid>												
 			</div>

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/org/apache/webbean/sample/ejbtelephone/test/EjbtelephoneTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/org/apache/webbean/sample/ejbtelephone/test/EjbtelephoneTest.java?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/org/apache/webbean/sample/ejbtelephone/test/EjbtelephoneTest.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-ejb-test/src/test/java/org/apache/webbean/sample/ejbtelephone/test/EjbtelephoneTest.java Fri Sep  2 06:20:47 2011
@@ -26,9 +26,9 @@ public class EjbtelephoneTest extends Se
 	@Test
 	public void inputNothing() {
         String appContextStr = System.getProperty("appContext");
-		selenium.open(appContextStr);
+		selenium.open(appContextStr + "/contact.jsf");
 //		selenium.open("/webbean-ejb-test");
-		selenium.click("form:j_idt16");
+		selenium.click("form:addNewRecord");
 		selenium.waitForPageToLoad("30000");
 		Assert.assertEquals(selenium.getText("xpath=/html/body/div/div/ul/li"),
 		"Please give a name!");
@@ -44,15 +44,15 @@ public class EjbtelephoneTest extends Se
 		selenium.type("form:text", "gero");
 		selenium.type("form:surname", "nimo");
 		selenium.type("form:telephone", "12345678");
-		selenium.click("form:j_idt16");
-		selenium.waitForPageToLoad("30000");
+		selenium.click("form:addNewRecord");
+		selenium.waitForPageToLoad("60000");
 		Assert.assertEquals(selenium.getText("xpath=/html/body/div/div/ul/li"),
 				"Record added");
 	}
 
 	@Test(dependsOnMethods = { "saveTelephone" })
 	public void showAllTelephone() {
-		selenium.click("form:j_idt17");
+		selenium.click("form:showAllRecords");
 		selenium.waitForPageToLoad("30000");
 		Assert.assertEquals(
 						selenium.getText("xpath=/html/body/div/div/form/div[2]/table/tbody/tr/td[2]"),

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBean.java?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBean.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBean.java Fri Sep  2 06:20:47 2011
@@ -26,7 +26,6 @@ import javax.enterprise.context.SessionS
 import javax.enterprise.inject.Default;
 import javax.inject.Inject;
 import javax.inject.Named;
-import javax.faces.component.html.HtmlDataTable;
 
 import org.apache.webbeans.reservation.controller.admin.AdminController;
 import org.apache.webbeans.reservation.entity.Hotel;
@@ -41,8 +40,6 @@ public class AdminListBean implements Se
 
     private List<Hotel> hotels = new ArrayList<Hotel>();
     
-    private HtmlDataTable model;
-    
     private @Inject @Default AdminController controller;
     
     private Hotel selected;
@@ -68,41 +65,7 @@ public class AdminListBean implements Se
         return null;
     }
     
-    public String delete()
-    {
-        selected = (Hotel)model.getRowData();
-        
-        if(selected == null)
-        {
-            JSFUtility.addErrorMessage("Pleasee select the hotel to delete", "");
-            
-            return null;
-        }
-     
-        controller.deleteHotel(selected.getId());
-        
-        JSFUtility.addInfoMessage("Hotel with name " + selected.getName()+ " is succesfully deleted." , "");
-        
-        this.selected.setCity(null);
-        this.selected.setCountry(null);
-        this.selected.setName(null);
-        this.selected.setStar(0);
-  
-        return null;
-    }
     
-    public String getForUpdate()
-    {
-        //System.out.println("enter AdminListBean.getForUpdate");
-        Hotel hotel = (Hotel) model.getRowData();
-        
-        this.selected = hotel;
-        
-        setRenderedDetailPanel(true);
-        
-                
-        return null;
-    }
     
     /**
      * @return the hotels
@@ -123,22 +86,6 @@ public class AdminListBean implements Se
     }
 
     /**
-     * @return the model
-     */
-    public HtmlDataTable getModel()
-    {
-        return model;
-    }
-
-    /**
-     * @param model the model to set
-     */
-    public void setModel(HtmlDataTable model)
-    {
-        this.model = model;
-    }
-
-    /**
      * @return the selected
      */
     public Hotel getSelected()

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBeanHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBeanHelper.java?rev=1164355&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBeanHelper.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBeanHelper.java Fri Sep  2 06:20:47 2011
@@ -0,0 +1,76 @@
+package org.apache.webbeans.reservation.beans.admin;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Default;
+import javax.faces.component.html.HtmlDataTable;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.apache.webbeans.reservation.controller.admin.AdminController;
+import org.apache.webbeans.reservation.entity.Hotel;
+import org.apache.webbeans.reservation.util.JSFUtility;
+
+@Named
+@RequestScoped
+public class AdminListBeanHelper {
+    private HtmlDataTable model;
+    
+    private @Inject AdminListBean adminListBean;
+
+    private @Inject @Default AdminController controller;
+
+    /**
+     * @return the model
+     */
+    public HtmlDataTable getModel()
+    {
+        return model;
+    }
+    
+    /**
+     * @param model the model to set
+     */
+    public void setModel(HtmlDataTable model)
+    {
+        this.model = model;
+    }
+    
+    public String getForUpdate()
+    {
+        //System.out.println("enter AdminListBean.getForUpdate");
+        Hotel hotel = (Hotel) model.getRowData();
+        
+        adminListBean.setSelected(hotel);
+        
+        adminListBean.setRenderedDetailPanel(true);
+        
+                
+        return null;
+    }
+    
+    public String delete()
+    {
+        Hotel selected = (Hotel)model.getRowData();
+        
+        if(selected == null)
+        {
+            JSFUtility.addErrorMessage("Pleasee select the hotel to delete", "");
+            
+            return null;
+        }
+     
+        controller.deleteHotel(selected.getId());
+        
+        JSFUtility.addInfoMessage("Hotel with name " + selected.getName()+ " is succesfully deleted." , "");
+        
+        if (adminListBean.getSelected() != null) {
+            adminListBean.getSelected().setCity(null);
+            adminListBean.getSelected().setCountry(null);
+            adminListBean.getSelected().setName(null);
+            adminListBean.getSelected().setStar(0);
+        }
+  
+        return null;
+    }
+
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBeanHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBeanHelper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/admin/AdminListBeanHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBean.java?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBean.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBean.java Fri Sep  2 06:20:47 2011
@@ -57,8 +57,6 @@ public class UserReservationBean impleme
     
     private String reservationDate;
     
-    private HtmlDataTable model;
-    
     private @Inject @Default Conversation conversation;
     
     private @Inject @Default SessionTracker tracker;
@@ -70,59 +68,8 @@ public class UserReservationBean impleme
     public UserReservationBean()
     {
     }
-
     
-    public String addReservation()
-    {
-        if(getReservationDate() == null)
-        {
-            JSFUtility.addErrorMessage("Reservation date can not be empty!", "");
-            return null;
-        }
-             
-        Date date = null;
-        try
-        {
-            date = new SimpleDateFormat("dd/MM/yyyy").parse(getReservationDate());
-            
-        }
-        catch(Exception e)
-        {
-            
-            JSFUtility.addErrorMessage("Please give a date with dd/MM/yyyy", "");
-            return null;
-        }
-        
-        if(conversation.isTransient())
-        {
-            conversation.begin();
-            
-            JSFUtility.addInfoMessage("Reservation conversation with started with id : " + conversation.getId(), "");            
-        }
-        
-        Hotel hotel = (Hotel)model.getRowData();
-        
-        SelectItem item = new SelectItem();
-        item.setValue(hotel.getId());
-        item.setLabel(hotel.getName());
-        
-        if(contains(item.getValue()) != null)
-        {
-            JSFUtility.addErrorMessage("Given hotel is already added", "");
-            
-            return null;
-        }
-                
-        reservations.add(item);
-        
-        
-        ReservationModel model = new ReservationModel(item,date);
-        models.put(item.getValue().toString(), model);
-        
-        return null;
-    }
-    
-    private SelectItem contains(Object id)
+    SelectItem contains(Object id)
     {
         for(SelectItem i : reservations)
         {
@@ -253,25 +200,6 @@ public class UserReservationBean impleme
         this.reservationDate = reservationDate;
     }
 
-
-    /**
-     * @return the model
-     */
-    public HtmlDataTable getModel()
-    {
-        return model;
-    }
-
-
-    /**
-     * @param model the model to set
-     */
-    public void setModel(HtmlDataTable model)
-    {
-        this.model = model;
-    }
-
-
     /**
      * @return the itemSelected
      */
@@ -290,5 +218,13 @@ public class UserReservationBean impleme
         this.itemSelected = itemSelected;
     }
     
+    public Conversation getConversation() {
+        return conversation;
+    }
+
+    public Map<String, ReservationModel> getModels() {
+        return models;
+    }
+    
     
 }

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBeanHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBeanHelper.java?rev=1164355&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBeanHelper.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBeanHelper.java Fri Sep  2 06:20:47 2011
@@ -0,0 +1,82 @@
+package org.apache.webbeans.reservation.beans.user;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.enterprise.context.RequestScoped;
+import javax.faces.component.html.HtmlDataTable;
+import javax.faces.model.SelectItem;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.apache.webbeans.reservation.entity.Hotel;
+import org.apache.webbeans.reservation.model.ReservationModel;
+import org.apache.webbeans.reservation.util.JSFUtility;
+
+@Named
+@RequestScoped
+public class UserReservationBeanHelper {
+    private HtmlDataTable model;
+
+    private @Inject
+    UserReservationBean userReservationBean;
+
+    /**
+     * @return the model
+     */
+    public HtmlDataTable getModel() {
+        return model;
+    }
+
+    /**
+     * @param model the model to set
+     */
+    public void setModel(HtmlDataTable model) {
+        this.model = model;
+    }
+
+    public String addReservation() {
+        if (userReservationBean.getReservationDate() == null) {
+            JSFUtility.addErrorMessage("Reservation date can not be empty!", "");
+            return null;
+        }
+
+        Date date = null;
+        try {
+            date = new SimpleDateFormat("dd/MM/yyyy").parse(userReservationBean.getReservationDate());
+
+        } catch (Exception e) {
+
+            JSFUtility.addErrorMessage("Please give a date with dd/MM/yyyy", "");
+            return null;
+        }
+
+        if (userReservationBean.getConversation().isTransient()) {
+            userReservationBean.getConversation().begin();
+
+            JSFUtility.addInfoMessage("Reservation conversation with started with id : "
+                    + userReservationBean.getConversation().getId(), "");
+        }
+
+        Hotel hotel = (Hotel) model.getRowData();
+
+        SelectItem item = new SelectItem();
+        item.setValue(hotel.getId());
+        item.setLabel(hotel.getName());
+
+        if (userReservationBean.contains(item.getValue()) != null) {
+            JSFUtility.addErrorMessage("Given hotel is already added", "");
+
+            return null;
+        }
+
+        userReservationBean.getReservations().add(item);
+
+        ReservationModel model = new ReservationModel(item, date);
+        userReservationBean.getModels().put(item.getValue().toString(), model);
+
+        return null;
+
+    }
+
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBeanHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBeanHelper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/beans/user/UserReservationBeanHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java Fri Sep  2 06:20:47 2011
@@ -113,9 +113,10 @@ public class AdminController
         
         Set<Reservation> reservations = user.getReservations();
         
-        for(Reservation reserve : reservations)
-        {
-            hotels.add(reserve.getHotel());
+        if (reservations != null) {
+            for (Reservation reserve : reservations) {
+                hotels.add(reserve.getHotel());
+            }
         }
         
         return hotels;

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java Fri Sep  2 06:20:47 2011
@@ -126,9 +126,10 @@ public class UserController implements S
         Set<Reservation> res = user.getReservations();
         
         List<Reservation> l = new ArrayList<Reservation>();
-        for(Reservation r : res)
-        {
-            l.add(r);
+        if (res != null) {
+            for (Reservation r : res) {
+                l.add(r);
+            }
         }
         
         return l;

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java Fri Sep  2 06:20:47 2011
@@ -31,6 +31,7 @@ import javax.persistence.OneToMany;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.Version;
+import javax.persistence.FetchType;
 
 @Entity
 public class Users
@@ -57,7 +58,7 @@ public class Users
     @Temporal(value=TemporalType.DATE)
     private Date registerDate;
 
-    @OneToMany(mappedBy="user",cascade={CascadeType.ALL})
+    @OneToMany(mappedBy="user",cascade={CascadeType.ALL},fetch=FetchType.EAGER)
     private Set<Reservation> reservations = new HashSet<Reservation>();
 
     @Version

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java Fri Sep  2 06:20:47 2011
@@ -24,6 +24,7 @@ import javax.interceptor.InvocationConte
 import javax.transaction.Status;
 import javax.transaction.UserTransaction;
 import javax.annotation.Resource;
+import javax.inject.Inject;
 
 import org.apache.webbeans.reservation.bindings.intercep.Transactional;
 
@@ -31,7 +32,7 @@ import org.apache.webbeans.reservation.b
 @Transactional
 public class TransactionalInterceptor
 {
-    @Resource UserTransaction tx;
+    @Inject @Resource UserTransaction tx;
    
     @AroundInvoke
     public Object invoke(InvocationContext context) throws Exception

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/beans.xml?rev=1164355&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/beans.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/beans.xml Fri Sep  2 06:20:47 2011
@@ -0,0 +1,35 @@
+<?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
+    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/beans_1_0.xsd">
+
+    <interceptors>
+        <class>org.apache.webbeans.reservation.intercept.TransactionalInterceptor</class>
+    </interceptors>
+    <decorators>
+    <class>org.apache.webbeans.reservation.intercept.LoginDecorator</class>
+    </decorators>
+
+</beans>
\ No newline at end of file

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml Fri Sep  2 06:20:47 2011
@@ -20,7 +20,7 @@
     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
     version="1.0">
 
-    <persistence-unit name="reservation" transaction-type="RESOURCE_LOCAL">
+    <persistence-unit name="reservation" transaction-type="JTA">
         <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
           
           <class>org.apache.webbeans.reservation.entity.Hotel</class>

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/addReservation.xhtml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/addReservation.xhtml?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/addReservation.xhtml (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/addReservation.xhtml Fri Sep  2 06:20:47 2011
@@ -44,7 +44,7 @@
 		</h:panelGrid>
 			
 			
-			<h:dataTable id="dt" cellpadding="5" value="#{userReservationBean.hotels}" binding="#{userReservationBean.model}" var="model" styleClass="table dataTable" rowClasses="oddRow,evenRow">
+			<h:dataTable id="dt" cellpadding="5" value="#{userReservationBean.hotels}" binding="#{userReservationBeanHelper.model}" var="model" styleClass="table dataTable" rowClasses="oddRow,evenRow">
 				
 				<h:column id="dt1">
 					<f:facet name="header">
@@ -63,7 +63,7 @@
 				</h:column>
 				
 				<h:column id="dt5">
-					<h:commandLink action="#{userReservationBean.addReservation}" value="Add Hotel for Reservation" />					
+					<h:commandLink action="#{userReservationBeanHelper.addReservation}" value="Add Hotel for Reservation" />					
 				</h:column>
 
 			</h:dataTable>	

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/listHotels.xhtml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/listHotels.xhtml?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/listHotels.xhtml (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/listHotels.xhtml Fri Sep  2 06:20:47 2011
@@ -37,7 +37,7 @@
 			
 		<h:form id="form">
 			
-			<h:dataTable id="dt" cellpadding="5" value="#{adminListBean.hotels}" binding="#{adminListBean.model}" var="model" styleClass="table dataTable" rowClasses="oddRow,evenRow">
+			<h:dataTable id="dt" cellpadding="5" value="#{adminListBean.hotels}" binding="#{adminListBeanHelper.model}" var="model" styleClass="table dataTable" rowClasses="oddRow,evenRow">
 				
 				<h:column id="dt1">
 					<f:facet name="header">
@@ -56,11 +56,11 @@
 				</h:column>
 				
 				<h:column id="dt5">
-					<h:commandLink action="#{adminListBean.getForUpdate}" value="Show Detail" />					
+					<h:commandLink action="#{adminListBeanHelper.getForUpdate}" value="Show Detail" />					
 				</h:column>
 
 				<h:column id="dt6">
-					<h:commandLink id="deleteHotel" action="#{adminListBean.delete}" value="Delete" />
+					<h:commandLink id="deleteHotel" action="#{adminListBeanHelper.delete}" value="Delete" />
 				</h:column>
 				
 															

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/test/java/org/apache/webbeans/sample/reservation/test/ReservationTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/test/java/org/apache/webbeans/sample/reservation/test/ReservationTest.java?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/test/java/org/apache/webbeans/sample/reservation/test/ReservationTest.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/test/java/org/apache/webbeans/sample/reservation/test/ReservationTest.java Fri Sep  2 06:20:47 2011
@@ -33,21 +33,16 @@ public class ReservationTest extends Sel
 		selenium.waitForPageToLoad("30000");
 		selenium.click("form:Register");
 		selenium.waitForPageToLoad("30000");
-		Assert.assertEquals(
-				selenium.getText("xpath=/html/body/div/ul/li"),
-				"Name is required!");
-		Assert.assertEquals(selenium
-				.getText("xpath=/html/body/div/ul/li[2]"),
-				"Surname is required!");
-		Assert.assertEquals(selenium
-				.getText("xpath=/html/body/div/ul/li[3]"),
-				"Age is required");
-		Assert.assertEquals(selenium
-				.getText("xpath=/html/body/div/ul/li[4]"),
-				"User name is required and minumum 8 characters!");
-		Assert.assertEquals(selenium
-				.getText("xpath=/html/body/div/ul/li[5]"),
-				"Password must be minumum 4 and maximum 8 characters!");
+		Assert.assertTrue(selenium.getText("xpath=/html/body/div/ul")
+				.indexOf("Password must be minumum 4 and maximum 8 characters!") > -1);
+		Assert.assertTrue(selenium.getText("xpath=/html/body/div/ul")
+				.indexOf("Name is required!") > -1);
+		Assert.assertTrue(selenium.getText("xpath=/html/body/div/ul")
+				.indexOf("Surname is required!") > -1);
+		Assert.assertTrue(selenium.getText("xpath=/html/body/div/ul")
+				.indexOf("Age is required") > -1);
+		Assert.assertTrue(selenium.getText("xpath=/html/body/div/ul")
+				.indexOf("User name is required and minumum 8 characters!") > -1);
 	}
 
 	// Test register as an administrator
@@ -63,7 +58,7 @@ public class ReservationTest extends Sel
 		selenium.type("form:password", "passw0rd");
 		selenium.click("form:adminCheckbox");
 		selenium.click("form:Register");
-		selenium.waitForPageToLoad("30000");
+		selenium.waitForPageToLoad("60000");
 		Assert.assertEquals(
 				selenium.getText("xpath=/html/body/div/ul/li"),
 				"User with name : geronimo1 is registered successfully.");

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/resources/META-INF/beans.xml?rev=1164355&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/resources/META-INF/beans.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/resources/META-INF/beans.xml Fri Sep  2 06:20:47 2011
@@ -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/webbean-servlet-test/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/WEB-INF/geronimo-web.xml?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/WEB-INF/geronimo-web.xml (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/WEB-INF/geronimo-web.xml Fri Sep  2 06:20:47 2011
@@ -35,5 +35,35 @@ under the License.
   </sys:environment>
 
   <context-root>/${project.artifactId}</context-root>
+  
+  <security-realm-name>demo-properties-realm</security-realm-name>
+  <sec:security>
+    <sec:default-principal>
+      <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="izumi"/>
+    </sec:default-principal>
+    <sec:role-mappings>
+      <sec:role role-name="content-administrator">
+        <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="it" designated-run-as="true"/>
+        <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="metro"/>
+        <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="george"/>
+      </sec:role>
+    </sec:role-mappings>
+  </sec:security>
+  <gbean name="demo-properties-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm" xsi:type="dep:gbeanType" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+        <attribute name="realmName">demo-properties-realm</attribute>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+        <xml-reference name="LoginModuleConfiguration">
+            <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.2">
+                <log:login-module control-flag="REQUIRED" wrap-principals="false">
+                    <log:login-domain-name>demo-properties-realm</log:login-domain-name>
+                    <log:login-module-class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
+                    <log:option name="usersURI">var/security/demo_users.properties</log:option>
+                    <log:option name="groupsURI">var/security/demo_groups.properties</log:option>
+                </log:login-module>
+            </log:login-config>
+        </xml-reference>
+    </gbean>
 
 </web-app>

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/WEB-INF/web.xml?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/WEB-INF/web.xml (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/WEB-INF/web.xml Fri Sep  2 06:20:47 2011
@@ -34,4 +34,29 @@
   <servlet-name>injector</servlet-name>
   <url-pattern>/injector</url-pattern>
  </servlet-mapping>
+ <security-constraint>
+      <web-resource-collection>
+        <web-resource-name>Admin Role</web-resource-name>
+        <url-pattern>/injector/*</url-pattern>
+        <http-method>GET</http-method>
+        <http-method>POST</http-method>
+        <http-method>PUT</http-method>        
+      </web-resource-collection>
+      <auth-constraint>
+        <role-name>content-administrator</role-name>
+      </auth-constraint>
+    </security-constraint>
+    
+    <login-config>
+      <auth-method>FORM</auth-method>
+      <realm-name>demo-properties-realm</realm-name>
+      <form-login-config>
+         <form-login-page>/auth/logon.html</form-login-page>
+         <form-error-page>/auth/logonError.html</form-error-page>
+      </form-login-config>
+    </login-config>
+
+  <security-role>
+      <role-name>content-administrator</role-name>
+  </security-role>
 </web-app>

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logon.html
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logon.html?rev=1164355&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logon.html (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logon.html Fri Sep  2 06:20:47 2011
@@ -0,0 +1,20 @@
+<HTML>
+<H1>FORM Authentication demo</H1>
+<form method="POST" action="j_security_check">
+<table border="0" cellspacing="2" cellpadding="1">
+<tr>
+  <td>Username:</td>
+  <td><input size="12" value="" name="j_username" maxlength="25" type="text"></td>
+</tr>
+<tr>
+  <td>Password:</td>
+  <td><input size="12" value="" name="j_password" maxlength="25" type="password"></td>
+</tr>
+<tr>
+  <td colspan="2" align="center">
+    <input id="login" name="submit" type="submit" value="Login">
+  </td>
+</tr>
+</table>
+</form>
+</HTML>
\ No newline at end of file

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logon.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logon.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logon.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logonError.html
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logonError.html?rev=1164355&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logonError.html (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logonError.html Fri Sep  2 06:20:47 2011
@@ -0,0 +1,5 @@
+<HTML>
+<H1>Authentication ERROR</H1>
+Username, password or role incorrect.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
+</HTML>
\ No newline at end of file

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logonError.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logonError.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/main/webapp/auth/logonError.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/test/java/org/apache/webbean/sample/servlet/test/TestWebbeanServlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/test/java/org/apache/webbean/sample/servlet/test/TestWebbeanServlet.java?rev=1164355&r1=1164354&r2=1164355&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/test/java/org/apache/webbean/sample/servlet/test/TestWebbeanServlet.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-servlet-test/src/test/java/org/apache/webbean/sample/servlet/test/TestWebbeanServlet.java Fri Sep  2 06:20:47 2011
@@ -30,9 +30,13 @@ public class TestWebbeanServlet extends 
 		selenium.open(appContextStr);
 		selenium.click("link=Test calling webbeans from servelet");
 		waitForPageLoad();
+		selenium.type("name=j_username", "metro");
+		selenium.type("name=j_password", "mouse");
+		selenium.click("name=submit");
+		waitForPageLoad();
 		assertTrue(selenium
 				.isTextPresent("Injection of Bean Instance into Servlet"));
-		assertTrue(selenium.isTextPresent("Caller Principal name injection into DateProvider instance : ANONYMOUS"));
+		assertTrue(selenium.isTextPresent("Caller Principal name injection into DateProvider instance : metro"));
 		assertTrue(selenium
 				.isTextPresent("Current Date : org.apache.webbeans.samples.tomcat.CurrentDateProvider"));
 		assertTrue(selenium



Mime
View raw message