[webbeans-commits] Webbeans SVN: r3774 - examples/trunk/jsf/numberguess.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-23 17:56:11 -0400 (Wed, 23 Sep 2009)
New Revision: 3774
Modified:
examples/trunk/jsf/numberguess/readme.txt
Log:
update readme
Modified: examples/trunk/jsf/numberguess/readme.txt
===================================================================
--- examples/trunk/jsf/numberguess/readme.txt 2009-09-23 21:45:46 UTC (rev 3773)
+++ examples/trunk/jsf/numberguess/readme.txt 2009-09-23 21:56:11 UTC (rev 3774)
@@ -23,6 +23,8 @@
You can also execute the application in an embedded Tomcat 6 container:
mvn war:inplace tomcat:run -Ptomcat
+
+You'll can access the app at http://localhost:9090
In both cases, any changes to assets in src/main/webapp take affect immediately. If
a change to a webapp configuration file is made, the application may
@@ -68,3 +70,33 @@
mvn war:exploded tomcat:redeploy -Ptomcat
mvn compile war:exploded tomcat:redeploy -Ptomcat
+The application is available at http://localhost:8080/webbeans-numberguess
+
+== Launching Jetty embedded from Eclipse
+
+First, set up the eclipse environment:
+
+ mvn clean eclipse:clean eclipse:eclipse -Djetty-ide
+
+Next, put all the needed resources into the src/main/webapp
+
+ mvn war:inplace -Djetty-ide
+
+Now, you are ready to run the server in Eclipse; find the Start class in src/main/jetty, and run it's
+main method as a Java Application. The server will launch. You'll find the application at
+http://localhost:8080
+
+
+== Using Google App Engine
+
+First, set up the eclipse environment:
+
+ mvn clean eclipse:clean eclipse:eclipse -Dgae
+
+Make sure you have the Google App Engine Eclipse plugin installed.
+
+Next, put all the needed resources into the src/main/webapp
+
+ mvn war:inplace -Dgae
+
+Now, in Eclipse, you can either run the app locally, or deploy it to Google App Engine
\ No newline at end of file
15 years, 2 months
[webbeans-commits] Webbeans SVN: r3773 - in examples/trunk/jsf/numberguess: src/jetty and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-23 17:45:46 -0400 (Wed, 23 Sep 2009)
New Revision: 3773
Added:
examples/trunk/jsf/numberguess/src/jetty/resources/
examples/trunk/jsf/numberguess/src/jetty/resources/META-INF/
examples/trunk/jsf/numberguess/src/jetty/resources/META-INF/beans.xml
examples/trunk/jsf/numberguess/src/jetty/resources/log4j.properties
Removed:
examples/trunk/jsf/numberguess/src/jetty/java/log4j.properties
Modified:
examples/trunk/jsf/numberguess/pom.xml
examples/trunk/jsf/numberguess/src/jetty/java/Start.java
Log:
get jetty working in the IDE
Modified: examples/trunk/jsf/numberguess/pom.xml
===================================================================
--- examples/trunk/jsf/numberguess/pom.xml 2009-09-23 21:45:19 UTC (rev 3772)
+++ examples/trunk/jsf/numberguess/pom.xml 2009-09-23 21:45:46 UTC (rev 3773)
@@ -183,6 +183,12 @@
</dependency>
<dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.webbeans.servlet</groupId>
<artifactId>webbeans-servlet</artifactId>
<scope>runtime</scope>
@@ -323,29 +329,37 @@
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <scope>runtime</scope>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.webbeans.servlet</groupId>
<artifactId>webbeans-servlet</artifactId>
- <scope>runtime</scope>
+ <scope>provided</scope>
</dependency>
<dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
- <scope>runtime</scope>
+ <scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.el</groupId>
@@ -369,6 +383,12 @@
</dependency>
<dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jsp-2.1-jetty</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
@@ -395,6 +415,40 @@
</webResources>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <useProjectReferences>false</useProjectReferences>
+ <classpathContainers>
+ <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
+ </classpathContainers>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ <goal>add-resource</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>src/jetty/java</source>
+ </sources>
+ <resources>
+ <resource>
+ <directory>src/jetty/resources</directory>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
@@ -446,6 +500,8 @@
<include>META-INF/context.xml</include>
<include>WEB-INF/web.xml</include>
<include>WEB-INF/jetty-env.xml</include>
+ <include>WEB-INF/appengine-web.xml</include>
+ <include>WEB-INF/logging.properties</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
Modified: examples/trunk/jsf/numberguess/src/jetty/java/Start.java
===================================================================
--- examples/trunk/jsf/numberguess/src/jetty/java/Start.java 2009-09-23 21:45:19 UTC (rev 3772)
+++ examples/trunk/jsf/numberguess/src/jetty/java/Start.java 2009-09-23 21:45:46 UTC (rev 3773)
@@ -17,7 +17,6 @@
bb.setServer(server);
bb.setContextPath("/");
bb.setWar("src/main/webapp");
- bb.setDescriptor("src/main/webapp-jetty/WEB-INF/web.xml");
// Disable for now
// Resource jettyEnv = Resource.newResource("src/main/webapp-jetty/WEB-INF/jetty-env.xml");
Deleted: examples/trunk/jsf/numberguess/src/jetty/java/log4j.properties
===================================================================
--- examples/trunk/jsf/numberguess/src/jetty/java/log4j.properties 2009-09-23 21:45:19 UTC (rev 3772)
+++ examples/trunk/jsf/numberguess/src/jetty/java/log4j.properties 2009-09-23 21:45:46 UTC (rev 3773)
@@ -1,10 +0,0 @@
-log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n
-
-
-log4j.rootLogger=INFO,Stdout
-
-log4j.logger.org.jboss.webbeans=DEBUG
-
-
Added: examples/trunk/jsf/numberguess/src/jetty/resources/META-INF/beans.xml
===================================================================
Property changes on: examples/trunk/jsf/numberguess/src/jetty/resources/META-INF/beans.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: examples/trunk/jsf/numberguess/src/jetty/resources/log4j.properties (from rev 3765, examples/trunk/jsf/numberguess/src/jetty/java/log4j.properties)
===================================================================
--- examples/trunk/jsf/numberguess/src/jetty/resources/log4j.properties (rev 0)
+++ examples/trunk/jsf/numberguess/src/jetty/resources/log4j.properties 2009-09-23 21:45:46 UTC (rev 3773)
@@ -0,0 +1,10 @@
+log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n
+
+
+log4j.rootLogger=INFO,Stdout
+
+log4j.logger.org.jboss.webbeans=DEBUG
+
+
Property changes on: examples/trunk/jsf/numberguess/src/jetty/resources/log4j.properties
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
15 years, 2 months
[webbeans-commits] Webbeans SVN: r3772 - ri/trunk/impl/src/main/java/org/jboss/webbeans/util.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-23 17:45:19 -0400 (Wed, 23 Sep 2009)
New Revision: 3772
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java
Log:
allow default package
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java 2009-09-23 21:45:05 UTC (rev 3771)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java 2009-09-23 21:45:19 UTC (rev 3772)
@@ -847,7 +847,7 @@
public static Field ensureAccessible(Field field)
{
- if (!field.isAccessible() && !field.getDeclaringClass().getPackage().getName().startsWith("java.util"))
+ if (!field.isAccessible() && !isIgnorePackage(field.getDeclaringClass().getPackage()))
{
field.setAccessible(true);
}
@@ -856,7 +856,7 @@
public static Method ensureAccessible(Method method)
{
- if (!method.isAccessible() && !method.getDeclaringClass().getPackage().getName().startsWith("java.util"))
+ if (!method.isAccessible() && !isIgnorePackage(method.getDeclaringClass().getPackage()))
{
method.setAccessible(true);
}
@@ -865,11 +865,25 @@
public static <T> Constructor<T> ensureAccessible(Constructor<T> constructor)
{
- if (!constructor.isAccessible() && !constructor.getDeclaringClass().getPackage().getName().startsWith("java.util"))
+ Class<?> c = constructor.getDeclaringClass();
+ Package p = c.getPackage();
+ if (!constructor.isAccessible() && !isIgnorePackage(p))
{
constructor.setAccessible(true);
}
return constructor;
}
+
+ private static boolean isIgnorePackage(Package pkg)
+ {
+ if (pkg != null)
+ {
+ return pkg.getName().startsWith("java.lang");
+ }
+ else
+ {
+ return false;
+ }
+ }
}
15 years, 2 months
[webbeans-commits] Webbeans SVN: r3771 - ri/trunk/version-matrix.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-23 17:45:05 -0400 (Wed, 23 Sep 2009)
New Revision: 3771
Modified:
ri/trunk/version-matrix/pom.xml
Log:
add various jettys deps
Modified: ri/trunk/version-matrix/pom.xml
===================================================================
--- ri/trunk/version-matrix/pom.xml 2009-09-23 19:55:45 UTC (rev 3770)
+++ ri/trunk/version-matrix/pom.xml 2009-09-23 21:45:05 UTC (rev 3771)
@@ -77,6 +77,12 @@
<artifactId>jetty-plus</artifactId>
<version>${jetty.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jsp-2.1-jetty</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
<dependency>
<groupId>org.testng</groupId>
@@ -420,6 +426,11 @@
<pluginManagement>
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.4</version>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
15 years, 2 months
[webbeans-commits] Webbeans SVN: r3770 - in examples/trunk/jsf/numberguess: src/main/webapp-gae/WEB-INF and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-23 15:55:45 -0400 (Wed, 23 Sep 2009)
New Revision: 3770
Removed:
examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/jetty-env.xml
Modified:
examples/trunk/jsf/numberguess/pom.xml
examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/appengine-web.xml
examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/web.xml
Log:
various fixes to GAE example, now blocked by non-serializable objects being stored in session
Modified: examples/trunk/jsf/numberguess/pom.xml
===================================================================
--- examples/trunk/jsf/numberguess/pom.xml 2009-09-23 19:53:54 UTC (rev 3769)
+++ examples/trunk/jsf/numberguess/pom.xml 2009-09-23 19:55:45 UTC (rev 3770)
@@ -48,18 +48,6 @@
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
</dependency>
-
- <dependency>
- <groupId>org.glassfish.web</groupId>
- <artifactId>el-impl</artifactId>
- <scope>runtime</scope>
- <exclusions>
- <exclusion>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
</dependencies>
@@ -80,6 +68,19 @@
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>el-impl</artifactId>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
</dependencies>
<build>
<plugins>
@@ -130,6 +131,18 @@
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>el-impl</artifactId>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
</dependencies>
<build>
<plugins>
@@ -175,6 +188,18 @@
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>el-impl</artifactId>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
</dependencies>
<build>
<plugins>
@@ -201,14 +226,14 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_12</version>
+ <version>1.2_13</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
<scope>runtime</scope>
- <version>1.2_12</version>
+ <version>1.2_13</version>
</dependency>
<dependency>
@@ -225,8 +250,15 @@
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
+ <version>1.2</version>
</dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-ri</artifactId>
+ <version>1.2</version>
+ </dependency>
+
</dependencies>
<build>
<plugins>
@@ -310,6 +342,18 @@
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>el-impl</artifactId>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
<!-- JETTY DEPENDENCIES FOR IN IDE TESTING -->
<dependency>
Modified: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/appengine-web.xml
===================================================================
--- examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/appengine-web.xml 2009-09-23 19:53:54 UTC (rev 3769)
+++ examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/appengine-web.xml 2009-09-23 19:55:45 UTC (rev 3770)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>webbeans-numberguess</application>
- <version>1</version>
+ <version>2</version>
<!-- Configure java.util.logging -->
<system-properties>
Deleted: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/jetty-env.xml
===================================================================
--- examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/jetty-env.xml 2009-09-23 19:53:54 UTC (rev 3769)
+++ examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/jetty-env.xml 2009-09-23 19:55:45 UTC (rev 3770)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
- "http://jetty.mortbay.org/configure.dtd">
-<Configure id="webAppCtx" class="org.mortbay.jetty.webapp.WebAppContext">
- <New id="appManager" class="org.mortbay.jetty.plus.naming.Resource">
- <Arg><Ref id="webAppCtx"/></Arg>
- <Arg>app/Manager</Arg>
- <Arg>
- <New class="javax.naming.Reference">
- <Arg>javax.inject.manager.Manager</Arg>
- <Arg>org.jboss.webbeans.resources.ManagerObjectFactory</Arg>
- <Arg/>
- </New>
- </Arg>
- </New>
-</Configure>
Modified: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/web.xml
===================================================================
--- examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/web.xml 2009-09-23 19:53:54 UTC (rev 3769)
+++ examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/web.xml 2009-09-23 19:55:45 UTC (rev 3770)
@@ -41,11 +41,5 @@
<session-config>
<session-timeout>10</session-timeout>
</session-config>
-
- <resource-env-ref>
- <description>Object factory for the CDI Bean Manager</description>
- <resource-env-ref-name>BeanManager</resource-env-ref-name>
- <resource-env-ref-type>javax.enterprise.inject.spi.BeanManager</resource-env-ref-type>
- </resource-env-ref>
</web-app>
15 years, 2 months
[webbeans-commits] Webbeans SVN: r3769 - in ri/trunk: impl/src/main/java/org/jboss/webbeans/util and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-23 15:53:54 -0400 (Wed, 23 Sep 2009)
New Revision: 3769
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java
ri/trunk/version-matrix/pom.xml
Log:
fix some security access problem
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-09-23 18:22:11 UTC (rev 3768)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-09-23 19:53:54 UTC (rev 3769)
@@ -74,7 +74,7 @@
return this;
}
- private <X> ProcessAnnotatedTypeImpl<X> createProcessAnnotatedTypeEvent(Class<X> clazz, ClassTransformer classTransformer)
+ private static <X> ProcessAnnotatedTypeImpl<X> createProcessAnnotatedTypeEvent(Class<X> clazz, ClassTransformer classTransformer)
{
WBClass<X> annotatedType = classTransformer.loadClass(clazz);
return new ProcessAnnotatedTypeImpl<X>(annotatedType) {};
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java 2009-09-23 18:22:11 UTC (rev 3768)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java 2009-09-23 19:53:54 UTC (rev 3769)
@@ -31,12 +31,15 @@
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.lang.reflect.WildcardType;
+import java.security.AccessControlException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import javax.inject.Qualifier;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logging;
import org.jboss.webbeans.util.reflection.ParameterizedTypeImpl;
/**
@@ -48,6 +51,8 @@
public class Reflections
{
+ private static final Log log = Logging.getLog(Reflections.class);
+
private static final Type[] EMPTY_TYPES = {};
public static class HierarchyDiscovery
@@ -129,11 +134,19 @@
@SuppressWarnings("unchecked")
private void discoverFromClass(Class<?> clazz)
{
- discoverTypes(resolveType(type, clazz.getGenericSuperclass()));
- for (Type c : clazz.getGenericInterfaces())
+ try
{
- discoverTypes(resolveType(type, c));
+ discoverTypes(resolveType(type, clazz.getGenericSuperclass()));
+ for (Type c : clazz.getGenericInterfaces())
+ {
+ discoverTypes(resolveType(type, c));
+ }
}
+ catch (AccessControlException e)
+ {
+ // TODO Hmm, is this a hack?
+ log.trace("Security exception scanning " + clazz.getName(), e);
+ }
}
/**
Modified: ri/trunk/version-matrix/pom.xml
===================================================================
--- ri/trunk/version-matrix/pom.xml 2009-09-23 18:22:11 UTC (rev 3768)
+++ ri/trunk/version-matrix/pom.xml 2009-09-23 19:53:54 UTC (rev 3769)
@@ -202,13 +202,13 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_12</version>
+ <version>1.2_13</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_12</version>
+ <version>1.2_13</version>
</dependency>
<dependency>
15 years, 2 months
[webbeans-commits] Webbeans SVN: r3768 - in ri/trunk: version-matrix and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-23 14:22:11 -0400 (Wed, 23 Sep 2009)
New Revision: 3768
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/AbstractWebBeansELResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/ELCreationalContextStack.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansMethodExpression.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansValueExpression.java
ri/trunk/version-matrix/pom.xml
Log:
support the situation where the ELContextListener isn't registered
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/AbstractWebBeansELResolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/el/AbstractWebBeansELResolver.java 2009-09-23 18:21:14 UTC (rev 3767)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/el/AbstractWebBeansELResolver.java 2009-09-23 18:22:11 UTC (rev 3768)
@@ -16,18 +16,17 @@
*/
package org.jboss.webbeans.el;
+import static org.jboss.webbeans.el.ELCreationalContextStack.getCreationalContextStore;
+
import java.beans.FeatureDescriptor;
import java.util.Iterator;
import java.util.concurrent.Callable;
import javax.el.ELContext;
import javax.el.ELResolver;
-import javax.enterprise.context.spi.Contextual;
-import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.Container;
/**
* An EL-resolver against the named beans
@@ -37,18 +36,6 @@
public abstract class AbstractWebBeansELResolver extends ELResolver
{
- private static final Contextual<?> CONTEXTUAL = new Contextual<Object>()
- {
-
- public Object create(CreationalContext<Object> creationalContext)
- {
- return null;
- }
-
- public void destroy(Object instance, CreationalContext<Object> creationalContext) {}
-
- };
-
protected abstract BeanManagerImpl getManager(ELContext context);
@Override
@@ -151,25 +138,6 @@
public void setValue(ELContext context, Object base, Object property, Object value)
{
}
-
- private static ELCreationalContextStack getCreationalContextStore(ELContext context)
- {
- Object o = context.getContext(ELCreationalContextStack.class);
-
- if (!(o instanceof ELCreationalContextStack))
- {
- ELCreationalContextStack store = ELCreationalContextStack.addToContext(context);
- o = store;
- }
- ELCreationalContextStack store = (ELCreationalContextStack) o;
- if (store.isEmpty())
- {
- // TODO need to use correct manager for module
- ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
- store.push(creationalContext);
- }
- return (ELCreationalContextStack) o;
- }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/ELCreationalContextStack.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/el/ELCreationalContextStack.java 2009-09-23 18:21:14 UTC (rev 3767)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/el/ELCreationalContextStack.java 2009-09-23 18:22:11 UTC (rev 3768)
@@ -3,10 +3,27 @@
import java.util.Stack;
import javax.el.ELContext;
+import javax.enterprise.context.spi.Contextual;
+import javax.enterprise.context.spi.CreationalContext;
+import org.jboss.webbeans.Container;
+
class ELCreationalContextStack extends Stack<ELCreationalContext<?>>
{
+
+ private static final Contextual<?> CONTEXTUAL = new Contextual<Object>()
+ {
+
+ public Object create(CreationalContext<Object> creationalContext)
+ {
+ return null;
+ }
+
+ public void destroy(Object instance, CreationalContext<Object> creationalContext) {}
+
+ };
+
private static final long serialVersionUID = -57142365866995726L;
public static ELCreationalContextStack addToContext(ELContext context)
@@ -16,4 +33,24 @@
return store;
}
+
+ public static ELCreationalContextStack getCreationalContextStore(ELContext context)
+ {
+ Object o = context.getContext(ELCreationalContextStack.class);
+
+ if (!(o instanceof ELCreationalContextStack))
+ {
+ ELCreationalContextStack store = ELCreationalContextStack.addToContext(context);
+ o = store;
+ }
+ ELCreationalContextStack store = (ELCreationalContextStack) o;
+ if (store.isEmpty())
+ {
+ // TODO need to use correct manager for module
+ ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
+ store.push(creationalContext);
+ }
+ return (ELCreationalContextStack) o;
+ }
+
}
\ No newline at end of file
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansMethodExpression.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansMethodExpression.java 2009-09-23 18:21:14 UTC (rev 3767)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansMethodExpression.java 2009-09-23 18:22:11 UTC (rev 3768)
@@ -16,6 +16,8 @@
*/
package org.jboss.webbeans.el;
+import static org.jboss.webbeans.el.ELCreationalContextStack.getCreationalContextStore;
+
import javax.el.ELContext;
import javax.el.MethodExpression;
import javax.el.MethodInfo;
@@ -92,15 +94,5 @@
creationalContext.release();
}
}
-
- private ELCreationalContextStack getCreationalContextStore(ELContext context)
- {
- Object o = context.getContext(ELCreationalContextStack.class);
- if (!(o instanceof ELCreationalContextStack))
- {
- throw new IllegalStateException("Something went wrong with the ELContext, expecting a CreationalContextStore to be present, but instead got " + o);
- }
- return (ELCreationalContextStack) o;
- }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansValueExpression.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansValueExpression.java 2009-09-23 18:21:14 UTC (rev 3767)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansValueExpression.java 2009-09-23 18:22:11 UTC (rev 3768)
@@ -16,6 +16,8 @@
*/
package org.jboss.webbeans.el;
+import static org.jboss.webbeans.el.ELCreationalContextStack.getCreationalContextStore;
+
import javax.el.ELContext;
import javax.el.ValueExpression;
import javax.enterprise.context.spi.Contextual;
@@ -109,15 +111,5 @@
creationalContext.release();
}
}
-
- private ELCreationalContextStack getCreationalContextStore(ELContext context)
- {
- Object o = context.getContext(ELCreationalContextStack.class);
- if (!(o instanceof ELCreationalContextStack))
- {
- throw new IllegalStateException("Something went wrong with the ELContext, expecting a CreationalContextStore to be present, but instead got " + o);
- }
- return (ELCreationalContextStack) o;
- }
}
Modified: ri/trunk/version-matrix/pom.xml
===================================================================
--- ri/trunk/version-matrix/pom.xml 2009-09-23 18:21:14 UTC (rev 3767)
+++ ri/trunk/version-matrix/pom.xml 2009-09-23 18:22:11 UTC (rev 3768)
@@ -544,6 +544,11 @@
<version>1.0-beta-3</version>
</plugin>
<plugin>
+ <groupId>com.pyx4j</groupId>
+ <artifactId>maven-junction-plugin</artifactId>
+ <version>1.0.3</version>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0-beta-1</version>
15 years, 2 months
[webbeans-commits] Webbeans SVN: r3767 - in extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet: jsf and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-23 14:21:14 -0400 (Wed, 23 Sep 2009)
New Revision: 3767
Modified:
extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/Listener.java
extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/jsf/WebBeansApplication.java
Log:
store bean manager in servlet context under better name, don't assume JSP is available
Modified: extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/Listener.java
===================================================================
--- extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/Listener.java 2009-09-23 18:20:18 UTC (rev 3766)
+++ extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/Listener.java 2009-09-23 18:21:14 UTC (rev 3767)
@@ -17,6 +17,7 @@
package org.jboss.webbeans.environment.servlet;
import javax.el.ELContextListener;
+import javax.enterprise.inject.spi.BeanManager;
import javax.servlet.ServletContextEvent;
import javax.servlet.jsp.JspApplicationContext;
import javax.servlet.jsp.JspFactory;
@@ -133,19 +134,22 @@
}
// Push the manager into the servlet context so we can access in JSF
- sce.getServletContext().setAttribute(WebBeansManager.class.getName(), manager);
+ sce.getServletContext().setAttribute(BeanManager.class.getName(), manager);
- JspApplicationContext jspApplicationContext = JspFactory.getDefaultFactory().getJspApplicationContext(sce.getServletContext());
+ if (JspFactory.getDefaultFactory() != null)
+ {
+ JspApplicationContext jspApplicationContext = JspFactory.getDefaultFactory().getJspApplicationContext(sce.getServletContext());
+
+ // Register the ELResolver with JSP
+ jspApplicationContext.addELResolver(manager.getELResolver());
+
+ // Register ELContextListener with JSP
+ jspApplicationContext.addELContextListener(Reflections.<ELContextListener>newInstance("org.jboss.webbeans.el.WebBeansELContextListener"));
+
+ // Push the wrapped expression factory into the servlet context so that Tomcat or Jetty can hook it in using a container code
+ sce.getServletContext().setAttribute(EXPRESSION_FACTORY_NAME, manager.wrapExpressionFactory(jspApplicationContext.getExpressionFactory()));
+ }
- // Register the ELResolver with JSP
- jspApplicationContext.addELResolver(manager.getELResolver());
-
- // Register ELContextListener with JSP
- jspApplicationContext.addELContextListener(Reflections.<ELContextListener>newInstance("org.jboss.webbeans.el.WebBeansELContextListener"));
-
- // Push the wrapped expression factory into the servlet context so that Tomcat or Jetty can hook it in using a container code
- sce.getServletContext().setAttribute(EXPRESSION_FACTORY_NAME, manager.wrapExpressionFactory(jspApplicationContext.getExpressionFactory()));
-
bootstrap.deployBeans().validateBeans().endInitialization();
super.contextInitialized(sce);
}
Modified: extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/jsf/WebBeansApplication.java
===================================================================
--- extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/jsf/WebBeansApplication.java 2009-09-23 18:20:18 UTC (rev 3766)
+++ extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/jsf/WebBeansApplication.java 2009-09-23 18:21:14 UTC (rev 3767)
@@ -87,11 +87,11 @@
throw new IllegalStateException("Not in a servlet environment!");
}
ServletContext ctx = (ServletContext) facesContext.getExternalContext().getContext();
- if (ctx.getAttribute(WebBeansManager.class.getName()) == null)
+ if (ctx.getAttribute(BeanManager.class.getName()) == null)
{
throw new IllegalStateException("BeanManager has not been pushed into the ServletContext");
}
- return (WebBeansManager) ctx.getAttribute(WebBeansManager.class.getName());
+ return (WebBeansManager) ctx.getAttribute(BeanManager.class.getName());
}
}
15 years, 2 months
[webbeans-commits] Webbeans SVN: r3766 - in examples/trunk/jsf: numberguess and 4 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-23 14:20:18 -0400 (Wed, 23 Sep 2009)
New Revision: 3766
Added:
examples/trunk/jsf/numberguess/src/main/webapp-gae/
examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/
examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/appengine-web.xml
examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/faces-config.xml
examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/jetty-env.xml
examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/logging.properties
examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/web.xml
Removed:
examples/trunk/jsf/gae/
Modified:
examples/trunk/jsf/numberguess/
examples/trunk/jsf/numberguess/pom.xml
examples/trunk/jsf/numberguess/src/main/webapp/WEB-INF/
Log:
merge gae support into numberguess
Property changes on: examples/trunk/jsf/numberguess
___________________________________________________________________
Name: svn:ignore
- .classpath
target
.project
.settings
pom.xml.releaseBackup
+
.classpath
target
.project
.settings
pom.xml.releaseBackup
war
Modified: examples/trunk/jsf/numberguess/pom.xml
===================================================================
--- examples/trunk/jsf/numberguess/pom.xml 2009-09-23 15:37:17 UTC (rev 3765)
+++ examples/trunk/jsf/numberguess/pom.xml 2009-09-23 18:20:18 UTC (rev 3766)
@@ -195,6 +195,96 @@
</profile>
<profile>
+ <id>gae</id>
+ <dependencies>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_12</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <scope>runtime</scope>
+ <version>1.2_12</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans.servlet</groupId>
+ <artifactId>webbeans-servlet</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>src/main/webapp-gae</directory>
+ <filtering>false</filtering>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>com.pyx4j</groupId>
+ <artifactId>maven-junction-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>initialize</phase>
+ <goals>
+ <goal>link</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <classpathContainers>
+ <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
+ <classpathContainer>com.google.appengine.eclipse.core.GAE_CONTAINER</classpathContainer>
+ </classpathContainers>
+ <additionalBuildcommands>
+ <buildcommand>com.google.appengine.eclipse.core.projectValidator</buildcommand>
+ </additionalBuildcommands>
+ <additionalProjectnatures>
+ <projectnature>com.google.appengine.eclipse.core.gaeNature</projectnature>
+ </additionalProjectnatures>
+ <additionalConfig>
+ <file>
+ <name>.settings/com.google.appengine.eclipse.core.prefs</name>
+ <content>
+<![CDATA[#Wed Sep 23 16:29:55 BST 2009
+eclipse.preferences.version=1
+filesCopiedToWebInfLib=appengine-api-1.0-sdk-1.2.5.jar|appengine-api-labs-1.2.5.jar|datanucleus-appengine-1.0.3.jar|datanucleus-core-1.1.5.jar|datanucleus-jpa-1.1.5.jar|geronimo-jpa_3.0_spec-1.1.1.jar|geronimo-jta_1.1_spec-1.1.1.jar|jdo2-api-2.3-eb.jar]]>
+ </content>
+ </file>
+ </additionalConfig>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
<id>jetty-ide</id>
<dependencies>
@@ -276,8 +366,29 @@
<warSourceExcludes>WEB-INF/classes/**,WEB-INF/lib/**</warSourceExcludes>
</configuration>
</plugin>
-
<plugin>
+ <groupId>com.pyx4j</groupId>
+ <artifactId>maven-junction-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unlink</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>unlink</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <links>
+ <!-- link src/main/webapp -> war/ for GAE Eclipse plugin -->
+ <link>
+ <dst>${basedir}/war</dst>
+ <src>${basedir}/src/main/webapp</src>
+ </link>
+ </links>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<failOnError>false</failOnError>
Property changes on: examples/trunk/jsf/numberguess/src/main/webapp/WEB-INF
___________________________________________________________________
Name: svn:ignore
- classes
lib
jetty-env.xml
web.xml
+ classes
lib
jetty-env.xml
web.xml
appengine-web.xml
logging.properties
Added: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/appengine-web.xml
===================================================================
--- examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/appengine-web.xml (rev 0)
+++ examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/appengine-web.xml 2009-09-23 18:20:18 UTC (rev 3766)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
+ <application>webbeans-numberguess</application>
+ <version>1</version>
+
+ <!-- Configure java.util.logging -->
+ <system-properties>
+ <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
+ </system-properties>
+
+ <sessions-enabled>true</sessions-enabled>
+
+</appengine-web-app>
\ No newline at end of file
Property changes on: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/appengine-web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/faces-config.xml
===================================================================
--- examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/faces-config.xml (rev 0)
+++ examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/faces-config.xml 2009-09-23 18:20:18 UTC (rev 3766)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<faces-config version="1.2"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+
+</faces-config>
Property changes on: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/jetty-env.xml
===================================================================
--- examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/jetty-env.xml (rev 0)
+++ examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/jetty-env.xml 2009-09-23 18:20:18 UTC (rev 3766)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
+ "http://jetty.mortbay.org/configure.dtd">
+<Configure id="webAppCtx" class="org.mortbay.jetty.webapp.WebAppContext">
+ <New id="appManager" class="org.mortbay.jetty.plus.naming.Resource">
+ <Arg><Ref id="webAppCtx"/></Arg>
+ <Arg>app/Manager</Arg>
+ <Arg>
+ <New class="javax.naming.Reference">
+ <Arg>javax.inject.manager.Manager</Arg>
+ <Arg>org.jboss.webbeans.resources.ManagerObjectFactory</Arg>
+ <Arg/>
+ </New>
+ </Arg>
+ </New>
+</Configure>
Property changes on: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/jetty-env.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/logging.properties
===================================================================
--- examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/logging.properties (rev 0)
+++ examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/logging.properties 2009-09-23 18:20:18 UTC (rev 3766)
@@ -0,0 +1,28 @@
+# A default java.util.logging configuration.
+# (All App Engine logging is through java.util.logging by default).
+#
+# To use this configuration, copy it into your application's WEB-INF
+# folder and add the following to your appengine-web.xml:
+#
+# <system-properties>
+# <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
+# </system-properties>
+#
+
+# Set the default logging level for all loggers to WARNING
+.level = DEBUG
+
+# Set the default logging level for ORM, specifically, to WARNING
+DataNucleus.JDO.level=WARNING
+DataNucleus.Persistence.level=WARNING
+DataNucleus.Cache.level=WARNING
+DataNucleus.MetaData.level=WARNING
+DataNucleus.General.level=WARNING
+DataNucleus.Utility.level=WARNING
+DataNucleus.Transaction.level=WARNING
+DataNucleus.Datastore.level=WARNING
+DataNucleus.ClassLoading.level=WARNING
+DataNucleus.Plugin.level=WARNING
+DataNucleus.ValueGeneration.level=WARNING
+DataNucleus.Enhancer.level=WARNING
+DataNucleus.SchemaTool.level=WARNING
Property changes on: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/logging.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/web.xml
===================================================================
--- examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/web.xml (rev 0)
+++ examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/web.xml 2009-09-23 18:20:18 UTC (rev 3766)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+
+ <display-name>Web Beans Numberguess example</display-name>
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <!-- GAE doesn't work with the Mojarra default startup -->
+ <context-param>
+ <param-name>com.sun.faces.enableMultiThreadedStartup</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <!-- Specify the expression factory manually, JSF can't find it from JSP in GAE -->
+ <context-param>
+ <param-name>com.sun.faces.expressionFactory</param-name>
+ <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.jboss.webbeans.environment.servlet.Listener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+ <resource-env-ref>
+ <description>Object factory for the CDI Bean Manager</description>
+ <resource-env-ref-name>BeanManager</resource-env-ref-name>
+ <resource-env-ref-type>javax.enterprise.inject.spi.BeanManager</resource-env-ref-type>
+ </resource-env-ref>
+
+</web-app>
Property changes on: examples/trunk/jsf/numberguess/src/main/webapp-gae/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 2 months
[webbeans-commits] Webbeans SVN: r3765 - in examples/trunk/jsf/numberguess: src and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-23 11:37:17 -0400 (Wed, 23 Sep 2009)
New Revision: 3765
Added:
examples/trunk/jsf/numberguess/src/jetty/
examples/trunk/jsf/numberguess/src/jetty/java/log4j.properties
Removed:
examples/trunk/jsf/numberguess/jetty/
Log:
a few jetty changes
Copied: examples/trunk/jsf/numberguess/src/jetty (from rev 3762, examples/trunk/jsf/numberguess/jetty)
Added: examples/trunk/jsf/numberguess/src/jetty/java/log4j.properties
===================================================================
--- examples/trunk/jsf/numberguess/src/jetty/java/log4j.properties (rev 0)
+++ examples/trunk/jsf/numberguess/src/jetty/java/log4j.properties 2009-09-23 15:37:17 UTC (rev 3765)
@@ -0,0 +1,10 @@
+log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n
+
+
+log4j.rootLogger=INFO,Stdout
+
+log4j.logger.org.jboss.webbeans=DEBUG
+
+
Property changes on: examples/trunk/jsf/numberguess/src/jetty/java/log4j.properties
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
15 years, 2 months