You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ja...@apache.org on 2010/11/23 16:50:53 UTC

svn commit: r1038174 - in /myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test: java/org/apache/myfaces/extensions/cdi/test/webapp/events/ java/org/apache/myfaces/extensions/cdi/test/webapp/events/bean/ java/org/apache/myfaces/extensi...

Author: jakobk
Date: Tue Nov 23 15:50:52 2010
New Revision: 1038174

URL: http://svn.apache.org/viewvc?rev=1038174&view=rev
Log:
fix configuration issues in webapp-tests

moved web.xml config to @Alternative config classes configured via beans.xml

Added:
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/AccessBeanEventEnabledConfig.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/ConversationEventsEnabledConfig.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/DefaultConversationConfig.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/DefaultWindowContextConfig.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/ScopeBeanEventEnabledConfig.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/UnscopeBeanEventEnabledConfig.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/WindowContextEventEnabledConfig.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/access-bean-event-enabled-beans.xml
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/conversation-events-enabled-beans.xml
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/scope-bean-event-enabled-beans.xml
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/unscope-bean-event-enabled-beans.xml
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/windowcontext-events-enabled-beans.xml
Removed:
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/access-bean-event-enabled-web.xml
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/conversation-events-enabled-web.xml
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/scopebeanevent-enabled-web.xml
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/unscopebeanevent-enabled-web.xml
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/windowcontext-events-enabled-web.xml
Modified:
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/AccessBeanEventTest.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/ConversationEventTest.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/ScopeBeanEventTest.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/UnscopeBeanEventTest.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/WindowContextEventTest.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/bean/EventsBean.java
    myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/windowcontext-events-test1.xhtml

Modified: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/AccessBeanEventTest.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/AccessBeanEventTest.java?rev=1038174&r1=1038173&r2=1038174&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/AccessBeanEventTest.java (original)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/AccessBeanEventTest.java Tue Nov 23 15:50:52 2010
@@ -22,6 +22,8 @@ import org.apache.myfaces.extensions.cdi
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.EventsBean;
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.ViewAccessBean;
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.WindowBean;
+import org.apache.myfaces.extensions.cdi.test.webapp.events.config.AccessBeanEventEnabledConfig;
+import org.apache.myfaces.extensions.cdi.test.webapp.events.config.DefaultConversationConfig;
 import org.apache.myfaces.test.webapp.api.annotation.BeansXml;
 import org.apache.myfaces.test.webapp.api.annotation.PageBean;
 import org.apache.myfaces.test.webapp.api.annotation.Tester;
@@ -40,13 +42,15 @@ import javax.faces.event.PhaseId;
               @PageBean(clazz = ConversationBean.class),
               @PageBean(clazz = ViewAccessBean.class),
               @PageBean(clazz = WindowBean.class),
-              @PageBean(clazz = EventsBean.class)
+              @PageBean(clazz = EventsBean.class),
+              @PageBean(clazz = DefaultConversationConfig.class),
+              @PageBean(clazz = AccessBeanEventEnabledConfig.class)
       }
 )
 
-@BeansXml
+@BeansXml("events/access-bean-event-enabled-beans.xml")
 
-@WebXml("events/access-bean-event-enabled-web.xml")
+@WebXml("web.xml")
 
 @WebappDependency.List
 ({
@@ -62,8 +66,7 @@ import javax.faces.event.PhaseId;
     @WebappDependency("org.apache.openwebbeans:openwebbeans-resource:jar:1.0.0"),
     @WebappDependency("org.apache.openwebbeans:openwebbeans-web:jar:1.0.0"),
     @WebappDependency("javassist:javassist:jar:3.12.0.GA"),
-    @WebappDependency("net.sf.scannotation:scannotation:jar:1.0.2")/*,
-    @WebappDependency("org.os890.codi.addon:web-xml-config:jar:1.0.0-alpha")*/
+    @WebappDependency("net.sf.scannotation:scannotation:jar:1.0.2")
 })
 
 @RunWith(WebappTestRunner.class)

Modified: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/ConversationEventTest.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/ConversationEventTest.java?rev=1038174&r1=1038173&r2=1038174&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/ConversationEventTest.java (original)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/ConversationEventTest.java Tue Nov 23 15:50:52 2010
@@ -20,6 +20,8 @@ package org.apache.myfaces.extensions.cd
 
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.ConversationBean;
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.EventsBean;
+import org.apache.myfaces.extensions.cdi.test.webapp.events.config.ConversationEventsEnabledConfig;
+import org.apache.myfaces.extensions.cdi.test.webapp.events.config.DefaultConversationConfig;
 import org.apache.myfaces.test.webapp.api.annotation.BeansXml;
 import org.apache.myfaces.test.webapp.api.annotation.PageBean;
 import org.apache.myfaces.test.webapp.api.annotation.Tester;
@@ -37,13 +39,15 @@ import javax.faces.event.PhaseId;
 @View(id = "events/conversation-events-test1.xhtml",
       pageBeans = {
               @PageBean(clazz = ConversationBean.class),
-              @PageBean(clazz = EventsBean.class)
+              @PageBean(clazz = EventsBean.class),
+              @PageBean(clazz = DefaultConversationConfig.class),
+              @PageBean(clazz = ConversationEventsEnabledConfig.class)
       }
 )
 
-@BeansXml
+@BeansXml("events/conversation-events-enabled-beans.xml")
 
-@WebXml("events/conversation-events-enabled-web.xml")
+@WebXml("web.xml")
 
 @WebappResource.List
 ({
@@ -64,8 +68,7 @@ import javax.faces.event.PhaseId;
     @WebappDependency("org.apache.openwebbeans:openwebbeans-resource:jar:1.0.0"),
     @WebappDependency("org.apache.openwebbeans:openwebbeans-web:jar:1.0.0"),
     @WebappDependency("javassist:javassist:jar:3.12.0.GA"),
-    @WebappDependency("net.sf.scannotation:scannotation:jar:1.0.2")/*,
-    @WebappDependency("org.os890.codi.addon:web-xml-config:jar:1.0.0-alpha")*/
+    @WebappDependency("net.sf.scannotation:scannotation:jar:1.0.2")
 })
 
 @RunWith(WebappTestRunner.class)

Modified: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/ScopeBeanEventTest.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/ScopeBeanEventTest.java?rev=1038174&r1=1038173&r2=1038174&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/ScopeBeanEventTest.java (original)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/ScopeBeanEventTest.java Tue Nov 23 15:50:52 2010
@@ -22,6 +22,8 @@ import org.apache.myfaces.extensions.cdi
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.EventsBean;
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.ViewAccessBean;
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.WindowBean;
+import org.apache.myfaces.extensions.cdi.test.webapp.events.config.DefaultConversationConfig;
+import org.apache.myfaces.extensions.cdi.test.webapp.events.config.ScopeBeanEventEnabledConfig;
 import org.apache.myfaces.test.webapp.api.annotation.BeansXml;
 import org.apache.myfaces.test.webapp.api.annotation.PageBean;
 import org.apache.myfaces.test.webapp.api.annotation.Tester;
@@ -41,13 +43,15 @@ import javax.faces.event.PhaseId;
               @PageBean(clazz = ConversationBean.class),
               @PageBean(clazz = ViewAccessBean.class),
               @PageBean(clazz = WindowBean.class),
-              @PageBean(clazz = EventsBean.class)
+              @PageBean(clazz = EventsBean.class),
+              @PageBean(clazz = DefaultConversationConfig.class),
+              @PageBean(clazz = ScopeBeanEventEnabledConfig.class)
       }
 )
 
-@BeansXml
+@BeansXml("events/scope-bean-event-enabled-beans.xml")
 
-@WebXml("events/scopebeanevent-enabled-web.xml")
+@WebXml("web.xml")
 
 @WebappResource.List
 ({
@@ -68,8 +72,7 @@ import javax.faces.event.PhaseId;
     @WebappDependency("org.apache.openwebbeans:openwebbeans-resource:jar:1.0.0"),
     @WebappDependency("org.apache.openwebbeans:openwebbeans-web:jar:1.0.0"),
     @WebappDependency("javassist:javassist:jar:3.12.0.GA"),
-    @WebappDependency("net.sf.scannotation:scannotation:jar:1.0.2")/*,
-    @WebappDependency("org.os890.codi.addon:web-xml-config:jar:1.0.0-alpha")*/
+    @WebappDependency("net.sf.scannotation:scannotation:jar:1.0.2")
 })
 
 @RunWith(WebappTestRunner.class)

Modified: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/UnscopeBeanEventTest.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/UnscopeBeanEventTest.java?rev=1038174&r1=1038173&r2=1038174&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/UnscopeBeanEventTest.java (original)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/UnscopeBeanEventTest.java Tue Nov 23 15:50:52 2010
@@ -22,6 +22,8 @@ import org.apache.myfaces.extensions.cdi
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.EventsBean;
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.ViewAccessBean;
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.WindowBean;
+import org.apache.myfaces.extensions.cdi.test.webapp.events.config.DefaultConversationConfig;
+import org.apache.myfaces.extensions.cdi.test.webapp.events.config.UnscopeBeanEventEnabledConfig;
 import org.apache.myfaces.test.webapp.api.annotation.BeansXml;
 import org.apache.myfaces.test.webapp.api.annotation.PageBean;
 import org.apache.myfaces.test.webapp.api.annotation.Tester;
@@ -41,13 +43,15 @@ import javax.faces.event.PhaseId;
               @PageBean(clazz = ConversationBean.class),
               @PageBean(clazz = ViewAccessBean.class),
               @PageBean(clazz = WindowBean.class),
-              @PageBean(clazz = EventsBean.class)
+              @PageBean(clazz = EventsBean.class),
+              @PageBean(clazz = DefaultConversationConfig.class),
+              @PageBean(clazz = UnscopeBeanEventEnabledConfig.class)
       }
 )
 
-@BeansXml
+@BeansXml("events/unscope-bean-event-enabled-beans.xml")
 
-@WebXml("events/unscopebeanevent-enabled-web.xml")
+@WebXml("web.xml")
 
 @WebappResource.List
 ({
@@ -68,8 +72,7 @@ import javax.faces.event.PhaseId;
     @WebappDependency("org.apache.openwebbeans:openwebbeans-resource:jar:1.0.0"),
     @WebappDependency("org.apache.openwebbeans:openwebbeans-web:jar:1.0.0"),
     @WebappDependency("javassist:javassist:jar:3.12.0.GA"),
-    @WebappDependency("net.sf.scannotation:scannotation:jar:1.0.2")/*,
-    @WebappDependency("org.os890.codi.addon:web-xml-config:jar:1.0.0-alpha")*/
+    @WebappDependency("net.sf.scannotation:scannotation:jar:1.0.2")
 })
 
 @RunWith(WebappTestRunner.class)

Modified: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/WindowContextEventTest.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/WindowContextEventTest.java?rev=1038174&r1=1038173&r2=1038174&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/WindowContextEventTest.java (original)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/WindowContextEventTest.java Tue Nov 23 15:50:52 2010
@@ -20,6 +20,8 @@ package org.apache.myfaces.extensions.cd
 
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.ConversationBean;
 import org.apache.myfaces.extensions.cdi.test.webapp.events.bean.EventsBean;
+import org.apache.myfaces.extensions.cdi.test.webapp.events.config.DefaultWindowContextConfig;
+import org.apache.myfaces.extensions.cdi.test.webapp.events.config.WindowContextEventEnabledConfig;
 import org.apache.myfaces.test.webapp.api.annotation.BeansXml;
 import org.apache.myfaces.test.webapp.api.annotation.PageBean;
 import org.apache.myfaces.test.webapp.api.annotation.Tester;
@@ -36,13 +38,15 @@ import javax.faces.event.PhaseId;
 @View(id = "events/windowcontext-events-test1.xhtml",
       pageBeans = {
               @PageBean(clazz = ConversationBean.class),
-              @PageBean(clazz = EventsBean.class)
+              @PageBean(clazz = EventsBean.class),
+              @PageBean(clazz = DefaultWindowContextConfig.class),
+              @PageBean(clazz = WindowContextEventEnabledConfig.class)
       }
 )
 
-@BeansXml
+@BeansXml("events/windowcontext-events-enabled-beans.xml")
 
-@WebXml("events/windowcontext-events-enabled-web.xml")
+@WebXml("web.xml")
 
 @WebappDependency.List
 ({
@@ -58,8 +62,7 @@ import javax.faces.event.PhaseId;
     @WebappDependency("org.apache.openwebbeans:openwebbeans-resource:jar:1.0.0"),
     @WebappDependency("org.apache.openwebbeans:openwebbeans-web:jar:1.0.0"),
     @WebappDependency("javassist:javassist:jar:3.12.0.GA"),
-    @WebappDependency("net.sf.scannotation:scannotation:jar:1.0.2")/*,
-    @WebappDependency("org.os890.codi.addon:web-xml-config:jar:1.0.0-alpha")*/
+    @WebappDependency("net.sf.scannotation:scannotation:jar:1.0.2")
 })
 
 @RunWith(WebappTestRunner.class)
@@ -72,17 +75,14 @@ import javax.faces.event.PhaseId;
 public class WindowContextEventTest
 {
 
+    // TODO testForm:closeWindowContext must also fire
+
     @Tester
     private static WebappTester tester;
 
     @Test
     public void createWindowContextEvent_closeWindowContextEvent() throws Exception
     {
-        // a WindowContext is created for every request
-        // NOTE that the closing can only be asserted on the next request,
-        // because the WindowContext still needs to be open in RENDER_RESPONSE
-        // after-PhaseListeners.
-
         tester.assertThat("#{eventsBean.windowContextCreated}").is(1).after(PhaseId.RENDER_RESPONSE);
         tester.assertThat("#{eventsBean.windowContextClosed}").is(0).after(PhaseId.RENDER_RESPONSE);
 
@@ -92,11 +92,11 @@ public class WindowContextEventTest
         tester.assertThat("#{eventsBean.windowContextCreated}").is(2).after(PhaseId.RENDER_RESPONSE);
         tester.assertThat("#{eventsBean.windowContextClosed}").is(1).after(PhaseId.RENDER_RESPONSE);
 
-        // new request
-        tester.click("testForm:emptyCommand");
+        // manually close WindowContext - must also fire CloseWindowContextEvent
+        tester.click("testForm:closeWindowContext");
 
         tester.assertThat("#{eventsBean.windowContextCreated}").is(3).after(PhaseId.RENDER_RESPONSE);
-        tester.assertThat("#{eventsBean.windowContextClosed}").is(2).after(PhaseId.RENDER_RESPONSE);
+        tester.assertThat("#{eventsBean.windowContextClosed}").is(3).after(PhaseId.RENDER_RESPONSE);
     }
 
 }

Modified: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/bean/EventsBean.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/bean/EventsBean.java?rev=1038174&r1=1038173&r2=1038174&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/bean/EventsBean.java (original)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/bean/EventsBean.java Tue Nov 23 15:50:52 2010
@@ -19,6 +19,7 @@
 package org.apache.myfaces.extensions.cdi.test.webapp.events.bean;
 
 import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.Conversation;
+import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.WindowContext;
 import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.event.AccessBeanEvent;
 import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.event.CloseConversationEvent;
 import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.event.CloseWindowContextEvent;
@@ -31,6 +32,7 @@ import org.apache.myfaces.extensions.cdi
 import javax.annotation.PostConstruct;
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.event.Observes;
+import javax.inject.Inject;
 import javax.inject.Named;
 import java.io.Serializable;
 
@@ -58,6 +60,9 @@ public class EventsBean implements Seria
     private int windowContextCreated;
     private int windowContextClosed;
 
+    @Inject
+    private WindowContext windowContext;
+
     @PostConstruct
     public void initialize()
     {
@@ -178,6 +183,13 @@ public class EventsBean implements Seria
         return "scope-bean-event-test2.xhtml";
     }
 
+    public String closeWindowContext()
+    {
+        windowContext.close();
+
+        return null;
+    }
+
     // Getter and Setter
     
     public boolean isConversationStarted()

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/AccessBeanEventEnabledConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/AccessBeanEventEnabledConfig.java?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/AccessBeanEventEnabledConfig.java (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/AccessBeanEventEnabledConfig.java Tue Nov 23 15:50:52 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.myfaces.extensions.cdi.test.webapp.events.config;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Alternative;
+
+/**
+ * Enables the access-bean event.
+ *
+ * @author Jakob Korherr
+ */
+@Alternative
+@ApplicationScoped
+public class AccessBeanEventEnabledConfig extends DefaultConversationConfig
+{
+
+    @Override
+    public boolean isAccessBeanEventEnabled()
+    {
+        return true;
+    }
+
+}

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/ConversationEventsEnabledConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/ConversationEventsEnabledConfig.java?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/ConversationEventsEnabledConfig.java (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/ConversationEventsEnabledConfig.java Tue Nov 23 15:50:52 2010
@@ -0,0 +1,52 @@
+/*
+ * 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.myfaces.extensions.cdi.test.webapp.events.config;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Alternative;
+
+/**
+ * Enables all Conversation events.
+ *
+ * @author Jakob Korherr
+ */
+@Alternative
+@ApplicationScoped
+public class ConversationEventsEnabledConfig extends DefaultConversationConfig
+{
+
+    @Override
+    public boolean isStartConversationEventEnabled()
+    {
+        return true;
+    }
+
+    @Override
+    public boolean isCloseConversationEventEnabled()
+    {
+        return true;
+    }
+
+    @Override
+    public boolean isRestartConversationEventEnabled()
+    {
+        return true;
+    }
+    
+}

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/DefaultConversationConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/DefaultConversationConfig.java?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/DefaultConversationConfig.java (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/DefaultConversationConfig.java Tue Nov 23 15:50:52 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.myfaces.extensions.cdi.test.webapp.events.config;
+
+import org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig;
+import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.ConversationConfig;
+
+/**
+ * Custom ConversationConfig to enable/disable certain events for the test cases.
+ * Subclasses of this class are installed via @Alternative and an entry in beans.xml.
+ *
+ * @author Jakob Korherr
+ */
+public class DefaultConversationConfig implements ConversationConfig, CodiConfig
+{
+
+    public int getConversationTimeoutInMinutes()
+    {
+        return 30;
+    }
+
+    public boolean isScopeBeanEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isAccessBeanEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isUnscopeBeanEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isStartConversationEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isCloseConversationEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isRestartConversationEventEnabled()
+    {
+        return false;
+    }
+
+}

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/DefaultWindowContextConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/DefaultWindowContextConfig.java?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/DefaultWindowContextConfig.java (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/DefaultWindowContextConfig.java Tue Nov 23 15:50:52 2010
@@ -0,0 +1,72 @@
+/*
+ * 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.myfaces.extensions.cdi.test.webapp.events.config;
+
+import org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig;
+import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.WindowContextConfig;
+
+/**
+ * Custom WindowContextConfig to enable/disable certain events for the test cases.
+ * Subclasses of this class are installed via @Alternative and an entry in beans.xml.
+ *
+ * @author Jakob Korherr
+ */
+public class DefaultWindowContextConfig implements WindowContextConfig, CodiConfig
+{
+
+    public boolean isUrlParameterSupported()
+    {
+        return true;
+    }
+
+    public boolean isUnknownWindowIdsAllowed()
+    {
+        return false;
+    }
+
+    public boolean isAddWindowIdToActionUrlsEnabled()
+    {
+        return false;
+    }
+
+    public int getWindowContextTimeoutInMinutes()
+    {
+        return 60;
+    }
+
+    public int getMaxWindowContextCount()
+    {
+        return 64;
+    }
+
+    public boolean isCreateWindowContextEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isCloseWindowContextEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isCloseEmptyWindowContextsEnabled()
+    {
+        return false;
+    }
+}

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/ScopeBeanEventEnabledConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/ScopeBeanEventEnabledConfig.java?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/ScopeBeanEventEnabledConfig.java (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/ScopeBeanEventEnabledConfig.java Tue Nov 23 15:50:52 2010
@@ -0,0 +1,39 @@
+/*
+ * 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.myfaces.extensions.cdi.test.webapp.events.config;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Alternative;
+
+/**
+ * Enables the scope-bean event.
+ *
+ * @author Jakob Korherr
+ */
+@Alternative
+@ApplicationScoped
+public class ScopeBeanEventEnabledConfig extends DefaultConversationConfig
+{
+
+    @Override
+    public boolean isScopeBeanEventEnabled()
+    {
+        return true;
+    }
+}

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/UnscopeBeanEventEnabledConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/UnscopeBeanEventEnabledConfig.java?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/UnscopeBeanEventEnabledConfig.java (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/UnscopeBeanEventEnabledConfig.java Tue Nov 23 15:50:52 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.myfaces.extensions.cdi.test.webapp.events.config;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Alternative;
+
+/**
+ * Enables the unscope-bean event.
+ *
+ * @author Jakob Korherr
+ */
+@Alternative
+@ApplicationScoped
+public class UnscopeBeanEventEnabledConfig extends DefaultConversationConfig
+{
+
+    @Override
+    public boolean isUnscopeBeanEventEnabled()
+    {
+        return true;
+    }
+    
+}

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/WindowContextEventEnabledConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/WindowContextEventEnabledConfig.java?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/WindowContextEventEnabledConfig.java (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/java/org/apache/myfaces/extensions/cdi/test/webapp/events/config/WindowContextEventEnabledConfig.java Tue Nov 23 15:50:52 2010
@@ -0,0 +1,52 @@
+/*
+ * 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.myfaces.extensions.cdi.test.webapp.events.config;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Alternative;
+
+/**
+ * Enables the WindowContext events.
+ *
+ * @author Jakob Korherr
+ */
+@Alternative
+@ApplicationScoped
+public class WindowContextEventEnabledConfig extends DefaultWindowContextConfig
+{
+
+    @Override
+    public boolean isCreateWindowContextEventEnabled()
+    {
+        return true;
+    }
+
+    @Override
+    public boolean isCloseWindowContextEventEnabled()
+    {
+        return true;
+    }
+
+    @Override
+    public boolean isCloseEmptyWindowContextsEnabled()
+    {
+        return true;
+    }
+
+}

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/access-bean-event-enabled-beans.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/access-bean-event-enabled-beans.xml?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/access-bean-event-enabled-beans.xml (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/access-bean-event-enabled-beans.xml Tue Nov 23 15:50:52 2010
@@ -0,0 +1,29 @@
+<?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">
+
+    <alternatives>
+        <class>org.apache.myfaces.extensions.cdi.test.webapp.events.config.AccessBeanEventEnabledConfig</class>
+    </alternatives>
+
+</beans>
+        
\ No newline at end of file

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/conversation-events-enabled-beans.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/conversation-events-enabled-beans.xml?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/conversation-events-enabled-beans.xml (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/conversation-events-enabled-beans.xml Tue Nov 23 15:50:52 2010
@@ -0,0 +1,29 @@
+<?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">
+
+    <alternatives>
+        <class>org.apache.myfaces.extensions.cdi.test.webapp.events.config.ConversationEventsEnabledConfig</class>
+    </alternatives>
+
+</beans>
+        
\ No newline at end of file

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/scope-bean-event-enabled-beans.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/scope-bean-event-enabled-beans.xml?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/scope-bean-event-enabled-beans.xml (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/scope-bean-event-enabled-beans.xml Tue Nov 23 15:50:52 2010
@@ -0,0 +1,29 @@
+<?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">
+
+    <alternatives>
+        <class>org.apache.myfaces.extensions.cdi.test.webapp.events.config.ScopeBeanEventEnabledConfig</class>
+    </alternatives>
+
+</beans>
+        
\ No newline at end of file

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/unscope-bean-event-enabled-beans.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/unscope-bean-event-enabled-beans.xml?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/unscope-bean-event-enabled-beans.xml (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/unscope-bean-event-enabled-beans.xml Tue Nov 23 15:50:52 2010
@@ -0,0 +1,29 @@
+<?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">
+
+    <alternatives>
+        <class>org.apache.myfaces.extensions.cdi.test.webapp.events.config.UnscopeBeanEventEnabledConfig</class>
+    </alternatives>
+
+</beans>
+        
\ No newline at end of file

Added: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/windowcontext-events-enabled-beans.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/windowcontext-events-enabled-beans.xml?rev=1038174&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/windowcontext-events-enabled-beans.xml (added)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/windowcontext-events-enabled-beans.xml Tue Nov 23 15:50:52 2010
@@ -0,0 +1,29 @@
+<?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">
+
+    <alternatives>
+        <class>org.apache.myfaces.extensions.cdi.test.webapp.events.config.WindowContextEventEnabledConfig</class>
+    </alternatives>
+
+</beans>
+        
\ No newline at end of file

Modified: myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/windowcontext-events-test1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/windowcontext-events-test1.xhtml?rev=1038174&r1=1038173&r2=1038174&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/windowcontext-events-test1.xhtml (original)
+++ myfaces/extensions/cdi/trunk/test-modules/webapp-test-module/src/test/resources/events/windowcontext-events-test1.xhtml Tue Nov 23 15:50:52 2010
@@ -29,7 +29,9 @@
 
         <!-- general commands -->
         <h:commandButton id="emptyCommand"/>
-        
+
+        <h:commandButton id="closeWindowContext" action="#{eventsBean.closeWindowContext}" />
+
     </h:form>
 </h:body>
 </html>