[webbeans-commits] Webbeans SVN: r2248 - doc/trunk/reference/en-US.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-28 12:41:24 -0400 (Sat, 28 Mar 2009)
New Revision: 2248
Added:
doc/trunk/reference/en-US/environments.xml
doc/trunk/reference/en-US/extensions.xml
doc/trunk/reference/en-US/part5.xml
Modified:
doc/trunk/reference/en-US/Author_Group.xml
doc/trunk/reference/en-US/master.xml
doc/trunk/reference/en-US/ri.xml
Log:
Improve docs for WB
Modified: doc/trunk/reference/en-US/Author_Group.xml
===================================================================
--- doc/trunk/reference/en-US/Author_Group.xml 2009-03-28 15:32:35 UTC (rev 2247)
+++ doc/trunk/reference/en-US/Author_Group.xml 2009-03-28 16:41:24 UTC (rev 2248)
@@ -18,6 +18,10 @@
<orgname>Red Hat Middleware LLC</orgname>
</affiliation>
</author>
+ <author>
+ <firstname>David</firstname>
+ <surname>Allen</surname>
+ </author>
<othercredit>
<firstname>Nicola</firstname>
<surname>Benaglia</surname>
Added: doc/trunk/reference/en-US/environments.xml
===================================================================
--- doc/trunk/reference/en-US/environments.xml (rev 0)
+++ doc/trunk/reference/en-US/environments.xml 2009-03-28 16:41:24 UTC (rev 2248)
@@ -0,0 +1,168 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ ]>
+
+<chapter id="environments">
+ <title>Application Servers and environments supported by Web Beans</title>
+
+ <section>
+ <title>Using Web Beans with JBoss AS</title>
+
+ <para>
+ No special configuration of your application, beyond adding either
+ <literal>META-INF/beans.xml</literal> or
+ <literal>WEB-INF/beans.xml</literal> is needed.
+ </para>
+
+ <para>
+ If you are using JBoss AS 5.0.1.GA then you'll need to install Web
+ Beans as an extra. First we need to tell Web Beans where JBoss is located. Edit
+ <literal>jboss-as/build.properties</literal> and set the
+ <literal>jboss.home</literal> property. For example:
+ </para>
+
+ <programlisting>jboss.home=/Applications/jboss-5.0.1.GA</programlisting>
+
+ <para>
+ Now we can install Web Beans:
+ </para>
+
+ <programlisting>$ cd webbeans-$VERSION/jboss-as
+$ ant update</programlisting>
+
+ <note>
+ <para>
+ A new deployer,
+ <literal>webbeans.deployer</literal> is added to JBoss AS. This adds supports for
+ JSR-299 deployments to JBoss AS, and allows Web Beans to query the
+ EJB3 container and discover which EJBs are installed in your
+ application.
+ </para>
+ </note>
+
+ <para>
+ Web Beans is built into all releases of JBoss AS from 5.1 onwards.
+ </para>
+
+ </section>
+
+ <section>
+ <title>Glassfish</title>
+
+ <para>TODO</para>
+ </section>
+
+ <section>
+ <title>Tomcat</title>
+
+ <para>Web Beans can be used in Tomcat 6.0.</para>
+
+ <note>
+ <para>
+ Web Beans doesn't support deploying session beans, injection using
+ <literal>@EJB</literal>, <literal>@Resource</literal>, or
+ <literal>@PersistenceContext</literal> or using transactional events
+ on Tomcat.
+ </para>
+ </note>
+
+ <para>
+ Web Beans should be used as a web application library in Tomcat. You
+ should place <literal>webbeans-tomcat.jar</literal> in
+ <literal>WEB-INF/lib</literal>. <literal>webbeans-tomcat.jar</literal>
+ is an "uber-jar" provided for your convenience. Instead, you could use
+ it's component jars:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>jsr299-api.jar</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>webbeans-api.jar</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>webbeans-spi.jar</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>webbeans-core.jar</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>webbeans-logging.jar</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>webbeans-tomcat-int.jar</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>javassist.jar</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>dom4j.jar</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ You also need to explicitly specify the Tomcat servlet listener (used to
+ boot Web Beans, and control it's interaction with requests) in
+ <literal>web.xml</literal>:
+ </para>
+
+ <programlisting><![CDATA[<listener>
+ <listener-class>org.jboss.webbeans.environment.tomcat.Listener</listener-class>
+</listener>]]></programlisting>
+
+ <para>
+ Tomcat has a read-only JNDI, so Web Beans can't automatically bind the
+ Manager. To bind the Manager into JNDI, you should add the following to
+ your <literal>META-INF/context.xml</literal>:
+ </para>
+
+ <programlisting><![CDATA[<Resource name="app/Manager"
+ auth="Container"
+ type="javax.inject.manager.Manager"
+ factory="org.jboss.webbeans.resources.ManagerObjectFactory"/>
+]]></programlisting>
+
+ <para>
+ and make it available to your deployment by adding this to
+ <literal>web.xml</literal>:
+ </para>
+
+ <programlisting><![CDATA[<resource-env-ref>
+ <resource-env-ref-name>
+ app/Manager
+ </resource-env-ref-name>
+ <resource-env-ref-type>
+ javax.inject.manager.Manager
+ </resource-env-ref-type>
+</resource-env-ref>]]></programlisting>
+
+ <para>
+ Tomcat doesn't only allows you to bind entries to
+ <literal>java:comp/env</literal>, so the Manager will be available at
+ <literal>java:comp/env/app/Manager</literal>
+ </para>
+
+ </section>
+
+ <section>
+ <title>Java SE</title>
+
+ <para>TODO</para>
+ </section>
+
+</chapter>
\ No newline at end of file
Property changes on: doc/trunk/reference/en-US/environments.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: doc/trunk/reference/en-US/extensions.xml
===================================================================
--- doc/trunk/reference/en-US/extensions.xml (rev 0)
+++ doc/trunk/reference/en-US/extensions.xml 2009-03-28 16:41:24 UTC (rev 2248)
@@ -0,0 +1,29 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ ]>
+
+<chapter id="extensions">
+ <title>JSR-299 extensions available as part of Web Beans</title>
+
+ <important>
+ <para>
+ These modules are usable on any JSR-299 implementation, not just Web
+ Beans!
+ </para>
+ </important>
+
+
+ <section>
+ <title>Web Beans Logger</title>
+
+ <para>
+ TODO
+ </para>
+
+ </section>
+
+ <section>
+ <title>XSD Generator for JSR-299 XML deployment descriptors</title>
+
+ <para>TODO</para>
+ </section>
+
+</chapter>
\ No newline at end of file
Property changes on: doc/trunk/reference/en-US/extensions.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: doc/trunk/reference/en-US/master.xml
===================================================================
--- doc/trunk/reference/en-US/master.xml 2009-03-28 15:32:35 UTC (rev 2247)
+++ doc/trunk/reference/en-US/master.xml 2009-03-28 16:41:24 UTC (rev 2248)
@@ -69,8 +69,20 @@
<xi:include href="extend.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</part>
+
+ <xi:include href="next.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <part>
+ <title>Web Beans Reference</title>
+
+ <xi:include href="part5.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="environments.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="extensions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ </part>
- <xi:include href="next.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
<xi:include href="ri-spi.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>
Added: doc/trunk/reference/en-US/part5.xml
===================================================================
--- doc/trunk/reference/en-US/part5.xml (rev 0)
+++ doc/trunk/reference/en-US/part5.xml 2009-03-28 16:41:24 UTC (rev 2248)
@@ -0,0 +1,23 @@
+<!DOCTYPE partintro PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ ]>
+
+<partintro>
+
+ <para>
+ Web Beans is the reference implementation of JSR-299, and is used by JBoss
+ AS and Glassfish to provide JSR-299 services for Java Enterprise Edition
+ applications. Web Beans also goes beyond the environments and APIs defined
+ by the JSR-299 specification and provides support for a number of other
+ environments (such as a servlet container such as Tomcat, or Java SE) and
+ additional APIs and modules (such as logging, XSD generation for the
+ JSR-299 XML deployment descriptors).
+ </para>
+
+ <para>
+ If you want to get started quickly using Web Beans with JBoss AS or Tomcat
+ and experiment with one of the examples, take a look at <xref linkend="ri"/>.
+ Otherwise read on for a exhaustive discussion of using Web Beans in all
+ the environments and application servers it supports, as well the Web Beans
+ extensions.
+ </para>
+
+</partintro>
\ No newline at end of file
Property changes on: doc/trunk/reference/en-US/part5.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: doc/trunk/reference/en-US/ri.xml
===================================================================
--- doc/trunk/reference/en-US/ri.xml 2009-03-28 15:32:35 UTC (rev 2247)
+++ doc/trunk/reference/en-US/ri.xml 2009-03-28 16:41:24 UTC (rev 2248)
@@ -1,172 +1,265 @@
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ ]>
<chapter id="ri">
- <title>The Web Beans Reference Implementation</title>
+ <title>Web Beans, the Reference Implementation of JSR-299</title>
<para>
- The Web Beans Reference Implementation is being developed at
+ The Web Beans is being developed at
<ulink url="http://seamframework.org/WebBeans">the Seam project</ulink>.
You can download the latest developer release of Web Beans from the
<ulink url="http://seamframework.org/Download">the downloads page</ulink>.
</para>
<para>
- The Web Beans RI comes with a two deployable example applications:
+ Web Beans comes with a two deployable example applications:
<literal>webbeans-numberguess</literal>, a war example, containing only
simple beans, and <literal>webbeans-translator</literal> an ear example,
- containing enterprise beans. To run the examples you'll need the following:
+ containing enterprise beans. There are also two variations on the
+ numberguess example, the tomcat example (suitable for deployment to
+ Tomcat) and the jsf2 example, which you can use if you are running JSF2.
+ To run the examples you'll need the following:
</para>
<itemizedlist>
<listitem>
- <para>the latest release of the Web Beans RI,</para>
+ <para>the latest release of Web Beans,</para>
</listitem>
<listitem>
- <para>JBoss AS 5.0.1.GA, and</para>
+ <para>JBoss AS 5.0.1.GA, or</para>
</listitem>
<listitem>
+ <para>Apache Tomcat 6.0.x, and</para>
+ </listitem>
+ <listitem>
<para>Ant 1.7.0.</para>
</listitem>
</itemizedlist>
- <para>
- Currently, the Web Beans RI only runs on JBoss Application Server 5.
- You'll need to download JBoss AS 5.0.1.GA from
- <ulink url="http://www.jboss.org/jbossas/downloads/">jboss.org</ulink>,
- and unzip it. For example:
- </para>
+ <section>
+ <title>Using JBoss AS 5</title>
- <programlisting><![CDATA[$ cd /Applications
+ <para>
+ You'll need to download JBoss AS 5.0.1.GA from
+ <ulink url="http://www.jboss.org/jbossas/downloads/">jboss.org</ulink>,
+ and unzip it. For example:
+ </para>
+
+ <programlisting><![CDATA[$ cd /Applications
$ unzip ~/jboss-5.0.1.GA.zip]]></programlisting>
- <para>
- Next, download the Web Beans RI from
- <ulink url="http://seamframework.org/Download">seamframework.org</ulink>,
- and unzip it. For example
- </para>
-
- <programlisting><![CDATA[$ cd ~/
+ <para>
+ Next, download Web Beans from
+ <ulink url="http://seamframework.org/Download">seamframework.org</ulink>,
+ and unzip it. For example
+ </para>
+
+ <programlisting><![CDATA[$ cd ~/
$ unzip ~/webbeans-$VERSION.zip]]></programlisting>
- <para>
- Next, we need to tell Web Beans where JBoss is located. Edit
- <literal>jboss-as/build.properties</literal> and set the
- <literal>jboss.home</literal> property. For example:
- </para>
-
- <programlisting>jboss.home=/Applications/jboss-5.0.1.GA</programlisting>
-
- <note>
<para>
- A new deployer,
- <literal>webbeans.deployer</literal> is added to JBoss AS. This adds supports for
- Web Bean archives to JBoss AS, and allows the Web Beans RI to query the
- EJB3 container and discover which EJBs are installed in your
- application.
+ Next, we need to tell Web Beans where JBoss is located. Edit
+ <literal>jboss-as/build.properties</literal> and set the
+ <literal>jboss.home</literal> property. For example:
</para>
+ <programlisting>jboss.home=/Applications/jboss-5.0.1.GA</programlisting>
+
<para>
- Web Beans is bundled with JBoss AS 5.1 and above.
+ To install Web Beans, you'll need Ant 1.7.0 installed, and the
+ <literal>ANT_HOME</literal> environment variable set. For example:
</para>
- </note>
-
- <para>
- To install Web Beans, you'll need Ant 1.7.0 installed, and the
- <literal>ANT_HOME</literal> environment variable set. For example:
- </para>
-
- <programlisting>$ unzip apache-ant-1.7.0.zip
+
+ <programlisting>$ unzip apache-ant-1.7.0.zip
$ export ANT_HOME=~/apache-ant-1.7.0</programlisting>
- <para>
- Then, you can install the update. The update script will use Maven to
- download Web Beans automatically.
- </para>
-
- <programlisting>$ cd webbeans-$VERSION/jboss-as
+ <para>
+ Then, you can install the update. The update script will use Maven to
+ download Web Beans automatically.
+ </para>
+
+ <programlisting>$ cd webbeans-$VERSION/jboss-as
$ ant update</programlisting>
- <para>
- Now, you're ready to deploy your first example!
- </para>
+ <para>
+ Now, you're ready to deploy your first example!
+ </para>
+
+ <tip>
+ <para>
+ The build scripts for the examples offer a number of targets for
+ JBoss AS, these are:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>ant restart</literal> - deploy the example in exploded
+ format
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant explode</literal> - update an exploded example, without
+ restarting the deployment
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant deploy</literal> - deploy the example in compressed jar format
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant undeploy</literal> - remove the example from the server
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant clean</literal> - clean the example
+ </para>
+ </listitem>
+ </itemizedlist>
+ </tip>
- <tip>
<para>
- The build scripts for the examples offer a number of targets, these
- are:
+ To deploy the numberguess example:
</para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>ant restart</literal> - deploy the example in exploded
- format
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ant explode</literal> - update an exploded example, without
- restarting the deployment
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ant deploy</literal> - deploy the example in compressed jar format
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ant undeploy</literal> - remove the example from the server
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ant clean</literal> - clean the example
- </para>
- </listitem>
- </itemizedlist>
- </tip>
-
- <para>
- To deploy the numberguess example:
- </para>
-
- <programlisting>$ cd examples/numberguess
+
+ <programlisting>$ cd examples/numberguess
ant deploy</programlisting>
- <para>
- Start JBoss AS:
- </para>
+ <para>
+ Start JBoss AS:
+ </para>
+
+ <programlisting>$ /Application/jboss-5.0.0.GA/bin/run.sh</programlisting>
+
+ <tip>
+ <para>
+ If you use Windows, use the <literal>run.bat</literal>script.
+ </para>
+ </tip>
- <programlisting>$ /Application/jboss-5.0.0.GA/bin/run.sh</programlisting>
+ <para>
+ Wait for the application to deploy, and enjoy hours of fun at
+ <ulink url="http://localhost:8080/webbeans-numberguess" />!
+ </para>
+
+ <para>
+ Web Beans includes a second simple example that will translate your text
+ into Latin. The numberguess example is a war example, and uses only simple
+ beans; the translator example is an ear example, and includes enterprise
+ beans, packaged in an EJB module. To try it out:
+ </para>
- <tip>
+ <programlisting>$ cd examples/translator
+ant deploy</programlisting>
+
<para>
- If you use Windows, use the <literal>run.bat</literal>script.
+ Wait for the application to deploy, and visit
+ <ulink url="http://localhost:8080/webbeans-translator" />!
</para>
- </tip>
+
+ </section>
+
+ <section>
+ <title>Using Apache Tomcat 6.0</title>
+
+ <para>
+ You'll need to download Tomcat 6.0.18 or later from
+ <ulink url="http://tomcat.apache.org/download-60.cgi">tomcat.apache.org</ulink>,
+ and unzip it. For example:
+ </para>
+
+ <programlisting><![CDATA[$ cd /Applications
+$ unzip ~/apache-tomcat-6.0.18.zip]]></programlisting>
- <para>
- Wait for the application to deploy, and enjoy hours of fun at
- <ulink url="http://localhost:8080/webbeans-numberguess" />!
- </para>
+ <para>
+ Next, download Web Beans from
+ <ulink url="http://seamframework.org/Download">seamframework.org</ulink>,
+ and unzip it. For example
+ </para>
+
+ <programlisting><![CDATA[$ cd ~/
+$ unzip ~/webbeans-$VERSION.zip]]></programlisting>
+
+ <para>
+ Next, we need to tell Web Beans where Tomcat is located. Edit
+ <literal>jboss-as/build.properties</literal> and set the
+ <literal>tomcat.home</literal> property. For example:
+ </para>
+
+ <programlisting>tomcat.home=/Applications/apache-tomcat-6.0.18</programlisting>
+
+ <tip>
+ <para>
+ The build scripts for the examples offer a number of targets for
+ Tomcat, these are:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>ant tomcat.restart</literal> - deploy the example in exploded
+ format
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant tomcat.explode</literal> - update an exploded example, without
+ restarting the deployment
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant tomcat.deploy</literal> - deploy the example in compressed jar format
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant tomcat.undeploy</literal> - remove the example from the server
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant tomcat.clean</literal> - clean the example
+ </para>
+ </listitem>
+ </itemizedlist>
+ </tip>
+
+ <para>
+ To deploy the numberguess example for tomcat:
+ </para>
- <para>
- The Web Beans RI includes a second simple example that will translate your text
- into Latin. The numberguess example is a war example, and uses only simple
- beans; the translator example is an ear example, and includes enterprise
- beans, packaged in an EJB module. To try it out:
- </para>
+ <programlisting>$ cd examples/tomcat
+ant tomcat.deploy</programlisting>
- <programlisting>$ cd examples/translator
-ant deploy</programlisting>
+ <para>
+ Start Tomcat:
+ </para>
+
+ <programlisting>$ /Applications/apache-tomcat-6.0.18/bin/startup.sh</programlisting>
+
+ <tip>
+ <para>
+ If you use Windows, use the <literal>startup.bat</literal>script.
+ </para>
+ </tip>
+
+ <para>
+ Wait for the application to deploy, and enjoy hours of fun at
+ <ulink url="http://localhost:8080/webbeans-numberguess" />!
+ </para>
- <para>
- Wait for the application to deploy, and visit
- <ulink url="http://localhost:8080/webbeans-translator" />!
- </para>
+ </section>
<section>
+ <title>Using GlassFish</title>
+
+ <para>TODO</para>
+ </section>
+
+ <section>
<title>The numberguess example</title>
<para>
@@ -278,8 +371,8 @@
<note>
<para>
- Whilst this demo is a JSF demo, you can use the Web Beans RI with
- any Servlet based web framework.
+ Whilst this demo is a JSF demo, you can use Web Beans with any
+ Servlet based web framework.
</para>
</note>
@@ -549,6 +642,37 @@
}
}]]></programlisting>
+
+ <section>
+ <title>The numberguess example for Tomcat</title>
+
+ <para>
+ The numberguess for Tomcat differs in a couple of ways. Firstly,
+ Web Beans should be deployed as a Web Application library in
+ <literal>WEB-INF/lib</literal>. For your convenience we provide a
+ single jar suitable for running Web Beans on Tomcat
+ <literal>webbeans-tomcat.jar</literal>.
+ </para>
+
+ <tip>
+ <para>
+ Of course, you must also include JSF and EL, as well common
+ annotations (<literal>jsr250-api.jar</literal>) which a JEE server
+ includes by default.
+ </para>
+ </tip>
+
+ <para>
+ Secondly, we need to explicitly specify the Tomcat servlet listener
+ (used to boot Web Beans, and control it's interaction with requests)
+ in <literal>web.xml</literal>:
+ </para>
+
+ <programlisting><![CDATA[<listener>
+ <listener-class>org.jboss.webbeans.environment.tomcat.Listener</listener-class>
+</listener>]]></programlisting>
+
+ </section>
</section>
<section>
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2247 - in ri/trunk/impl/src/main/java/org/jboss/webbeans: resources and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-28 11:32:35 -0400 (Sat, 28 Mar 2009)
New Revision: 2247
Added:
ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ManagerObjectFactory.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/NamespacedResolver.java
Log:
WBX-10
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/NamespacedResolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/el/NamespacedResolver.java 2009-03-28 15:32:12 UTC (rev 2246)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/el/NamespacedResolver.java 2009-03-28 15:32:35 UTC (rev 2247)
@@ -51,7 +51,7 @@
}
catch (Exception e)
{
- throw new ExecutionException("Error resolving EL " + property);
+ throw new ExecutionException("Error resolving EL " + property, e);
}
if (!context.isPropertyResolved())
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ManagerObjectFactory.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ManagerObjectFactory.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ManagerObjectFactory.java 2009-03-28 15:32:35 UTC (rev 2247)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.resources;
+
+import java.util.Hashtable;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.spi.ObjectFactory;
+
+import org.jboss.webbeans.CurrentManager;
+
+public class ManagerObjectFactory implements ObjectFactory
+{
+
+ public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception
+ {
+ return CurrentManager.rootManager();
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/resources/ManagerObjectFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2246 - in examples/trunk/tomcat: WebContent and 4 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-28 11:32:12 -0400 (Sat, 28 Mar 2009)
New Revision: 2246
Added:
examples/trunk/tomcat/WebContent/META-INF/
examples/trunk/tomcat/WebContent/META-INF/context.xml
Removed:
examples/trunk/tomcat/src/main/resources/META-INF/
Modified:
examples/trunk/tomcat/WebContent/WEB-INF/web.xml
examples/trunk/tomcat/pom.xml
examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
Log:
WBX-10
Copied: examples/trunk/tomcat/WebContent/META-INF (from rev 2237, examples/trunk/tomcat/src/main/resources/META-INF)
Added: examples/trunk/tomcat/WebContent/META-INF/context.xml
===================================================================
--- examples/trunk/tomcat/WebContent/META-INF/context.xml (rev 0)
+++ examples/trunk/tomcat/WebContent/META-INF/context.xml 2009-03-28 15:32:12 UTC (rev 2246)
@@ -0,0 +1,5 @@
+<Context>
+ <Resource name="app/Manager" auth="Container"
+ type="javax.inject.manager.Manager"
+ factory="org.jboss.webbeans.resources.ManagerObjectFactory"/>
+</Context>
Property changes on: examples/trunk/tomcat/WebContent/META-INF/context.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: examples/trunk/tomcat/WebContent/WEB-INF/web.xml
===================================================================
--- examples/trunk/tomcat/WebContent/WEB-INF/web.xml 2009-03-28 14:54:55 UTC (rev 2245)
+++ examples/trunk/tomcat/WebContent/WEB-INF/web.xml 2009-03-28 15:32:12 UTC (rev 2246)
@@ -33,4 +33,17 @@
<listener-class>org.jboss.webbeans.environment.tomcat.Listener</listener-class>
</listener>
+ <resource-env-ref>
+ <description>
+ Object factory for the JCDI Manager
+ </description>
+ <resource-env-ref-name>
+ app/Manager
+ </resource-env-ref-name>
+ <resource-env-ref-type>
+ javax.inject.manager.Manager
+ </resource-env-ref-type>
+ </resource-env-ref>
+
+
</web-app>
Modified: examples/trunk/tomcat/pom.xml
===================================================================
--- examples/trunk/tomcat/pom.xml 2009-03-28 14:54:55 UTC (rev 2245)
+++ examples/trunk/tomcat/pom.xml 2009-03-28 15:32:12 UTC (rev 2246)
@@ -40,7 +40,6 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <scope>runtime</scope>
</dependency>
<dependency>
Modified: examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
===================================================================
--- examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-03-28 14:54:55 UTC (rev 2245)
+++ examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-03-28 15:32:12 UTC (rev 2246)
@@ -13,6 +13,7 @@
import javax.inject.AnnotationLiteral;
import javax.inject.Current;
import javax.inject.manager.Manager;
+import javax.naming.NamingException;
@Named
@SessionScoped
@@ -31,9 +32,7 @@
@Current Manager manager;
- public Game()
- {
- }
+ public Game() throws NamingException {}
public int getNumber()
{
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2245 - ri/trunk/impl.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-28 10:54:55 -0400 (Sat, 28 Mar 2009)
New Revision: 2245
Modified:
ri/trunk/impl/pom.xml
Log:
ws
Modified: ri/trunk/impl/pom.xml
===================================================================
--- ri/trunk/impl/pom.xml 2009-03-28 14:54:36 UTC (rev 2244)
+++ ri/trunk/impl/pom.xml 2009-03-28 14:54:55 UTC (rev 2245)
@@ -84,21 +84,25 @@
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</dependency>
+
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<optional>true</optional>
</dependency>
+
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<optional>true</optional>
</dependency>
+
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-ri</artifactId>
<optional>true</optional>
</dependency>
+
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2244 - examples/trunk/numberguess/WebContent.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-28 10:54:36 -0400 (Sat, 28 Mar 2009)
New Revision: 2244
Modified:
examples/trunk/numberguess/WebContent/home.xhtml
Log:
WBRI-80, thanks to Brandon Blatnick
Modified: examples/trunk/numberguess/WebContent/home.xhtml
===================================================================
--- examples/trunk/numberguess/WebContent/home.xhtml 2009-03-28 14:54:09 UTC (rev 2243)
+++ examples/trunk/numberguess/WebContent/home.xhtml 2009-03-28 14:54:36 UTC (rev 2244)
@@ -20,9 +20,9 @@
<div>
Your guess:
- <h:inputText id="inputGuess" value="#{game.guess}" required="true" size="3" disabled="#{game.number eq game.guess}">
- <f:validateLongRange maximum="#{game.biggest}" minimum="#{game.smallest}"/>
- </h:inputText>
+ <h:inputText id="inputGuess" value="#{game.guess}" required="true" size="3" disabled="#{game.number eq game.guess}"
+ validator="#{game.validateNumberRange}">
+ </h:inputText>
<h:commandButton id="GuessButton" value="Guess" action="#{game.check}" disabled="#{game.number eq game.guess}"/>
</div>
<div>
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2243 - in examples/trunk: jsf2/src/main/java/org/jboss/webbeans/examples/numberguess and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-28 10:54:09 -0400 (Sat, 28 Mar 2009)
New Revision: 2243
Modified:
examples/trunk/jsf2/WebContent/home.xhtml
examples/trunk/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
examples/trunk/numberguess/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
examples/trunk/tomcat/WebContent/home.xhtml
examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
Log:
WBRI-80, thanks to Brandon Blatnick
Modified: examples/trunk/jsf2/WebContent/home.xhtml
===================================================================
--- examples/trunk/jsf2/WebContent/home.xhtml 2009-03-27 22:00:49 UTC (rev 2242)
+++ examples/trunk/jsf2/WebContent/home.xhtml 2009-03-28 14:54:09 UTC (rev 2243)
@@ -20,9 +20,9 @@
<div>
Your guess:
- <h:inputText id="inputGuess" value="#{game.guess}" required="true" size="3" disabled="#{game.number eq game.guess}">
- <f:validateLongRange maximum="#{game.biggest}" minimum="#{game.smallest}"/>
- </h:inputText>
+ <h:inputText id="inputGuess" value="#{game.guess}" required="true" size="3" disabled="#{game.number eq game.guess}"
+ validator="#{game.validateNumberRange}">
+ </h:inputText>
<h:commandButton id="GuessButton" value="Guess" action="#{game.check}" disabled="#{game.number eq game.guess}"/>
</div>
<div>
Modified: examples/trunk/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
===================================================================
--- examples/trunk/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-03-27 22:00:49 UTC (rev 2242)
+++ examples/trunk/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-03-28 14:54:09 UTC (rev 2243)
@@ -7,6 +7,8 @@
import javax.annotation.PostConstruct;
import javax.context.SessionScoped;
import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
import javax.inject.AnnotationLiteral;
import javax.inject.Current;
@@ -91,4 +93,16 @@
this.number = manager.getInstanceByType(Integer.class, new AnnotationLiteral<Random>(){});
}
+ public void validateNumberRange(FacesContext context, UIComponent toValidate, Object value)
+ {
+ int input = (Integer) value;
+
+ if (input < smallest || input > biggest)
+ {
+ ((UIInput)toValidate).setValid(false);
+
+ FacesMessage message = new FacesMessage("Invalid guess");
+ context.addMessage(toValidate.getClientId(context), message);
+ }
+ }
}
Modified: examples/trunk/numberguess/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
===================================================================
--- examples/trunk/numberguess/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-03-27 22:00:49 UTC (rev 2242)
+++ examples/trunk/numberguess/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-03-28 14:54:09 UTC (rev 2243)
@@ -7,6 +7,8 @@
import javax.annotation.PostConstruct;
import javax.context.SessionScoped;
import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
import javax.inject.AnnotationLiteral;
import javax.inject.Current;
@@ -91,4 +93,16 @@
this.number = manager.getInstanceByType(Integer.class, new AnnotationLiteral<Random>(){});
}
+ public void validateNumberRange(FacesContext context, UIComponent toValidate, Object value)
+ {
+ int input = (Integer) value;
+
+ if (input < smallest || input > biggest)
+ {
+ ((UIInput)toValidate).setValid(false);
+
+ FacesMessage message = new FacesMessage("Invalid guess");
+ context.addMessage(toValidate.getClientId(context), message);
+ }
+ }
}
Modified: examples/trunk/tomcat/WebContent/home.xhtml
===================================================================
--- examples/trunk/tomcat/WebContent/home.xhtml 2009-03-27 22:00:49 UTC (rev 2242)
+++ examples/trunk/tomcat/WebContent/home.xhtml 2009-03-28 14:54:09 UTC (rev 2243)
@@ -20,9 +20,9 @@
<div>
Your guess:
- <h:inputText id="inputGuess" value="#{game.guess}" required="true" size="3" disabled="#{game.number eq game.guess}">
- <f:validateLongRange maximum="#{game.biggest}" minimum="#{game.smallest}"/>
- </h:inputText>
+ <h:inputText id="inputGuess" value="#{game.guess}" required="true" size="3" disabled="#{game.number eq game.guess}"
+ validator="#{game.validateNumberRange}">
+ </h:inputText>
<h:commandButton id="GuessButton" value="Guess" action="#{game.check}" disabled="#{game.number eq game.guess}"/>
</div>
<div>
Modified: examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
===================================================================
--- examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-03-27 22:00:49 UTC (rev 2242)
+++ examples/trunk/tomcat/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-03-28 14:54:09 UTC (rev 2243)
@@ -7,6 +7,8 @@
import javax.annotation.PostConstruct;
import javax.context.SessionScoped;
import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
import javax.inject.AnnotationLiteral;
import javax.inject.Current;
@@ -91,4 +93,16 @@
this.number = manager.getInstanceByType(Integer.class, new AnnotationLiteral<Random>(){});
}
+ public void validateNumberRange(FacesContext context, UIComponent toValidate, Object value)
+ {
+ int input = (Integer) value;
+
+ if (input < smallest || input > biggest)
+ {
+ ((UIInput)toValidate).setValid(false);
+
+ FacesMessage message = new FacesMessage("Invalid guess");
+ context.addMessage(toValidate.getClientId(context), message);
+ }
+ }
}
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2242 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context: application and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-03-27 18:00:49 -0400 (Fri, 27 Mar 2009)
New Revision: 2242
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Sysma.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java
Log:
Couple more context tests and stubs.
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java 2009-03-27 20:25:09 UTC (rev 2241)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java 2009-03-27 22:00:49 UTC (rev 2242)
@@ -2,11 +2,14 @@
import java.lang.annotation.Annotation;
+import javax.context.ApplicationScoped;
import javax.context.Context;
import javax.context.ContextNotActiveException;
import javax.context.Contextual;
import javax.context.CreationalContext;
+import javax.context.Dependent;
import javax.context.RequestScoped;
+import javax.context.SessionScoped;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
@@ -77,14 +80,6 @@
getCurrentManager().getContext(Unregistered.class);
}
- @Test(groups = { "manager", "broken" })
- @SpecAssertion(section = "8.6", id = "b")
- public void testGetContextReturnsActiveContext()
- {
- //TODO This is not testing the assertion at all
- getCurrentManager().getContext(RequestScoped.class);
- }
-
/**
* For each of the built-in normal scopes, contexts propagate across any Java
* method call, including invocation of EJB local business methods.
@@ -96,4 +91,17 @@
assert false;
}
+ @Test(groups = { "contexts" })
+ @SpecAssertion(section = "8.5", id = "a")
+ public void testBuiltInContexts()
+ {
+ Context context = getCurrentManager().getContext(Dependent.class);
+ assert context != null;
+ context = getCurrentManager().getContext(RequestScoped.class);
+ assert context != null;
+ context = getCurrentManager().getContext(SessionScoped.class);
+ assert context != null;
+ context = getCurrentManager().getContext(ApplicationScoped.class);
+ assert context != null;
+ }
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java 2009-03-27 20:25:09 UTC (rev 2241)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java 2009-03-27 22:00:49 UTC (rev 2242)
@@ -32,6 +32,13 @@
webClient.getPage(getContextPath() + "serviceMethodTest");
}
+ @Test(groups = { "stub", "contexts", "servlet", "integration" })
+ @SpecAssertion(section = "8.5.3", id = "b")
+ public void testApplicationScopeActiveDuringDoFilterMethod() throws Exception
+ {
+ assert false;
+ }
+
@Test(groups = { "stub", "contexts", "webservice", "integration" })
@SpecAssertion(section = "8.5.3", id = "c")
public void testApplicationScopeActiveDuringWebSericeInvocation()
@@ -39,6 +46,13 @@
assert false;
}
+ @Test(groups = { "stub", "contexts", "events", "integration" })
+ @SpecAssertion(section = "8.5.3", id = "d")
+ public void testApplicationScopeActiveDuringAsynchronousObserverMethodInvocation()
+ {
+ assert false;
+ }
+
@Test(groups = { "stub", "contexts", "ejb3", "integration" })
@SpecAssertion(section = "8.5.3", id = "e")
public void testApplicationScopeActiveDuringRemoteMethodInvocationOfEjb()
@@ -60,13 +74,48 @@
assert false;
}
- @Test(groups = { "stub", "contexts", "ejb3", "integration" })
+ @Test(groups = { "stub", "contexts", "integration" })
@SpecAssertion(section = "8.5.3", id = "h")
- public void testApplicationContextSharedBetweenInvokationsInApplication()
+ public void testApplicationContextSharedBetweenServletRequests()
{
assert false;
}
+ @Test(groups = { "stub", "contexts", "events", "integration" })
+ @SpecAssertion(section = "8.5.3", id = "i")
+ public void testApplicationContextSharedBetweenAsynchronousObservers()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts", "webservice", "integration" })
+ @SpecAssertion(section = "8.5.3", id = "j")
+ public void testApplicationContextSharedBetweenWebServices()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts", "ejb3", "integration" })
+ @SpecAssertion(section = "8.5.3", id = "k")
+ public void testApplicationContextSharedBetweenRemoteMethodInvokations()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts", "ejb3", "integration" })
+ @SpecAssertion(section = "8.5.3", id = "l")
+ public void testApplicationContextSharedBetweenEJBTimeoutInvokations()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts", "jms", "integration" })
+ @SpecAssertion(section = "8.5.3", id = "m")
+ public void testApplicationContextSharedBetweenMDBMessageDeliveries()
+ {
+ assert false;
+ }
+
@Test(groups = { "stub", "contexts", "integration" })
@SpecAssertion(section = "8.5.3", id = "n")
public void testApplicationScopeDestroyedWhenApplicationIsUndeployed()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-03-27 20:25:09 UTC (rev 2241)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-03-27 22:00:49 UTC (rev 2242)
@@ -186,4 +186,11 @@
getCurrentManager().getInstanceByType(HelsinkiNonSerializable.class).ping();
}
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "8.4", id = "v")
+ public void testIsSerializableOnBean()
+ {
+ assert !getCurrentManager().resolveByType(Sysma.class).iterator().next().isSerializable();
+ assert getCurrentManager().resolveByType(Hyvinkaa.class).iterator().next().isSerializable();
+ }
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Sysma.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Sysma.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Sysma.java 2009-03-27 22:00:49 UTC (rev 2242)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.context.passivating;
+
+/**
+ * Simple bean that is not serializable.
+ *
+ * @author David Allen
+ *
+ */
+public class Sysma
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Sysma.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java 2009-03-27 20:25:09 UTC (rev 2241)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java 2009-03-27 22:00:49 UTC (rev 2242)
@@ -26,7 +26,19 @@
assert false;
}
+
/**
+ * The request scope is active during the doFilter() method of any Servlet in
+ * the web application.
+ */
+ @Test(groups = { "stub", "contexts", "servlet", "integration" })
+ @SpecAssertion(section = "8.5.1", id = "b")
+ public void testRequestScopeActiveDuringServletFilter()
+ {
+ assert false;
+ }
+
+ /**
* The request context is destroyed at the end of the servlet request, after
* the Servlet service() method returns.
*/
@@ -59,6 +71,27 @@
}
/**
+ * The request scope is active during any asynchronous observer method notification
+ */
+ @Test(groups = { "stub", "contexts", "integration" })
+ @SpecAssertion(section = "8.5.1", id = "f")
+ public void testRequestScopeIsActiveDuringAsynchronousObserverMethodInvocation()
+ {
+ assert false;
+ }
+
+ /**
+ * The request context is destroyed after the web service invocation
+ * completes
+ */
+ @Test(groups = { "stub", "contexts", "integration" })
+ @SpecAssertion(section = "8.5.1", id = "g")
+ public void testRequestScopeIsDestroyedAfterAsynchronousObserverMethodInvocation()
+ {
+ assert false;
+ }
+
+ /**
* The request scope is active during any remote method invocation of any EJB
* bean, during any call to an EJB timeout method and during message delivery
* to any EJB message driven bean.
@@ -126,5 +159,4 @@
{
assert false;
}
-
}
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2241 - extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 16:25:09 -0400 (Fri, 27 Mar 2009)
New Revision: 2241
Modified:
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java
Log:
better shutdown
Modified: extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java
===================================================================
--- extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java 2009-03-27 20:21:52 UTC (rev 2240)
+++ extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java 2009-03-27 20:25:09 UTC (rev 2241)
@@ -26,6 +26,7 @@
import org.jboss.webbeans.environment.tomcat.discovery.TomcatWebBeanDiscovery;
import org.jboss.webbeans.environment.tomcat.resources.ReadOnlyNamingContext;
import org.jboss.webbeans.environment.tomcat.util.Reflections;
+import org.jboss.webbeans.manager.api.WebBeansManager;
import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.servlet.api.ServletListener;
import org.jboss.webbeans.servlet.api.helpers.ForwardingServletListener;
@@ -42,6 +43,7 @@
private final transient Bootstrap bootstrap;
private final transient ServletListener webBeansListener;
+ private WebBeansManager manager;
public Listener()
{
@@ -65,7 +67,7 @@
public void contextDestroyed(ServletContextEvent sce)
{
- bootstrap.shutdown();
+ manager.shutdown();
super.contextDestroyed(sce);
}
@@ -78,6 +80,7 @@
bootstrap.getServices().add(NamingContext.class, new ReadOnlyNamingContext() {});
bootstrap.setApplicationContext(applicationBeanStore);
bootstrap.initialize();
+ manager = bootstrap.getManager();
bootstrap.boot();
super.contextInitialized(sce);
}
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2240 - in extensions/trunk/tomcat: build and 4 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 16:21:52 -0400 (Fri, 27 Mar 2009)
New Revision: 2240
Added:
extensions/trunk/tomcat/build/
extensions/trunk/tomcat/build/pom.xml
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/util/Servlets.java
Modified:
extensions/trunk/tomcat/int/
extensions/trunk/tomcat/int/pom.xml
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/AbstractScanner.java
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/TomcatWebBeanDiscovery.java
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/URLScanner.java
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/resources/ReadOnlyNamingContext.java
extensions/trunk/tomcat/pom.xml
Log:
tomcat integration
Added: extensions/trunk/tomcat/build/pom.xml
===================================================================
--- extensions/trunk/tomcat/build/pom.xml (rev 0)
+++ extensions/trunk/tomcat/build/pom.xml 2009-03-27 20:21:52 UTC (rev 2240)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+ <parent>
+ <artifactId>webbeans-tomcat-parent</artifactId>
+ <groupId>org.jboss.webbeans.tomcat</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.webbeans.tomcat</groupId>
+ <artifactId>webbeans-tomcat</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>Web Beans Tomcat module</name>
+ <url>http://www.seamframework.org/WebBeans</url>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.webbeans.tomcat</groupId>
+ <artifactId>webbeans-tomcat-int</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <artifactSet>
+ <excludes>
+ <exclude>xml-apis:xml-apis</exclude>
+ </excludes>
+ </artifactSet>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Property changes on: extensions/trunk/tomcat/int
___________________________________________________________________
Name: svn:ignore
- .project
.classpath
target
.settings
+ .project
.classpath
target
.settings
bin
Modified: extensions/trunk/tomcat/int/pom.xml
===================================================================
--- extensions/trunk/tomcat/int/pom.xml 2009-03-27 20:19:22 UTC (rev 2239)
+++ extensions/trunk/tomcat/int/pom.xml 2009-03-27 20:21:52 UTC (rev 2240)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
- <artifactId>webbeans-tomcat</artifactId>
+ <artifactId>webbeans-tomcat-parent</artifactId>
<groupId>org.jboss.webbeans.tomcat</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
@@ -37,6 +37,11 @@
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-logging</artifactId>
+ </dependency>
</dependencies>
Modified: extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/AbstractScanner.java
===================================================================
--- extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/AbstractScanner.java 2009-03-27 20:19:22 UTC (rev 2239)
+++ extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/AbstractScanner.java 2009-03-27 20:21:52 UTC (rev 2240)
@@ -18,7 +18,8 @@
import java.net.URL;
-import org.apache.log4j.Logger;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logging;
/**
* Abstract base class for {@link Scanner} providing common functionality
@@ -31,7 +32,7 @@
public abstract class AbstractScanner implements Scanner
{
- private static final Logger log = Logger.getLogger(Scanner.class);
+ private static final Log log = Logging.getLog(Scanner.class);
private final ClassLoader classLoader;
private final TomcatWebBeanDiscovery webBeanDiscovery;
Modified: extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/TomcatWebBeanDiscovery.java
===================================================================
--- extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/TomcatWebBeanDiscovery.java 2009-03-27 20:19:22 UTC (rev 2239)
+++ extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/TomcatWebBeanDiscovery.java 2009-03-27 20:21:52 UTC (rev 2240)
@@ -18,7 +18,6 @@
import java.io.File;
import java.net.MalformedURLException;
-import java.net.URISyntaxException;
import java.net.URL;
import java.util.Collections;
import java.util.HashSet;
@@ -28,6 +27,7 @@
import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
import org.jboss.webbeans.environment.tomcat.util.Reflections;
+import org.jboss.webbeans.environment.tomcat.util.Servlets;
/**
* The means by which Web Beans are discovered on the classpath. This will only
@@ -78,20 +78,19 @@
scanner.scanResources(new String[] { "beans.xml" });
try
{
- if (servletContext.getResource("/WEB-INF/beans.xml") != null)
+ URL beans = servletContext.getResource("/WEB-INF/beans.xml");
+ if (beans != null)
{
- File[] files = {new File(servletContext.getResource("/WEB-INF/classes").toURI())};
+ File webInfClasses = Servlets.getRealFile(servletContext, "/WEB-INF/classes");
+ File[] files = {webInfClasses};
scanner.scanDirectories(files);
+ wbUrls.add(beans);
}
}
catch (MalformedURLException e)
{
throw new IllegalStateException("Error loading resources from servlet context ", e);
}
- catch (URISyntaxException e)
- {
- throw new IllegalStateException("Error loading resources from servlet context ", e);
- }
}
}
Modified: extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/URLScanner.java
===================================================================
--- extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/URLScanner.java 2009-03-27 20:19:22 UTC (rev 2239)
+++ extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/discovery/URLScanner.java 2009-03-27 20:21:52 UTC (rev 2240)
@@ -29,7 +29,8 @@
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
-import org.apache.log4j.Logger;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logging;
/**
* Implementation of {@link Scanner} which can scan a {@link URLClassLoader}
@@ -42,7 +43,7 @@
*/
public class URLScanner extends AbstractScanner
{
- private static final Logger log = Logger.getLogger(URLScanner.class);
+ private static final Log log = Logging.getLog(URLScanner.class);
public URLScanner(ClassLoader classLoader, TomcatWebBeanDiscovery webBeanDiscovery)
{
Modified: extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/resources/ReadOnlyNamingContext.java
===================================================================
--- extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/resources/ReadOnlyNamingContext.java 2009-03-27 20:19:22 UTC (rev 2239)
+++ extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/resources/ReadOnlyNamingContext.java 2009-03-27 20:21:52 UTC (rev 2240)
@@ -55,4 +55,10 @@
return context;
}
+ @Override
+ public void unbind(String key)
+ {
+ // No-op
+ }
+
}
Added: extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/util/Servlets.java
===================================================================
--- extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/util/Servlets.java (rev 0)
+++ extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/util/Servlets.java 2009-03-27 20:21:52 UTC (rev 2240)
@@ -0,0 +1,35 @@
+package org.jboss.webbeans.environment.tomcat.util;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.servlet.ServletContext;
+
+public class Servlets
+{
+
+ public static File getRealFile(ServletContext servletContext, String path) throws MalformedURLException
+ {
+ String realPath = servletContext.getRealPath(path);
+ if (realPath==null) //WebLogic!
+ {
+ URL resourcePath = servletContext.getResource(path);
+ if ((resourcePath != null) && (resourcePath.getProtocol().equals("file")))
+ {
+ realPath = resourcePath.getPath();
+ }
+ }
+
+ if (realPath != null)
+ {
+ File file = new File(realPath);
+ if (file.exists())
+ {
+ return file;
+ }
+ }
+ return null;
+ }
+
+}
Modified: extensions/trunk/tomcat/pom.xml
===================================================================
--- extensions/trunk/tomcat/pom.xml 2009-03-27 20:19:22 UTC (rev 2239)
+++ extensions/trunk/tomcat/pom.xml 2009-03-27 20:21:52 UTC (rev 2240)
@@ -1,7 +1,7 @@
<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>
<groupId>org.jboss.webbeans.tomcat</groupId>
- <artifactId>webbeans-tomcat</artifactId>
+ <artifactId>webbeans-tomcat-parent</artifactId>
<packaging>pom</packaging>
<version>1.0.0-SNAPSHOT</version>
@@ -11,11 +11,12 @@
<version>1.0.0-SNAPSHOT</version>
</parent>
- <name>Web Beans Tomcat module</name>
+ <name>Web Beans Tomcat aggregator</name>
<url>http://www.seamframework.org/WebBeans</url>
<modules>
<module>int</module>
+ <module>build</module>
</modules>
<description>
@@ -33,7 +34,7 @@
<url>http://in.relation.to/Bloggers/Pete</url>
</developer>
</developers>
-
+
<build>
<plugins>
<plugin>
@@ -61,7 +62,7 @@
<tagBase>https://svn.jboss.org/repos/webbeans/extensions/tags</tagBase>
<autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
- </plugin>
+ </plugin>
</plugins>
<defaultGoal>package</defaultGoal>
@@ -95,6 +96,12 @@
</pluginManagement>
</build>
+ <dependencyManagement>
+ <dependencies>
+
+ </dependencies>
+ </dependencyManagement>
+
<profiles>
</profiles>
15 years, 9 months
[webbeans-commits] Webbeans SVN: r2239 - in ri/trunk: impl/src/main/java/org/jboss/webbeans and 10 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-27 16:19:22 -0400 (Fri, 27 Mar 2009)
New Revision: 2239
Added:
ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/
ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/
ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/
ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/AbstractServletListener.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/ForwardingServletListener.java
Modified:
ri/trunk/
ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/Namespace.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java
ri/trunk/spi/pom.xml
ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java
ri/trunk/version-matrix/pom.xml
Log:
move some helper classes to SPI
Property changes on: ri/trunk
___________________________________________________________________
Name: svn:ignore
- target
.classpath
.settings
.project
+
arget
.classpath
.settings
.project
tests
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-03-27 20:15:58 UTC (rev 2238)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-03-27 20:19:22 UTC (rev 2239)
@@ -63,6 +63,7 @@
import org.jboss.webbeans.bean.RIBean;
import org.jboss.webbeans.bean.proxy.ClientProxyProvider;
import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
+import org.jboss.webbeans.context.ApplicationContext;
import org.jboss.webbeans.context.ContextMap;
import org.jboss.webbeans.context.CreationalContextImpl;
import org.jboss.webbeans.ejb.EjbDescriptorCache;
@@ -73,8 +74,11 @@
import org.jboss.webbeans.injection.resolution.Resolver;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.introspector.AnnotatedMethod;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logging;
import org.jboss.webbeans.manager.api.WebBeansManager;
import org.jboss.webbeans.metadata.MetaDataCache;
+import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.util.Beans;
import org.jboss.webbeans.util.Reflections;
@@ -90,6 +94,8 @@
public class ManagerImpl implements WebBeansManager, Serializable
{
+ private static final Log log = Logging.getLog(ManagerImpl.class);
+
private static final long serialVersionUID = 3021562879133838561L;
// The JNDI key to place the manager under
@@ -996,12 +1002,14 @@
return taskExecutor;
}
- /**
- * Cleans up resources held by the manager prior to shutting down a VM.
- */
- public void cleanup()
+ public void shutdown()
{
+ log.trace("Ending application");
shutdownExecutors();
+ ApplicationContext.INSTANCE.destroy();
+ ApplicationContext.INSTANCE.setActive(false);
+ ApplicationContext.INSTANCE.setBeanStore(null);
+ getServices().get(NamingContext.class).unbind(ManagerImpl.JNDI_KEY);
}
/**
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-03-27 20:15:58 UTC (rev 2238)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-03-27 20:19:22 UTC (rev 2239)
@@ -22,7 +22,6 @@
import java.util.List;
import javax.inject.ExecutionException;
-import javax.inject.manager.Manager;
import org.jboss.webbeans.BeanValidator;
import org.jboss.webbeans.CurrentManager;
@@ -233,20 +232,10 @@
RequestContext.INSTANCE.setBeanStore(null);
RequestContext.INSTANCE.setActive(false);
}
-
- protected void endApplication(BeanStore applicationBeanStore)
- {
- log.trace("Ending application");
- ApplicationContext.INSTANCE.destroy();
- ApplicationContext.INSTANCE.setActive(false);
- ApplicationContext.INSTANCE.setBeanStore(null);
- }
public void shutdown()
{
- endApplication(getApplicationContext());
- manager.cleanup();
- getServices().get(NamingContext.class).unbind(ManagerImpl.JNDI_KEY);
+ manager.shutdown();
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/Namespace.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/el/Namespace.java 2009-03-27 20:15:58 UTC (rev 2238)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/el/Namespace.java 2009-03-27 20:19:22 UTC (rev 2239)
@@ -4,7 +4,7 @@
import java.util.Map;
/**
- * A namespace for Seam component names.
+ * A namespace for bean names
*
* @author Gavin King
*
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java 2009-03-27 20:15:58 UTC (rev 2238)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java 2009-03-27 20:19:22 UTC (rev 2239)
@@ -18,11 +18,11 @@
package org.jboss.webbeans.servlet;
import javax.servlet.ServletRequestEvent;
-import javax.servlet.ServletRequestListener;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSessionEvent;
-import javax.servlet.http.HttpSessionListener;
+import org.jboss.webbeans.servlet.api.helpers.AbstractServletListener;
+
/**
* The Web Beans listener
*
@@ -33,7 +33,7 @@
* @author Nicklas Karlsson
*
*/
-public class WebBeansListener implements HttpSessionListener, ServletRequestListener
+public class WebBeansListener extends AbstractServletListener
{
private final ServletLifecycle lifecycle;
@@ -48,6 +48,7 @@
*
* @param event The session event
*/
+ @Override
public void sessionCreated(HttpSessionEvent event)
{
lifecycle.beginSession(event.getSession());
@@ -58,6 +59,7 @@
*
* @param event The session event
*/
+ @Override
public void sessionDestroyed(HttpSessionEvent event)
{
lifecycle.endSession(event.getSession());
@@ -68,6 +70,7 @@
*
* @param event The request event
*/
+ @Override
public void requestDestroyed(ServletRequestEvent event)
{
if (event.getServletRequest() instanceof HttpServletRequest)
@@ -85,6 +88,7 @@
*
* @param event The request event
*/
+ @Override
public void requestInitialized(ServletRequestEvent event)
{
if (event.getServletRequest() instanceof HttpServletRequest)
Modified: ri/trunk/spi/pom.xml
===================================================================
--- ri/trunk/spi/pom.xml 2009-03-27 20:15:58 UTC (rev 2238)
+++ ri/trunk/spi/pom.xml 2009-03-27 20:19:22 UTC (rev 2239)
@@ -40,6 +40,12 @@
<artifactId>jta</artifactId>
<optional>true</optional>
</dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <optional>true</optional>
+ </dependency>
</dependencies>
Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java 2009-03-27 20:15:58 UTC (rev 2238)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java 2009-03-27 20:19:22 UTC (rev 2239)
@@ -17,6 +17,8 @@
package org.jboss.webbeans.manager.api;
+import java.io.Serializable;
+
import javax.inject.manager.Manager;
/**
@@ -26,7 +28,7 @@
* @author Pete Muir
*
*/
-public interface WebBeansManager extends Manager
+public interface WebBeansManager extends Manager, Serializable
{
/**
@@ -37,4 +39,6 @@
*/
public void injectNonContextualInstance(Object instance);
+ public void shutdown();
+
}
Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java 2009-03-27 20:19:22 UTC (rev 2239)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.servlet.api;
+
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletRequestListener;
+import javax.servlet.http.HttpSessionListener;
+
+public interface ServletListener extends ServletContextListener, ServletRequestListener, HttpSessionListener
+{
+
+
+
+}
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/AbstractServletListener.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/AbstractServletListener.java (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/AbstractServletListener.java 2009-03-27 20:19:22 UTC (rev 2239)
@@ -0,0 +1,30 @@
+package org.jboss.webbeans.servlet.api.helpers;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletRequestEvent;
+import javax.servlet.http.HttpSessionEvent;
+
+import org.jboss.webbeans.servlet.api.ServletListener;
+
+/**
+ * No-op implementation of ServletListener
+ *
+ * @author Pete Muir
+ *
+ */
+public class AbstractServletListener implements ServletListener
+{
+
+ public void contextDestroyed(ServletContextEvent sce) {}
+
+ public void contextInitialized(ServletContextEvent sce) {}
+
+ public void requestDestroyed(ServletRequestEvent sre) {}
+
+ public void requestInitialized(ServletRequestEvent sre) {}
+
+ public void sessionCreated(HttpSessionEvent se) {}
+
+ public void sessionDestroyed(HttpSessionEvent se) {}
+
+}
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/AbstractServletListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/ForwardingServletListener.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/ForwardingServletListener.java (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/ForwardingServletListener.java 2009-03-27 20:19:22 UTC (rev 2239)
@@ -0,0 +1,44 @@
+package org.jboss.webbeans.servlet.api.helpers;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletRequestEvent;
+import javax.servlet.http.HttpSessionEvent;
+
+import org.jboss.webbeans.servlet.api.ServletListener;
+
+public abstract class ForwardingServletListener implements ServletListener
+{
+
+ protected abstract ServletListener delegate();
+
+ public void contextDestroyed(ServletContextEvent sce)
+ {
+ delegate().contextDestroyed(sce);
+ }
+
+ public void contextInitialized(ServletContextEvent sce)
+ {
+ delegate().contextInitialized(sce);
+ }
+
+ public void requestDestroyed(ServletRequestEvent sre)
+ {
+ delegate().requestDestroyed(sre);
+ }
+
+ public void requestInitialized(ServletRequestEvent sre)
+ {
+ delegate().requestInitialized(sre);
+ }
+
+ public void sessionCreated(HttpSessionEvent se)
+ {
+ delegate().sessionCreated(se);
+ }
+
+ public void sessionDestroyed(HttpSessionEvent se)
+ {
+ delegate().sessionDestroyed(se);
+ }
+
+}
Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/ForwardingServletListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/version-matrix/pom.xml
===================================================================
--- ri/trunk/version-matrix/pom.xml 2009-03-27 20:15:58 UTC (rev 2238)
+++ ri/trunk/version-matrix/pom.xml 2009-03-27 20:19:22 UTC (rev 2239)
@@ -49,6 +49,7 @@
<properties>
<jsr299.tck.version>1.0.0-SNAPSHOT</jsr299.tck.version>
<webbeans.version>1.0.0-SNAPSHOT</webbeans.version>
+ <webbeans.tomcat.version>1.0.0-SNAPSHOT</webbeans.tomcat.version>
</properties>
<dependencyManagement>
@@ -142,10 +143,16 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_12</version>
</dependency>
<dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.2_12</version>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-embedded</artifactId>
<version>1.0.0-Alpha1</version>
@@ -248,6 +255,18 @@
<artifactId>webbeans-logging</artifactId>
<version>${webbeans.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans.tomcat</groupId>
+ <artifactId>webbeans-tomcat-int</artifactId>
+ <version>${webbeans.tomcat.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans.tomcat</groupId>
+ <artifactId>webbeans-tomcat</artifactId>
+ <version>${webbeans.tomcat.version}</version>
+ </dependency>
<dependency>
<groupId>org.jboss.jsr299.tck</groupId>
@@ -261,6 +280,8 @@
<version>${jsr299.tck.version}</version>
</dependency>
+
+
<dependency>
<groupId>org.jboss.test-harness</groupId>
<artifactId>jboss-test-harness</artifactId>
@@ -455,6 +476,11 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.2</version>
+ </plugin>
</plugins>
</pluginManagement>
</build>
15 years, 9 months