You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2009/03/08 00:31:14 UTC
svn commit: r751337 - in /myfaces/commons/trunk: ./
myfaces-jetty-continuation-example/ myfaces-jetty-continuation-example/src/
myfaces-jetty-continuation-example/src/main/
myfaces-jetty-continuation-example/src/main/java/
myfaces-jetty-continuation-ex...
Author: bommel
Date: Sat Mar 7 23:31:13 2009
New Revision: 751337
URL: http://svn.apache.org/viewvc?rev=751337&view=rev
Log:
added jetty continuation lifecycle example
Added:
myfaces/commons/trunk/myfaces-jetty-continuation-example/ (with props)
myfaces/commons/trunk/myfaces-jetty-continuation-example/pom.xml (with props)
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/commons/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/commons/async/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/commons/async/jetty/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/commons/async/jetty/example/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/commons/async/jetty/example/Bean.java (with props)
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/faces-config.xml (with props)
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/web.xml (with props)
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/index.jsp (with props)
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/list.jsp (with props)
myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/start.jsp (with props)
Modified:
myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/pom.xml
myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/src/main/java/org/apache/myfaces/commons/async/jetty/ContinuationFacesContext.java
myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/src/main/java/org/apache/myfaces/commons/async/jetty/ContinuationFacesContextFactory.java
myfaces/commons/trunk/pom.xml
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Mar 7 23:31:13 2009
@@ -0,0 +1,3 @@
+target
+
+*.iml
Added: myfaces/commons/trunk/myfaces-jetty-continuation-example/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/myfaces-jetty-continuation-example/pom.xml?rev=751337&view=auto
==============================================================================
--- myfaces/commons/trunk/myfaces-jetty-continuation-example/pom.xml (added)
+++ myfaces/commons/trunk/myfaces-jetty-continuation-example/pom.xml Sat Mar 7 23:31:13 2009
@@ -0,0 +1,74 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.myfaces.commons</groupId>
+ <artifactId>commons12</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>myfaces-jetty-continuation-example</artifactId>
+ <name>Jetty Continuatin Example Webapp</name>
+ <packaging>war</packaging>
+
+ <build>
+ <finalName>myfaces-jetty-continuation-example</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>${jetty.version}</version>
+ <configuration>
+ <contextPath>/</contextPath>
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.commons</groupId>
+ <artifactId>myfaces-jetty-continuation-lifecycle</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!--dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>${jsf-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>${jsf-version}</version>
+ </dependency-->
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${myfaces.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>${myfaces.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+
+ <!--repositories>
+ <repository>
+ <id>java.net</id>
+ <url>https://maven-repository.dev.java.net/nonav/repository</url>
+ <layout>legacy</layout>
+ </repository>
+ </repositories-->
+
+ <properties>
+ <myfaces.version>1.2.6</myfaces.version>
+ <jsf-version>1.2_12</jsf-version>
+ </properties>
+</project>
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/commons/async/jetty/example/Bean.java
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/commons/async/jetty/example/Bean.java?rev=751337&view=auto
==============================================================================
--- myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/commons/async/jetty/example/Bean.java (added)
+++ myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/commons/async/jetty/example/Bean.java Sat Mar 7 23:31:13 2009
@@ -0,0 +1,88 @@
+/*
+ * 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.commons.async.jetty.example;
+
+import org.apache.commons.collections.KeyValue;
+import org.apache.commons.collections.keyvalue.DefaultKeyValue;
+import org.apache.myfaces.commons.async.jetty.ContinuationFacesContext;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+public class Bean
+{
+ private List<KeyValue> items = null;
+
+ public List<KeyValue> getItems()
+ {
+ return items;
+ }
+
+ public void setItems(List<KeyValue> items)
+ {
+ this.items = items;
+ }
+ public String back() {
+ items = null;
+ return "back";
+ }
+
+ public String perform()
+ {
+ final ContinuationFacesContext continuationFacesContext =
+ (ContinuationFacesContext) FacesContext.getCurrentInstance();
+ if (items == null)
+ {
+ continuationFacesContext.startAsync(5000);
+ ExecutorService executorService = Executors.newSingleThreadExecutor();
+ executorService.execute(new Runnable()
+ {
+ public void run()
+ {
+ try
+ {
+ // long running task
+ Thread.sleep(4000);
+
+ items = new ArrayList<KeyValue>();
+
+ items.add(new DefaultKeyValue("One", "Two"));
+ } catch (Exception e)
+ {
+ continuationFacesContext.addMessage(null, new FacesMessage(e.getMessage()));
+ }
+ finally
+ {
+ continuationFacesContext.resume();
+
+ }
+ }
+ });
+
+ } else if (continuationFacesContext.isExpired()) {
+ continuationFacesContext.addMessage(null, new FacesMessage("Request Timeout"));
+ return null;
+ }
+ return "success";
+ }
+}
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/commons/async/jetty/example/Bean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/java/org/apache/myfaces/commons/async/jetty/example/Bean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/faces-config.xml?rev=751337&view=auto
==============================================================================
--- myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/faces-config.xml Sat Mar 7 23:31:13 2009
@@ -0,0 +1,45 @@
+<?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.
+-->
+
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
+
+ <navigation-rule>
+ <from-view-id>*</from-view-id>
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/list.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>*</from-view-id>
+ <navigation-case>
+ <from-outcome>back</from-outcome>
+ <to-view-id>/start.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.commons.async.jetty.example.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+</faces-config>
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/web.xml?rev=751337&view=auto
==============================================================================
--- myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/web.xml (added)
+++ myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/web.xml Sat Mar 7 23:31:13 2009
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee web-app_2_5.xsd"
+ version="2.5">
+
+ <display-name>myfaces-jetty-continuation-example</display-name>
+
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+
+ <context-param>
+ <description>
+ </description>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <description>
+ </description>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+
+ <servlet>
+ <display-name>FacesServlet</display-name>
+ <servlet-name>FacesServlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup></servlet>
+ <servlet-mapping>
+ <servlet-name>FacesServlet</servlet-name>
+ <url-pattern>*.faces</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/index.jsp?rev=751337&view=auto
==============================================================================
--- myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/index.jsp (added)
+++ myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/index.jsp Sat Mar 7 23:31:13 2009
@@ -0,0 +1,19 @@
+<%--
+ * 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.
+--%>
+<%
+response.sendRedirect("start.faces");
+%>
\ No newline at end of file
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/index.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/list.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/list.jsp?rev=751337&view=auto
==============================================================================
--- myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/list.jsp (added)
+++ myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/list.jsp Sat Mar 7 23:31:13 2009
@@ -0,0 +1,42 @@
+<%--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+--%>
+
+<%@ page contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<html>
+<body>
+
+<f:view>
+ <h:form>
+ <h:panelGrid>
+ <h:dataTable value="#{bean.items}" var="item">
+ <h:column>
+ <h:outputText value="#{item.key}"/>
+ </h:column>
+ <h:column>
+ <h:outputText value="#{item.value}"/>
+ </h:column>
+ </h:dataTable>
+ <h:commandButton action="#{bean.back}" value="Back"/>
+ <h:messages/>
+ </h:panelGrid>
+ </h:form>
+</f:view>
+
+</body>
+</html>
\ No newline at end of file
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/list.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/list.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/start.jsp
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/start.jsp?rev=751337&view=auto
==============================================================================
--- myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/start.jsp (added)
+++ myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/start.jsp Sat Mar 7 23:31:13 2009
@@ -0,0 +1,34 @@
+<%--
+ * 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.
+--%>
+
+<%@ page contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<html>
+<body>
+
+<f:view>
+ <h:form>
+ <h:panelGrid>
+ <h:commandButton action="#{bean.perform}" value="Invoke Async Request"/>
+ <h:messages/>
+ </h:panelGrid>
+ </h:form>
+</f:view>
+
+</body>
+</html>
\ No newline at end of file
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/start.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/commons/trunk/myfaces-jetty-continuation-example/src/main/webapp/start.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/pom.xml?rev=751337&r1=751336&r2=751337&view=diff
==============================================================================
--- myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/pom.xml (original)
+++ myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/pom.xml Sat Mar 7 23:31:13 2009
@@ -68,8 +68,4 @@
<version>${project.version}</version>
</dependency>
</dependencies>
-
- <properties>
- <jetty.version>6.1.14</jetty.version>
- </properties>
</project>
\ No newline at end of file
Modified: myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/src/main/java/org/apache/myfaces/commons/async/jetty/ContinuationFacesContext.java
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/src/main/java/org/apache/myfaces/commons/async/jetty/ContinuationFacesContext.java?rev=751337&r1=751336&r2=751337&view=diff
==============================================================================
--- myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/src/main/java/org/apache/myfaces/commons/async/jetty/ContinuationFacesContext.java (original)
+++ myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/src/main/java/org/apache/myfaces/commons/async/jetty/ContinuationFacesContext.java Sat Mar 7 23:31:13 2009
@@ -80,6 +80,10 @@
getContinuation().resume();
}
+ public boolean isExpired() {
+ return getContinuation().isPending() && !getContinuation().isResumed();
+ }
+
public Continuation getContinuation()
{
if (continuation == null)
@@ -108,4 +112,8 @@
{
getContinuation().suspend(asyncTimeout);
}
+
+ /*public String toString() {
+ return getContinuation().toString();
+ }*/
}
Modified: myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/src/main/java/org/apache/myfaces/commons/async/jetty/ContinuationFacesContextFactory.java
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/src/main/java/org/apache/myfaces/commons/async/jetty/ContinuationFacesContextFactory.java?rev=751337&r1=751336&r2=751337&view=diff
==============================================================================
--- myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/src/main/java/org/apache/myfaces/commons/async/jetty/ContinuationFacesContextFactory.java (original)
+++ myfaces/commons/trunk/myfaces-jetty-continuation-lifecycle/src/main/java/org/apache/myfaces/commons/async/jetty/ContinuationFacesContextFactory.java Sat Mar 7 23:31:13 2009
@@ -25,7 +25,6 @@
import javax.faces.context.FacesContextFactory;
import javax.faces.lifecycle.Lifecycle;
-
public class ContinuationFacesContextFactory extends FacesContextFactoryWrapper
{
Modified: myfaces/commons/trunk/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/trunk/pom.xml?rev=751337&r1=751336&r2=751337&view=diff
==============================================================================
--- myfaces/commons/trunk/pom.xml (original)
+++ myfaces/commons/trunk/pom.xml Sat Mar 7 23:31:13 2009
@@ -346,6 +346,7 @@
<module>myfaces-async-lifecycle</module>
<module>myfaces-commons-site</module>
<module>myfaces-jetty-continuation-lifecycle</module>
+ <module>myfaces-jetty-continuation-example</module>
</modules>
</profile>
</profiles>
@@ -369,4 +370,7 @@
</plugin>
</plugins>
</reporting>
+ <properties>
+ <jetty.version>6.1.15</jetty.version>
+ </properties>
</project>