[webbeans-commits] Webbeans SVN: r3804 - ri/branches/kabir-builder.
by webbeans-commits@lists.jboss.org
Author: kabir.khan(a)jboss.com
Date: 2009-09-29 12:38:20 -0400 (Tue, 29 Sep 2009)
New Revision: 3804
Modified:
ri/branches/kabir-builder/
Log:
svn merge 1-371
Property changes on: ri/branches/kabir-builder
___________________________________________________________________
Name: svnmerge-integrated
- /ri/trunk:1-3690
+ /ri/trunk:1-3741
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3803 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken: exception and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-29 12:13:18 -0400 (Tue, 29 Sep 2009)
New Revision: 3803
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/definitionError/ProcessObserverMethodErrorTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodExceptionTest.java
Log:
fix a couple of tests
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/definitionError/ProcessObserverMethodErrorTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/definitionError/ProcessObserverMethodErrorTest.java 2009-09-29 15:25:36 UTC (rev 3802)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/definitionError/ProcessObserverMethodErrorTest.java 2009-09-29 16:13:18 UTC (rev 3803)
@@ -17,6 +17,7 @@
package org.jboss.jsr299.tck.tests.extensions.observer.broken.definitionError;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.DefinitionError;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecVersion;
@@ -40,10 +41,10 @@
})
@IntegrationTest
@SpecVersion(spec="cdi", version="PFD2")
-public class ProcessObserverMethodErrorTest
+public class ProcessObserverMethodErrorTest extends AbstractJSR299Test
{
- @Test
+ @Test(groups = "ri-broken")
@SpecAssertion(section = "11.5.9", id = "da")
public void testAddDefinitionError()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodExceptionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodExceptionTest.java 2009-09-29 15:25:36 UTC (rev 3802)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/broken/exception/ProcessObserverMethodExceptionTest.java 2009-09-29 16:13:18 UTC (rev 3803)
@@ -17,6 +17,7 @@
package org.jboss.jsr299.tck.tests.extensions.observer.broken.exception;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.DefinitionError;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecVersion;
@@ -41,10 +42,10 @@
})
@IntegrationTest
@SpecVersion(spec="cdi", version="PFD2")
-public class ProcessObserverMethodExceptionTest
+public class ProcessObserverMethodExceptionTest extends AbstractJSR299Test
{
- @Test
+ @Test(groups = "ri-broken")
@SpecAssertion(section = "11.5.9", id = "db")
public void testExceptionIsDefinitionError()
{
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3802 - doc/trunk/reference/en-US.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-29 11:25:36 -0400 (Tue, 29 Sep 2009)
New Revision: 3802
Modified:
doc/trunk/reference/en-US/environments.xml
doc/trunk/reference/en-US/gettingstarted.xml
Log:
Start to update
Modified: doc/trunk/reference/en-US/environments.xml
===================================================================
--- doc/trunk/reference/en-US/environments.xml 2009-09-29 13:57:56 UTC (rev 3801)
+++ doc/trunk/reference/en-US/environments.xml 2009-09-29 15:25:36 UTC (rev 3802)
@@ -113,6 +113,11 @@
<literal>dom4j.jar</literal>
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>google-collections.jar</literal>
+ </para>
+ </listitem>
</itemizedlist>
<para>
@@ -130,15 +135,15 @@
<para>
Tomcat has a read-only JNDI, so Web Beans can't automatically bind
- the Manager. To bind the Manager into JNDI, you should populate
+ the BeanManager. To bind the BeanManager into JNDI, you should populate
<literal>META-INF/context.xml</literal> with the following
contents:
</para>
<programlisting role="XML"><![CDATA[<Context>
- <Resource name="app/Manager"
+ <Resource name="BeanManager"
auth="Container"
- type="javax.inject.manager.Manager"
+ type="javax.enterprise.inject.spi.BeanManager"
factory="org.jboss.webbeans.resources.ManagerObjectFactory"/>
</Context>]]></programlisting>
@@ -149,17 +154,17 @@
<programlisting role="XML"><![CDATA[<resource-env-ref>
<resource-env-ref-name>
- app/Manager
+ BeanManager
</resource-env-ref-name>
<resource-env-ref-type>
- javax.inject.manager.Manager
+ javax.enterprise.inject.spi.BeanManager
</resource-env-ref-type>
</resource-env-ref>]]></programlisting>
<para>
Tomcat 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>
+ <literal>java:comp/env</literal>, so the BeanManager will be available
+ at <literal>java:comp/env/BeanManager</literal>
</para>
<para>
@@ -186,12 +191,12 @@
<programlisting role="XML"><![CDATA[<!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">
+ <New id="BeanManager" class="org.mortbay.jetty.plus.naming.Resource">
<Arg><Ref id="webAppCtx"/></Arg>
- <Arg>app/Manager</Arg>
+ <Arg>BeanManager</Arg>
<Arg>
<New class="javax.naming.Reference">
- <Arg>javax.inject.manager.Manager</Arg>
+ <Arg>javax.enterprise.inject.spi.BeanManager</Arg>
<Arg>org.jboss.webbeans.resources.ManagerObjectFactory</Arg>
<Arg/>
</New>
@@ -208,8 +213,8 @@
<para>
Jetty 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>
+ <literal>java:comp/env</literal>, so the BeanManager will be available
+ at <literal>java:comp/env/BeanManager</literal>
</para>
<para>
Modified: doc/trunk/reference/en-US/gettingstarted.xml
===================================================================
--- doc/trunk/reference/en-US/gettingstarted.xml 2009-09-29 13:57:56 UTC (rev 3801)
+++ doc/trunk/reference/en-US/gettingstarted.xml 2009-09-29 15:25:36 UTC (rev 3802)
@@ -12,11 +12,10 @@
<para>
Web Beans comes with a two deployable example applications:
- <literal>webbeans-numberguess</literal>, a war example, containing only
+ <literal>webbeans-numberguess</literal>, a war example which runs on
+ JBoss AS, Tomcat, Jetty and Google App Engine, containing only
simple beans, and <literal>webbeans-translator</literal> an ear example,
- 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.
+ containing enterprise beans.
To run the examples you'll need the following:
</para>
@@ -25,9 +24,12 @@
<para>the latest release of Web Beans,</para>
</listitem>
<listitem>
- <para>JBoss AS 5.0.1.GA, or</para>
+ <para>JBoss AS 5.2.0, or</para>
</listitem>
<listitem>
+ <para>Jetty 6.1.x, or</para>
+ </listitem>
+ <listitem>
<para>Apache Tomcat 6.0.x, and</para>
</listitem>
<listitem>
@@ -39,56 +41,21 @@
<title>Using JBoss AS 5</title>
<para>
- You'll need to download JBoss AS 5.0.1.GA from
+ You'll need to download JBoss AS 5.2.0 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>
+$ unzip ~/jboss-5.2.0.Beta.zip]]></programlisting>
- <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>
-
- <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>
-
<note>
<para>
- JBoss 5.1.0 comes with Web Beans built in, so there is no need to
- update the server.
+ JBoss AS 5.2.0 comes with Web Beans built in.
</para>
</note>
- <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
-$ ant update</programlisting>
-
- <para>
Now, you're ready to deploy your first example!
</para>
@@ -132,14 +99,14 @@
To deploy the numberguess example:
</para>
- <programlisting>$ cd examples/numberguess
+ <programlisting>$ cd examples/jsf/numberguess
ant deploy</programlisting>
<para>
Start JBoss AS:
</para>
- <programlisting>$ /Application/jboss-5.0.0.GA/bin/run.sh</programlisting>
+ <programlisting>$ /Application/jboss-5.2.0.Beta/bin/run.sh</programlisting>
<tip>
<para>
@@ -189,12 +156,6 @@
<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>
@@ -206,47 +167,36 @@
<itemizedlist>
<listitem>
<para>
- <literal>ant tomcat.restart</literal> - deploy the example in exploded
- format
+ <literal>mvn war:inplace tomcat:run -Ptomcat</literal> - deploy the example in an embedded Tomcat
</para>
</listitem>
<listitem>
<para>
- <literal>ant tomcat.explode</literal> - update an exploded example, without
- restarting the deployment
+ <literal>mvn compile war:exploded tomcat:exploded -Ptomcat</literal> - deploy the example to a running Tomcat install
</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 (in compressed jar format) from the server
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ant tomcat.unexplode</literal> - remove the example (in exploded format) from the server
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ant tomcat.clean</literal> - clean the example
- </para>
- </listitem>
</itemizedlist>
+ <para>
+ See the <code>jsf/numberguess/readme.txt</code> for more details.
+ </para>
</tip>
<para>
To deploy the numberguess example for tomcat:
</para>
- <programlisting>$ cd examples/tomcat
+ <programlisting>$ cd examples/jsf/numberguess
ant tomcat.deploy</programlisting>
<para>
+ Edit <code>$TOMCAT_HOME/conf/tomcat-users.xml</code> and add
+ </para>
+
+ <programlisting><![CDATA[<user username="admin" password="" roles="manager"/>]]></programlisting>
+
+ <para>This allows Maven to communicate with Tomcat.</para>
+
+ <para>
Start Tomcat:
</para>
@@ -257,6 +207,10 @@
If you use Windows, use the <literal>startup.bat</literal>script.
</para>
</tip>
+
+ <para>Deploy the application</para>
+
+ <programlisting>$ mvn compile war:exploded tomcat:exploded -Ptomcat</programlisting>
<para>
Wait for the application to deploy, and enjoy hours of fun at
@@ -562,39 +516,38 @@
<programlisting role="JAVA"><![CDATA[package org.jboss.webbeans.examples.numberguess;
+import java.io.Serializable;
import javax.annotation.PostConstruct;
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.inject.Instance;
import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
-import javax.webbeans.AnnotationLiteral;
-import javax.webbeans.Current;
-import javax.webbeans.Initializer;
-import javax.webbeans.Named;
-import javax.webbeans.SessionScoped;
-import javax.webbeans.manager.Manager;
+import javax.inject.Inject;
+import javax.inject.Named;
@Named
@SessionScoped
-public class Game
+public class Game implements Serializable
{
private int number;
private int guess;
private int smallest;
+
+ @Inject @MaxNumber
+ private int maxNumber;
+
private int biggest;
private int remainingGuesses;
- @Current Manager manager;
+ @Inject @Random Instance<Integer> randomNumber;
public Game()
{
}
-
- @Initializer
- Game(@MaxNumber int maxNumber)
- {
- this.biggest = maxNumber;
- }
public int getNumber()
{
@@ -650,11 +603,32 @@
this.smallest = 0;
this.guess = 0;
this.remainingGuesses = 10;
- this.number = manager.getInstanceByType(Integer.class, new AnnotationLiteral<Random>(){});
+ this.biggest = maxNumber;
+ this.number = randomNumber.get();
}
-}]]></programlisting>
+ public void validateNumberRange(FacesContext context, UIComponent toValidate, Object value)
+ {
+ if (remainingGuesses <= 0)
+ {
+ FacesMessage message = new FacesMessage("No guesses left!");
+ context.addMessage(toValidate.getClientId(context), message);
+ ((UIInput)toValidate).setValid(false);
+ return;
+ }
+ 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);
+ }
+ }
+}
+]]></programlisting>
+
<section>
<title>The numberguess example in Tomcat</title>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3801 - ri/trunk/parent.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-29 09:57:56 -0400 (Tue, 29 Sep 2009)
New Revision: 3801
Modified:
ri/trunk/parent/pom.xml
Log:
Allow running standalone TCK
Modified: ri/trunk/parent/pom.xml
===================================================================
--- ri/trunk/parent/pom.xml 2009-09-29 13:11:46 UTC (rev 3800)
+++ ri/trunk/parent/pom.xml 2009-09-29 13:57:56 UTC (rev 3801)
@@ -9,6 +9,7 @@
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-version-matrix</artifactId>
<version>1.0.0-SNAPSHOT</version>
+ <relativePath>../version-matrix</relativePath>
</parent>
<name>Web Beans, the reference implementation of JSR-299</name>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3800 - ri/trunk/jboss-tck-runner.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-29 09:11:46 -0400 (Tue, 29 Sep 2009)
New Revision: 3800
Modified:
ri/trunk/jboss-tck-runner/pom.xml
Log:
Allow running standalone
Modified: ri/trunk/jboss-tck-runner/pom.xml
===================================================================
--- ri/trunk/jboss-tck-runner/pom.xml 2009-09-29 12:50:49 UTC (rev 3799)
+++ ri/trunk/jboss-tck-runner/pom.xml 2009-09-29 13:11:46 UTC (rev 3800)
@@ -3,6 +3,7 @@
<artifactId>webbeans-parent</artifactId>
<groupId>org.jboss.webbeans</groupId>
<version>1.0.0-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3799 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/context/dependent and 12 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-09-29 08:50:49 -0400 (Tue, 29 Sep 2009)
New Revision: 3799
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/dependent/DependentContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/DecoratorInvocationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/conditional/ConditionalObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodEventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/PolicyAvailabilityTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/broken/not/policy/stereotype/ClassIsNotPolicyTest.java
tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
Log:
matched some unmatched tests
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-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -45,7 +45,7 @@
}
@Test(groups = { "contexts", "integration" })
- @SpecAssertion(section = "6.7.3", id = "ea")
+ @SpecAssertion(section = "6.7.3", id = "e")
public void testApplicationContextSharedBetweenServletRequests() throws Exception
{
WebClient webClient = new WebClient();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -63,7 +63,7 @@
}
@Test(groups = { "contexts", "el" })
- @SpecAssertion(section = "6.4", id = "c")
+ @SpecAssertion(section = "6.4", id = "ca")
public void testInstanceUsedForElEvaluationNotShared() throws Exception
{
Set<Bean<Fox>> foxBeans = getBeans(Fox.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/DecoratorInvocationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/DecoratorInvocationTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/DecoratorInvocationTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -42,8 +42,8 @@
@SpecAssertion(section="8.1.3", id="d"),
@SpecAssertion(section="8.1.2", id="f"),
@SpecAssertion(section="8.1.2", id="b"),
- @SpecAssertion(section="7.2", id="b"),
- @SpecAssertion(section="7.2", id="ha")
+ @SpecAssertion(section="7.2", id="b")
+ //@SpecAssertion(section="7.2", id="ha") removed from spec
})
public void testDecoratorInvocation()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -37,7 +37,10 @@
{
@Test
- @SpecAssertions( { @SpecAssertion(section = "5.1", id = "b"), @SpecAssertion(section = "5.2", id = "k") })
+ @SpecAssertions({
+ @SpecAssertion(section = "5.1", id = "b"),
+ @SpecAssertion(section = "5.2.1", id = "k")
+ })
public void testGetBeanClassCalled()
{
assert CatBean.bean.isGetBeanClassCalled();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -66,7 +66,7 @@
@SpecAssertions({
//@SpecAssertion(section = "4.3.2", id = "d"),
@SpecAssertion(section="4.3", id="cb"),
- @SpecAssertion(section = "5.6.8", id = "ba")
+ @SpecAssertion(section = "5.6.8", id = "baa")
})
public void testObserverCalledOnMostSpecializedInstance()
{
@@ -152,7 +152,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "11.1.3", id = "g")
+ @SpecAssertion(section = "11.1.3", id = "ga")
public void testInstanceOfBeanForEveryEnabledObserverMethod()
{
assert !getCurrentManager().resolveObserverMethods(new StockPrice()).isEmpty();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/conditional/ConditionalObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/conditional/ConditionalObserverTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/conditional/ConditionalObserverTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -18,7 +18,7 @@
{
@Test(groups = { "events" })
@SpecAssertions( {
- @SpecAssertion(section = "5.6.8", id = "ba"),
+ @SpecAssertion(section = "5.6.8", id = "baa"),
@SpecAssertion(section = "10.4.4", id = "a")
} )
public void testConditionalObserver()
@@ -40,7 +40,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "5.6.8", id = "ba")
+ @SpecAssertion(section = "5.6.8", id = "baa")
public void testObserverMethodInvokedOnReturnedInstanceFromContext()
{
RecluseSpider spider = getInstanceByType(RecluseSpider.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodEventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodEventTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodEventTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -42,14 +42,14 @@
{
@Test(groups = "ri-broken")
// Event resolution seems to be broken here
- @SpecAssertion(section = "11.5.9", id = "aa")
+ @SpecAssertion(section = "11.5.9", id = "aaa")
public void testProcessObserverMethodEventsSent()
{
assert ProcessObserverMethodObserver.getEventtypes().contains(EventA.class);
}
@Test(groups = "ri-broken")
- @SpecAssertion(section = "11.5.9", id = "ab")
+ @SpecAssertion(section = "11.5.9", id = "aba")
public void testGetAnnotatedMethod()
{
assert ProcessObserverMethodObserver.getAnnotatedMethod().getParameters().iterator().next().getBaseType().equals(EventA.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -36,7 +36,7 @@
@Test(groups = "ri-broken")
@SpecAssertions({
@SpecAssertion(section = "11.2", id = "ba"),
- @SpecAssertion(section = "11.5.7", id = "b")
+ @SpecAssertion(section = "11.5.7", id = "ba")
})
public void testProduceCallsInitializer()
{
@@ -48,7 +48,7 @@
@Test(groups = "ri-broken")
@SpecAssertions({
- @SpecAssertion(section = "11.2", id = "bb")
+ @SpecAssertion(section = "11.2", id = "ba")
})
public void testProduceCallsConstructor()
{
@@ -122,9 +122,9 @@
@Test(groups = "ri-broken")
@SpecAssertions({
- @SpecAssertion(section = "11.2", id = "ea"),
+ @SpecAssertion(section = "11.2", id = "eaa"),
@SpecAssertion(section = "11.5.7", id = "a"),
- @SpecAssertion(section = "11.5.7", id = "b"),
+ @SpecAssertion(section = "11.5.7", id = "ba"),
@SpecAssertion(section = "11.5.7", id = "c"),
@SpecAssertion(section = "11.5.7", id = "d"),
@SpecAssertion(section = "12.3", id = "ha")
@@ -140,9 +140,9 @@
@Test(groups = "ri-broken")
@SpecAssertions({
- @SpecAssertion(section = "11.2", id = "eb"),
+ @SpecAssertion(section = "11.2", id = "eba"),
@SpecAssertion(section = "11.5.7", id = "a"),
- @SpecAssertion(section = "11.5.7", id = "b"),
+ @SpecAssertion(section = "11.5.7", id = "ba"),
@SpecAssertion(section = "11.5.7", id = "c"),
@SpecAssertion(section = "11.5.7", id = "d"),
@SpecAssertion(section = "12.3", id = "hb")
@@ -156,7 +156,7 @@
@Test(groups = "ri-broken")
@SpecAssertions({
- @SpecAssertion(section = "11.2", id = "fa")
+ @SpecAssertion(section = "11.2", id = "faa")
})
public void testProducerForMethodDisposesProduct()
{
@@ -169,7 +169,7 @@
@Test(groups = "ri-broken")
@SpecAssertions({
- @SpecAssertion(section = "11.2", id = "fb")
+ @SpecAssertion(section = "11.2", id = "fba")
})
public void testProducerForFieldDisposesProduct()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -44,7 +44,7 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "3.3.5", id = "a"),
+ @SpecAssertion(section = "3.3.5", id = "aa"),
@SpecAssertion(section = "3.3.6", id = "ba")
})
public void testDisposalMethodOnNonBean() throws Exception
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -75,7 +75,7 @@
@Test(groups = "enterpriseBeans")
@SpecAssertions({
@SpecAssertion(section = "3.2.2", id = "c"),
- @SpecAssertion(section = "3.2.3", id = "a"),
+ @SpecAssertion(section = "3.2.3", id = "aa"),
@SpecAssertion(section = "2.2", id = "l")
})
public void testObjectIsInAPITypes()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -32,8 +32,8 @@
public class ResolutionByNameTest extends AbstractJSR299Test
{
- @Test
- @SpecAssertion(section="5.8", id="c")
+ //@Test
+ //@SpecAssertion(section="5.8", id="c") removed from spec
public void testQualifiedNameLookup()
{
assert getCurrentConfiguration().getEl().evaluateValueExpression("#{(game.value == 'foo' and game.value == 'foo') ? game.value == 'foo' : false}", Boolean.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/PolicyAvailabilityTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/PolicyAvailabilityTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/PolicyAvailabilityTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -78,8 +78,8 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "5.2.1", id = "fa"),
- @SpecAssertion(section = "2.6.1", id = "e")
+ @SpecAssertion(section = "5.2.1", id = "fa")
+ //@SpecAssertion(section = "2.6.1", id = "e") removed from spec
})
public void testProducerPoliciesOnClass() throws Exception
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/broken/not/policy/stereotype/ClassIsNotPolicyTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/broken/not/policy/stereotype/ClassIsNotPolicyTest.java 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/broken/not/policy/stereotype/ClassIsNotPolicyTest.java 2009-09-29 12:50:49 UTC (rev 3799)
@@ -33,7 +33,7 @@
{
@Test(groups = { "policy" })
- @SpecAssertion(section="5.2", id="i")
+ @SpecAssertion(section="5.2.1", id="i")
public void test()
{
assert false;
Modified: tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-09-29 12:11:06 UTC (rev 3798)
+++ tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-09-29 12:50:49 UTC (rev 3799)
@@ -645,9 +645,9 @@
<assertion id="da">
<text>If the bean class of X does not directly extend the bean class of another managed bean, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
- </section>
-
- <section id="3.1.6" title="Default name for a managed bean">
+ </section>
+
+ <section id="3.1.5" title="Default name for a managed bean">
<assertion id="a">
<text>The default name for a managed bean is the unqualified class name of the bean class, after converting the first character to lower case</text>
</assertion>
@@ -3339,10 +3339,8 @@
<assertion id="af">
<text>Check |ServletRequestListener|</text>
</assertion>
-
</group>
-
<assertion id="b">
<text>The application scope is active during any Java EE web service invocation.</text>
</assertion>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3798 - extensions/trunk/wicket.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-29 08:11:06 -0400 (Tue, 29 Sep 2009)
New Revision: 3798
Modified:
extensions/trunk/wicket/pom.xml
Log:
don't put version here
Modified: extensions/trunk/wicket/pom.xml
===================================================================
--- extensions/trunk/wicket/pom.xml 2009-09-29 12:08:13 UTC (rev 3797)
+++ extensions/trunk/wicket/pom.xml 2009-09-29 12:11:06 UTC (rev 3798)
@@ -36,7 +36,6 @@
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket</artifactId>
- <version>${wicket.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3797 - extensions/trunk/wicket.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-09-29 08:08:13 -0400 (Tue, 29 Sep 2009)
New Revision: 3797
Modified:
extensions/trunk/wicket/pom.xml
Log:
ws
Modified: extensions/trunk/wicket/pom.xml
===================================================================
--- extensions/trunk/wicket/pom.xml 2009-09-29 04:29:31 UTC (rev 3796)
+++ extensions/trunk/wicket/pom.xml 2009-09-29 12:08:13 UTC (rev 3797)
@@ -1,9 +1,10 @@
-<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">
+<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>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-version-matrix</artifactId>
<version>1.0.0-SNAPSHOT</version>
- </parent>
+ </parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-wicket</artifactId>
@@ -17,32 +18,32 @@
<scope>test</scope>
<classifier>jdk15</classifier>
<exclusions>
- <exclusion>
- <artifactId>junit</artifactId>
- <groupId>junit</groupId>
- </exclusion>
+ <exclusion>
+ <artifactId>junit</artifactId>
+ <groupId>junit</groupId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>jsr299-api</artifactId>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>jsr299-api</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-core</artifactId>
- <scope>provided</scope>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-core</artifactId>
+ <scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
- <artifactId>wicket</artifactId>
- <version>${wicket.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket</artifactId>
+ <version>${wicket.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
</dependencies>
<build>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3796 - in ri/trunk: impl/src/main/java/org/jboss/webbeans/context/beanstore and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-09-29 00:29:31 -0400 (Tue, 29 Sep 2009)
New Revision: 3796
Added:
ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContextualInstance.java
Removed:
ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContexutalInstance.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractMapContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/BeanInstanceImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/AbstractAttributeBackedBeanStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/HashMapBeanStore.java
ri/trunk/jboss-as/build.properties
ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/BeanStore.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/AbstractMapBackedBeanStore.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ConcurrentHashMapBeanStore.java
ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ForwardingBeanStore.java
Log:
how did this typo get past unnoticed
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractMapContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractMapContext.java 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractMapContext.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -24,7 +24,7 @@
import javax.enterprise.context.spi.CreationalContext;
import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.context.api.ContexutalInstance;
+import org.jboss.webbeans.context.api.ContextualInstance;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
@@ -75,7 +75,7 @@
{
throw new IllegalStateException("No bean store available for " + toString());
}
- ContexutalInstance<T> beanInstance = getBeanStore().get(contextual);
+ ContextualInstance<T> beanInstance = getBeanStore().get(contextual);
if (beanInstance != null)
{
return beanInstance.getInstance();
@@ -128,7 +128,7 @@
{
throw new IllegalStateException("No bean store available for " + toString());
}
- ContexutalInstance<T> beanInstance = getBeanStore().get(contextual);
+ ContextualInstance<T> beanInstance = getBeanStore().get(contextual);
contextual.destroy(beanInstance.getInstance(), beanInstance.getCreationalContext());
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/BeanInstanceImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/BeanInstanceImpl.java 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/BeanInstanceImpl.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -19,9 +19,9 @@
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import org.jboss.webbeans.context.api.ContexutalInstance;
+import org.jboss.webbeans.context.api.ContextualInstance;
-public class BeanInstanceImpl<T> implements ContexutalInstance<T>
+public class BeanInstanceImpl<T> implements ContextualInstance<T>
{
private final Contextual<T> contextual;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -27,7 +27,7 @@
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import org.jboss.webbeans.context.api.ContexutalInstance;
+import org.jboss.webbeans.context.api.ContextualInstance;
/**
* The dependent context
@@ -63,7 +63,7 @@
if (creationalContext instanceof WBCreationalContext<?>)
{
WBCreationalContext<T> creationalContextImpl = (WBCreationalContext<T>) creationalContext;
- ContexutalInstance<T> beanInstance = new BeanInstanceImpl<T>(contextual, instance, creationalContext);
+ ContextualInstance<T> beanInstance = new BeanInstanceImpl<T>(contextual, instance, creationalContext);
creationalContextImpl.getParentDependentInstancesStore().addDependentInstance(beanInstance);
}
return instance;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -20,7 +20,7 @@
import java.util.Collections;
import java.util.List;
-import org.jboss.webbeans.context.api.ContexutalInstance;
+import org.jboss.webbeans.context.api.ContextualInstance;
import org.jboss.webbeans.log.Log;
import org.jboss.webbeans.log.Logging;
@@ -34,14 +34,14 @@
private static Log log = Logging.getLog(DependentInstancesStore.class);
// A object -> List of contextual instances mapping
- private List<ContexutalInstance<?>> dependentInstances;
+ private List<ContextualInstance<?>> dependentInstances;
/**
* Creates a new DependentInstancesStore
*/
public DependentInstancesStore()
{
- dependentInstances = Collections.synchronizedList(new ArrayList<ContexutalInstance<?>>());
+ dependentInstances = Collections.synchronizedList(new ArrayList<ContextualInstance<?>>());
}
/**
@@ -50,7 +50,7 @@
* @param key The key to store the instance under
* @param contextualInstance The instance to store
*/
- public <T> void addDependentInstance(ContexutalInstance<T> contextualInstance)
+ public <T> void addDependentInstance(ContextualInstance<T> contextualInstance)
{
log.trace("Registered dependent instance #0", contextualInstance);
dependentInstances.add(contextualInstance);
@@ -64,13 +64,13 @@
public void destroyDependentInstances()
{
log.trace("Destroying dependent instances");
- for (ContexutalInstance<?> injectedInstance : dependentInstances)
+ for (ContextualInstance<?> injectedInstance : dependentInstances)
{
destroy(injectedInstance);
}
}
- private static <T> void destroy(ContexutalInstance<T> beanInstance)
+ private static <T> void destroy(ContextualInstance<T> beanInstance)
{
beanInstance.getContextual().destroy(beanInstance.getInstance(), beanInstance.getCreationalContext());
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/AbstractAttributeBackedBeanStore.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/AbstractAttributeBackedBeanStore.java 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/AbstractAttributeBackedBeanStore.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -26,7 +26,7 @@
import org.jboss.webbeans.Container;
import org.jboss.webbeans.ContextualIdStore;
import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.context.api.ContexutalInstance;
+import org.jboss.webbeans.context.api.ContextualInstance;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
import org.jboss.webbeans.util.Names;
@@ -50,11 +50,11 @@
* @return The instance
*/
@SuppressWarnings("unchecked")
- public <T> ContexutalInstance<T> get(Contextual<? extends T> contextual)
+ public <T> ContextualInstance<T> get(Contextual<? extends T> contextual)
{
Integer contextualId = Container.instance().deploymentServices().get(ContextualIdStore.class).getId(contextual);
String key = getNamingScheme().getKeyFromId(contextualId);
- ContexutalInstance<T> instance = (ContexutalInstance<T>) getAttribute(key);
+ ContextualInstance<T> instance = (ContextualInstance<T>) getAttribute(key);
log.trace("Looked for " + key + " and got " + instance);
return instance;
}
@@ -131,7 +131,7 @@
* @param instance The instance
* @return The instance added
*/
- public <T> void put(ContexutalInstance<T> beanInstance)
+ public <T> void put(ContextualInstance<T> beanInstance)
{
Integer contextualId = Container.instance().deploymentServices().get(ContextualIdStore.class).getId(beanInstance.getContextual());
String key = getNamingScheme().getKeyFromId(contextualId);
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/HashMapBeanStore.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/HashMapBeanStore.java 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/beanstore/HashMapBeanStore.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -23,7 +23,7 @@
import javax.enterprise.context.spi.Contextual;
-import org.jboss.webbeans.context.api.ContexutalInstance;
+import org.jboss.webbeans.context.api.ContextualInstance;
import org.jboss.webbeans.context.api.helpers.AbstractMapBackedBeanStore;
/**
@@ -37,14 +37,14 @@
private static final long serialVersionUID = 4770689245633688471L;
// The backing map
- protected Map<Contextual<? extends Object>, ContexutalInstance<? extends Object>> delegate;
+ protected Map<Contextual<? extends Object>, ContextualInstance<? extends Object>> delegate;
/**
* Constructor
*/
public HashMapBeanStore()
{
- delegate = new HashMap<Contextual<? extends Object>, ContexutalInstance<? extends Object>>();
+ delegate = new HashMap<Contextual<? extends Object>, ContextualInstance<? extends Object>>();
}
/**
@@ -53,7 +53,7 @@
* @return The delegate
*/
@Override
- public Map<Contextual<? extends Object>, ContexutalInstance<? extends Object>> delegate()
+ public Map<Contextual<? extends Object>, ContextualInstance<? extends Object>> delegate()
{
return delegate;
}
Modified: ri/trunk/jboss-as/build.properties
===================================================================
--- ri/trunk/jboss-as/build.properties 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/jboss-as/build.properties 2009-09-29 04:29:31 UTC (rev 3796)
@@ -1,5 +1,5 @@
# Container a number of properties associated with installing Web Beans into JBoss AS and running the TCK in JBoss AS
-#jboss.home=/Applications/jboss-5.2.0.Beta1
+jboss.home=/home/shane/apps/jboss
org.jboss.testharness.container.javaOpts=-Xms128m -Xmx384m -XX:MaxPermSize=128m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
# time to allow before attempting to restart JBoss AS
Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/BeanStore.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/BeanStore.java 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/BeanStore.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -36,7 +36,7 @@
* @param contextual The contextual whose instance is to be return
* @return The instance. Null if not found
*/
- public abstract <T> ContexutalInstance<T> get(Contextual<? extends T> contextual);
+ public abstract <T> ContextualInstance<T> get(Contextual<? extends T> contextual);
/**
* Clears the store of contextual instances
@@ -56,5 +56,5 @@
* @param contextualInstance the contextual instance
* @return The instance added
*/
- public abstract <T> void put(ContexutalInstance<T> contextualInstance);
+ public abstract <T> void put(ContextualInstance<T> contextualInstance);
}
\ No newline at end of file
Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContextualInstance.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContextualInstance.java (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContextualInstance.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.context.api;
+
+import javax.enterprise.context.spi.Contextual;
+import javax.enterprise.context.spi.CreationalContext;
+
+public interface ContextualInstance<T>
+{
+
+ public T getInstance();
+
+ public CreationalContext<T> getCreationalContext();
+
+ public Contextual<T> getContextual();
+}
Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContexutalInstance.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContexutalInstance.java 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContexutalInstance.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -1,15 +0,0 @@
-package org.jboss.webbeans.context.api;
-
-import javax.enterprise.context.spi.Contextual;
-import javax.enterprise.context.spi.CreationalContext;
-
-public interface ContexutalInstance<T>
-{
-
- public T getInstance();
-
- public CreationalContext<T> getCreationalContext();
-
- public Contextual<T> getContextual();
-
-}
Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/AbstractMapBackedBeanStore.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/AbstractMapBackedBeanStore.java 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/AbstractMapBackedBeanStore.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -5,7 +5,7 @@
import javax.enterprise.context.spi.Contextual;
-import org.jboss.webbeans.context.api.ContexutalInstance;
+import org.jboss.webbeans.context.api.ContextualInstance;
import org.jboss.webbeans.context.api.BeanStore;
public abstract class AbstractMapBackedBeanStore implements BeanStore
@@ -16,7 +16,7 @@
super();
}
- public abstract Map<Contextual<? extends Object>, ContexutalInstance<? extends Object>> delegate();
+ public abstract Map<Contextual<? extends Object>, ContextualInstance<? extends Object>> delegate();
/**
* Gets an instance from the store
@@ -26,10 +26,10 @@
*
* @see org.jboss.webbeans.context.api.BeanStore#get(BaseBean)
*/
- public <T extends Object> ContexutalInstance<T> get(Contextual<? extends T> bean)
+ public <T extends Object> ContextualInstance<T> get(Contextual<? extends T> bean)
{
@SuppressWarnings("unchecked")
- ContexutalInstance<T> instance = (ContexutalInstance<T>) delegate().get(bean);
+ ContextualInstance<T> instance = (ContextualInstance<T>) delegate().get(bean);
return instance;
}
@@ -63,7 +63,7 @@
*
* @see org.jboss.webbeans.context.api.BeanStore#put(Contextual, Object)
*/
- public <T> void put(ContexutalInstance<T> beanInstance)
+ public <T> void put(ContextualInstance<T> beanInstance)
{
delegate().put(beanInstance.getContextual(), beanInstance);
}
Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ConcurrentHashMapBeanStore.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ConcurrentHashMapBeanStore.java 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ConcurrentHashMapBeanStore.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -23,7 +23,7 @@
import javax.enterprise.context.spi.Contextual;
-import org.jboss.webbeans.context.api.ContexutalInstance;
+import org.jboss.webbeans.context.api.ContextualInstance;
/**
* A BeanStore that uses a HashMap as backing storage
@@ -36,14 +36,14 @@
private static final long serialVersionUID = 4770689245633688471L;
// The backing map
- protected Map<Contextual<? extends Object>, ContexutalInstance<? extends Object>> delegate;
+ protected Map<Contextual<? extends Object>, ContextualInstance<? extends Object>> delegate;
/**
* Constructor
*/
public ConcurrentHashMapBeanStore()
{
- delegate = new ConcurrentHashMap<Contextual<? extends Object>, ContexutalInstance<? extends Object>>();
+ delegate = new ConcurrentHashMap<Contextual<? extends Object>, ContextualInstance<? extends Object>>();
}
/**
@@ -52,7 +52,7 @@
* @return The delegate
*/
@Override
- public Map<Contextual<? extends Object>, ContexutalInstance<? extends Object>> delegate()
+ public Map<Contextual<? extends Object>, ContextualInstance<? extends Object>> delegate()
{
return delegate;
}
Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ForwardingBeanStore.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ForwardingBeanStore.java 2009-09-28 21:46:57 UTC (rev 3795)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ForwardingBeanStore.java 2009-09-29 04:29:31 UTC (rev 3796)
@@ -5,7 +5,7 @@
import javax.enterprise.context.spi.Contextual;
import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.context.api.ContexutalInstance;
+import org.jboss.webbeans.context.api.ContextualInstance;
public abstract class ForwardingBeanStore implements BeanStore
{
@@ -17,7 +17,7 @@
delegate().clear();
}
- public <T> ContexutalInstance<T> get(Contextual<? extends T> bean)
+ public <T> ContextualInstance<T> get(Contextual<? extends T> bean)
{
return delegate().get(bean);
}
@@ -27,7 +27,7 @@
return delegate().getContextuals();
}
- public <T> void put(ContexutalInstance<T> beanInstance)
+ public <T> void put(ContextualInstance<T> beanInstance)
{
delegate().put(beanInstance);
}
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3795 - in examples/trunk/wicket/numberguess: src/main/java/org/jboss/webbeans/examples/wicket and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: cpopetz
Date: 2009-09-28 17:46:57 -0400 (Mon, 28 Sep 2009)
New Revision: 3795
Added:
examples/trunk/wicket/numberguess/src/main/resources/META-INF/
examples/trunk/wicket/numberguess/src/main/resources/META-INF/beans.xml
Removed:
examples/trunk/wicket/numberguess/src/main/resources/beans.xml
Modified:
examples/trunk/wicket/numberguess/pom.xml
examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Game.java
examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Generator.java
examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/HomePage.java
examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/MaxNumber.java
examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Random.java
Log:
Update for PFD2.
Modified: examples/trunk/wicket/numberguess/pom.xml
===================================================================
--- examples/trunk/wicket/numberguess/pom.xml 2009-09-28 21:44:25 UTC (rev 3794)
+++ examples/trunk/wicket/numberguess/pom.xml 2009-09-28 21:46:57 UTC (rev 3795)
@@ -21,6 +21,11 @@
<artifactId>jsr299-api</artifactId>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ </dependency>
<dependency>
<groupId>org.jboss.webbeans</groupId>
@@ -36,6 +41,11 @@
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.webbeans.servlet</groupId>
+ <artifactId>webbeans-servlet</artifactId>
+ <scope>runtime</scope>
+ </dependency>
<!-- JETTY DEPENDENCIES FOR IN IDE TESTING -->
Modified: examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Game.java
===================================================================
--- examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Game.java 2009-09-28 21:44:25 UTC (rev 3794)
+++ examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Game.java 2009-09-28 21:46:57 UTC (rev 3795)
@@ -6,11 +6,9 @@
import javax.annotation.PostConstruct;
import javax.enterprise.context.SessionScoped;
import javax.enterprise.inject.Instance;
-import javax.enterprise.inject.Named;
-import javax.inject.Obtains;
+import javax.inject.Inject;
import javax.naming.NamingException;
-@Named
@SessionScoped
public class Game implements Serializable
{
@@ -19,13 +17,16 @@
private int guess;
private int smallest;
+ @Inject
@MaxNumber
private int maxNumber;
private int biggest;
private int remainingGuesses;
- @Obtains @Random Instance<Integer> randomNumber;
+ @Inject
+ @Random
+ Instance<Integer> randomNumber;
public Game() throws NamingException {}
@@ -74,6 +75,9 @@
}
+ @Inject
+ Generator generator;
+
@PostConstruct
public void reset()
{
Modified: examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Generator.java
===================================================================
--- examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Generator.java 2009-09-28 21:44:25 UTC (rev 3794)
+++ examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Generator.java 2009-09-28 21:46:57 UTC (rev 3795)
@@ -7,6 +7,7 @@
import javax.enterprise.inject.Produces;
+
@ApplicationScoped
public class Generator implements Serializable
{
Modified: examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/HomePage.java
===================================================================
--- examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/HomePage.java 2009-09-28 21:44:25 UTC (rev 3794)
+++ examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/HomePage.java 2009-09-28 21:46:57 UTC (rev 3795)
@@ -1,7 +1,9 @@
package org.jboss.webbeans.examples.wicket;
-import javax.enterprise.inject.Current;
+import java.io.Serializable;
+import javax.inject.Inject;
+
import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
@@ -16,7 +18,8 @@
private static final long serialVersionUID = 1L;
- @Current Game game;
+ @Inject
+ Game game;
public HomePage() {
@@ -27,7 +30,8 @@
final Component prompt = new Label("prompt", new Model() {
@Override
- public Object getObject() {
+ public Serializable getObject()
+ {
return "I'm thinking of a number between " + game.getSmallest() + " and " + game.getBiggest() +
". You have " + game.getRemainingGuesses() + " guesses.";
}
@@ -37,7 +41,8 @@
final Component guessLabel = new Label("guessLabel","Your Guess:");
form.add(guessLabel);
final Component inputGuess = new TextField("inputGuess",new Model() {
- public Object getObject() {
+ public Serializable getObject()
+ {
return game.getGuess();
}
public void setObject(Object object) {
@@ -55,6 +60,12 @@
guessLabel.setVisible(false);
inputGuess.setVisible(false);
}
+ else if (game.getRemainingGuesses() == 0) {
+ info("Sorry, the answer was " + game.getNumber());
+ setVisible(false);
+ guessLabel.setVisible(false);
+ inputGuess.setVisible(false);
+ }
else if (game.getNumber() > game.getGuess())
info("Higher!");
else if (game.getNumber() < game.getGuess())
Modified: examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/MaxNumber.java
===================================================================
--- examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/MaxNumber.java 2009-09-28 21:44:25 UTC (rev 3794)
+++ examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/MaxNumber.java 2009-09-28 21:46:57 UTC (rev 3795)
@@ -11,12 +11,13 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.BindingType;
+import javax.inject.Qualifier;
+
@Target( { TYPE, METHOD, PARAMETER, FIELD })
@Retention(RUNTIME)
@Documented
-@BindingType
+@Qualifier
public @interface MaxNumber
{
Modified: examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Random.java
===================================================================
--- examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Random.java 2009-09-28 21:44:25 UTC (rev 3794)
+++ examples/trunk/wicket/numberguess/src/main/java/org/jboss/webbeans/examples/wicket/Random.java 2009-09-28 21:46:57 UTC (rev 3795)
@@ -11,12 +11,13 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.BindingType;
+import javax.inject.Qualifier;
+
@Target( { TYPE, METHOD, PARAMETER, FIELD })
@Retention(RUNTIME)
@Documented
-@BindingType
+@Qualifier
public @interface Random
{
Copied: examples/trunk/wicket/numberguess/src/main/resources/META-INF/beans.xml (from rev 3781, examples/trunk/wicket/numberguess/src/main/resources/beans.xml)
===================================================================
Deleted: examples/trunk/wicket/numberguess/src/main/resources/beans.xml
===================================================================
15 years, 4 months