[webbeans-commits] Webbeans SVN: r2846 - extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/tomcat.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-17 19:17:36 -0400 (Wed, 17 Jun 2009)
New Revision: 2846
Modified:
extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/tomcat/WebBeansAnnotationProcessor.java
Log:
comment out broken code, add correct use of API in comment
uncomment code once correct API is implemented
Modified: extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/tomcat/WebBeansAnnotationProcessor.java
===================================================================
--- extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/tomcat/WebBeansAnnotationProcessor.java 2009-06-17 17:23:43 UTC (rev 2845)
+++ extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/tomcat/WebBeansAnnotationProcessor.java 2009-06-17 23:17:36 UTC (rev 2846)
@@ -19,7 +19,10 @@
public void processAnnotations(Object instance) throws IllegalAccessException, InvocationTargetException, NamingException
{
- manager.injectNonContextualInstance(instance);
+ //FIXME disabled as this method is being reimplemented
+ //manager.createInjectionTarget(instance.getClass()).inject(instance, manager.createCreationalContext());
+ // replaces
+ //manager.injectNonContextualInstance(instance);
}
public void postConstruct(Object arg0) throws IllegalAccessException, InvocationTargetException
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2845 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/context/application and 13 other directories.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-17 13:23:43 -0400 (Wed, 17 Jun 2009)
New Revision: 2845
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/TestFilter.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/TestFilter.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/TestFilter.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/ResolvedIncompatibleStereotypesTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/Scallop.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/DefaultNamedTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/FallowDeer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/StereotypeWithEmptyNamed.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/Deer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/ResolvedMultipleStereotypesWithMultipleScopeTypesTest.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/beans.xml
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/FilterTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/FilterTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/FilterTest.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/GetOnInactiveContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/IncompatibleStereotypesTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/Scallop_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/tooMany/BeanWithTooManyScopeTypes_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/tooMany/TooManyScopesTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleDeploymentTypes/MultipleStereotypesWithMultipleDeploymentTypesTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/MultipleStereotypesWithMultipleScopeTypesTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/nonEmptyNamed/NonEmptyNamedTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
Log:
align select TCK tests to 20090519 spec
rename FilterTest to TestFilter to reflect its purpose as a fixture
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-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -82,7 +82,7 @@
}
@Test(groups = { "contexts" })
- @SpecAssertion(section = "unknown", id = "unknown")
+ @SpecAssertion(section = "unknown", id = "unknown") // combination of 2.4.1 and 11.3.18
//@SpecAssertion(section = "8.5", id = "a")
public void testBuiltInContexts()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetOnInactiveContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetOnInactiveContextTest.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetOnInactiveContextTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -10,6 +10,9 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.testng.annotations.Test;
+/**
+ * Spec version: 20090519
+ */
@Artifact
public class GetOnInactiveContextTest extends AbstractJSR299Test
{
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/FilterTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/FilterTest.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/FilterTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -1,55 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.application;
-
-import java.io.IOException;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Current;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.naming.InitialContext;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-public class FilterTest implements Filter
-{
- @Current
- private BeanManager jsr299Manager;
-
- public void destroy()
- {
- jsr299Manager = null;
- }
-
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
- {
- if (!jsr299Manager.getContext(ApplicationScoped.class).isActive())
- {
- throw new ServletException("Application context is not active");
- }
- else
- {
- chain.doFilter(request, response);
- }
- }
-
- public void init(FilterConfig filterConfig) throws ServletException
- {
- //TODO Remove init code once injection works in servlet container
- try
- {
- if (jsr299Manager == null)
- {
- InitialContext ic = new InitialContext();
- jsr299Manager = (BeanManager) ic.lookup("java:app/Manager");
- }
- }
- catch (Exception e)
- {
- throw new ServletException("Error looking up manager", e);
- }
- }
-
-}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/TestFilter.java (from rev 2834, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/FilterTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/TestFilter.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/TestFilter.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -0,0 +1,55 @@
+package org.jboss.jsr299.tck.tests.context.application;
+
+import java.io.IOException;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Current;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.naming.InitialContext;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+public class TestFilter implements Filter
+{
+ @Current
+ private BeanManager jsr299Manager;
+
+ public void destroy()
+ {
+ jsr299Manager = null;
+ }
+
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
+ {
+ if (!jsr299Manager.getContext(ApplicationScoped.class).isActive())
+ {
+ throw new ServletException("Application context is not active");
+ }
+ else
+ {
+ chain.doFilter(request, response);
+ }
+ }
+
+ public void init(FilterConfig filterConfig) throws ServletException
+ {
+ //TODO Remove init code once injection works in servlet container
+ try
+ {
+ if (jsr299Manager == null)
+ {
+ InitialContext ic = new InitialContext();
+ jsr299Manager = (BeanManager) ic.lookup("java:app/Manager");
+ }
+ }
+ catch (Exception e)
+ {
+ throw new ServletException("Error looking up manager", e);
+ }
+ }
+
+}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/FilterTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/FilterTest.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/FilterTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -1,55 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.request;
-
-import java.io.IOException;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Current;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.naming.InitialContext;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-public class FilterTest implements Filter
-{
- @Current
- private BeanManager jsr299Manager;
-
- public void destroy()
- {
- jsr299Manager = null;
- }
-
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
- {
- if (!jsr299Manager.getContext(ApplicationScoped.class).isActive())
- {
- throw new ServletException("Application context is not active");
- }
- else
- {
- chain.doFilter(request, response);
- }
- }
-
- public void init(FilterConfig filterConfig) throws ServletException
- {
- //TODO Remove init code once injection works in servlet container
- try
- {
- if (jsr299Manager == null)
- {
- InitialContext ic = new InitialContext();
- jsr299Manager = (BeanManager) ic.lookup("java:app/Manager");
- }
- }
- catch (Exception e)
- {
- throw new ServletException("Error looking up manager", e);
- }
- }
-
-}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/TestFilter.java (from rev 2834, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/FilterTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/TestFilter.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/TestFilter.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -0,0 +1,55 @@
+package org.jboss.jsr299.tck.tests.context.request;
+
+import java.io.IOException;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Current;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.naming.InitialContext;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+public class TestFilter implements Filter
+{
+ @Current
+ private BeanManager jsr299Manager;
+
+ public void destroy()
+ {
+ jsr299Manager = null;
+ }
+
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
+ {
+ if (!jsr299Manager.getContext(ApplicationScoped.class).isActive())
+ {
+ throw new ServletException("Application context is not active");
+ }
+ else
+ {
+ chain.doFilter(request, response);
+ }
+ }
+
+ public void init(FilterConfig filterConfig) throws ServletException
+ {
+ //TODO Remove init code once injection works in servlet container
+ try
+ {
+ if (jsr299Manager == null)
+ {
+ InitialContext ic = new InitialContext();
+ jsr299Manager = (BeanManager) ic.lookup("java:app/Manager");
+ }
+ }
+ catch (Exception e)
+ {
+ throw new ServletException("Error looking up manager", e);
+ }
+ }
+
+}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/FilterTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/FilterTest.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/FilterTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -1,55 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.session;
-
-import java.io.IOException;
-
-import javax.enterprise.context.SessionScoped;
-import javax.enterprise.inject.Current;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.naming.InitialContext;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-public class FilterTest implements Filter
-{
- @Current
- private BeanManager jsr299Manager;
-
- public void destroy()
- {
- jsr299Manager = null;
- }
-
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
- {
- if (!jsr299Manager.getContext(SessionScoped.class).isActive())
- {
- throw new ServletException("Session is not active");
- }
- else
- {
- chain.doFilter(request, response);
- }
- }
-
- public void init(FilterConfig filterConfig) throws ServletException
- {
- //TODO Remove init code once injection works in servlet container
- try
- {
- if (jsr299Manager == null)
- {
- InitialContext ic = new InitialContext();
- jsr299Manager = (BeanManager) ic.lookup("java:app/Manager");
- }
- }
- catch (Exception e)
- {
- throw new ServletException("Error looking up manager", e);
- }
- }
-
-}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/TestFilter.java (from rev 2834, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/FilterTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/TestFilter.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/TestFilter.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -0,0 +1,55 @@
+package org.jboss.jsr299.tck.tests.context.session;
+
+import java.io.IOException;
+
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.inject.Current;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.naming.InitialContext;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+public class TestFilter implements Filter
+{
+ @Current
+ private BeanManager jsr299Manager;
+
+ public void destroy()
+ {
+ jsr299Manager = null;
+ }
+
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
+ {
+ if (!jsr299Manager.getContext(SessionScoped.class).isActive())
+ {
+ throw new ServletException("Session is not active");
+ }
+ else
+ {
+ chain.doFilter(request, response);
+ }
+ }
+
+ public void init(FilterConfig filterConfig) throws ServletException
+ {
+ //TODO Remove init code once injection works in servlet container
+ try
+ {
+ if (jsr299Manager == null)
+ {
+ InitialContext ic = new InitialContext();
+ jsr299Manager = (BeanManager) ic.lookup("java:app/Manager");
+ }
+ }
+ catch (Exception e)
+ {
+ throw new ServletException("Error looking up manager", e);
+ }
+ }
+
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/IncompatibleStereotypesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/IncompatibleStereotypesTest.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/IncompatibleStereotypesTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -5,20 +5,22 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
-@Artifact
+/**
+ * Spec version: 20090519
+ */
+@Artifact(addCurrentPackage = false)
+@Classes( { AnimalStereotype.class, FishStereotype.class, Scallop_Broken.class })
@ExpectedDeploymentException(DefinitionException.class)
public class IncompatibleStereotypesTest extends AbstractJSR299Test
{
-
-
- @Test
- @SpecAssertion(section="2.4.5", id = "d")
+ @Test
+ @SpecAssertion(section = "2.4.4", id = "da")
public void testMutipleIncompatibleScopeStereotypes()
{
assert false;
}
-
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/ResolvedIncompatibleStereotypesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/ResolvedIncompatibleStereotypesTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/ResolvedIncompatibleStereotypesTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -0,0 +1,23 @@
+package org.jboss.jsr299.tck.tests.definition.scope.incompatibleStereotypes;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Classes;
+import org.testng.annotations.Test;
+
+/**
+ * Spec version: 20090519
+ */
+@Artifact(addCurrentPackage = false)
+@Classes( { AnimalStereotype.class, FishStereotype.class, Scallop.class })
+public class ResolvedIncompatibleStereotypesTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertions( { @SpecAssertion(section = "2.4.4", id = "da"), @SpecAssertion(section = "2.4.4", id = "e") })
+ public void testMutipleIncompatibleScopeStereotypesWithOverride()
+ {
+ assert true;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/Scallop.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/Scallop.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/Scallop.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.definition.scope.incompatibleStereotypes;
+
+import javax.enterprise.context.RequestScoped;
+
+/**
+ * This bean definition is valid because it declares two stereotypes that have
+ * different default scopes yet the bean explictly defines a scope to resolve
+ * the conflict.
+ */
+@AnimalStereotype
+@FishStereotype
+@RequestScoped
+class Scallop
+{
+
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/Scallop_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/Scallop_Broken.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/incompatibleStereotypes/Scallop_Broken.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -1,6 +1,10 @@
package org.jboss.jsr299.tck.tests.definition.scope.incompatibleStereotypes;
-
+/**
+ * This bean definition is invalid because it declares two stereotypes
+ * that have different default scopes and the bean does not explictly
+ * define a scope to resolve the conflict.
+ */
@AnimalStereotype
@FishStereotype
class Scallop_Broken
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/tooMany/BeanWithTooManyScopeTypes_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/tooMany/BeanWithTooManyScopeTypes_Broken.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/tooMany/BeanWithTooManyScopeTypes_Broken.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -7,5 +7,4 @@
@ConversationScoped
class BeanWithTooManyScopeTypes_Broken
{
-
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/tooMany/TooManyScopesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/tooMany/TooManyScopesTest.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/tooMany/TooManyScopesTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -8,16 +8,19 @@
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
+/**
+ * Spec version: 20090519
+ */
@Artifact
@ExpectedDeploymentException(DefinitionException.class)
public class TooManyScopesTest extends AbstractJSR299Test
{
-
- @Test
- @SpecAssertion(section="2.4.3", id = "b")
+
+ @Test
+ @SpecAssertion(section = "2.4.3", id = "ba")
public void testTooManyScopesSpecifiedInJava()
{
assert false;
}
-
+
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/DefaultNamedTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/DefaultNamedTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/DefaultNamedTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -0,0 +1,27 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.defaultNamed;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.testng.annotations.Test;
+
+/**
+ * Spec version: 20090519
+ */
+@Artifact
+public class DefaultNamedTest extends AbstractJSR299Test
+{
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "2.7.1.3", id = "b"),
+ @SpecAssertion(section = "2.6.2", id = "e")
+ })
+ public void testStereotypeWithEmptyNamed()
+ {
+ assert getBeans(FallowDeer.class).size() == 1;
+ assert "fallowDeer".equals(getBeans(FallowDeer.class).iterator().next().getName());
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/FallowDeer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/FallowDeer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/FallowDeer.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.defaultNamed;
+
+
+@StereotypeWithEmptyNamed
+class FallowDeer
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/StereotypeWithEmptyNamed.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/StereotypeWithEmptyNamed.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/StereotypeWithEmptyNamed.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.defaultNamed;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.Named;
+import javax.enterprise.inject.Stereotype;
+
+@Stereotype
+@Target( { TYPE })
+@Retention(RUNTIME)
+@Named
+@interface StereotypeWithEmptyNamed
+{
+
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -12,8 +12,7 @@
import org.testng.annotations.Test;
/**
- *
- * Spec version: PRD2
+ * Spec version: 20090519
*/
@IntegrationTest
@Artifact
@@ -31,20 +30,20 @@
@SpecAssertion(section = "4.1", id = "ak")
public void testStereotypeDeclaredInheritedIsIndirectlyInherited()
{
- assert getBeans(EnglishBorderCollieLocal.class).iterator().next().getScopeType().equals(RequestScoped.class);
- }
+ assert getBeans(EnglishBorderCollieLocal.class).iterator().next().getScopeType().equals(RequestScoped.class);
+ }
@Test
@SpecAssertion(section = "4.1", id = "dba")
public void testStereotypeScopeIsOverriddenByInheritedScope()
{
- assert getBeans(ChihuahuaLocal.class).iterator().next().getScopeType().equals(SessionScoped.class);
+ assert getBeans(ChihuahuaLocal.class).iterator().next().getScopeType().equals(SessionScoped.class);
}
@Test
@SpecAssertion(section = "4.1", id = "dda")
public void testStereotypeScopeIsOverriddenByIndirectlyInheritedScope()
{
- assert getBeans(MexicanChihuahuaLocal.class).iterator().next().getScopeType().equals(SessionScoped.class);
- }
+ assert getBeans(MexicanChihuahuaLocal.class).iterator().next().getScopeType().equals(SessionScoped.class);
+ }
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleDeploymentTypes/MultipleStereotypesWithMultipleDeploymentTypesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleDeploymentTypes/MultipleStereotypesWithMultipleDeploymentTypesTest.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleDeploymentTypes/MultipleStereotypesWithMultipleDeploymentTypesTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -14,10 +14,10 @@
@ExpectedDeploymentException(DefinitionException.class)
public class MultipleStereotypesWithMultipleDeploymentTypesTest extends AbstractJSR299Test
{
-
+ // TODO remove me - I don't think this is needed any more since satisfying restrictions of a stereotype is no longer mentioned in the spec
+ // or if the case isn't cover, this test should ensure that the highest precendence deployment type specified by the stereotypes is choosen
@Test(groups="stub")
- @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"),
- @SpecAssertion(section = "2.7.4", id = "c") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"), @SpecAssertion(section = "2.5.4", id = "da") })
public void testMultipleStereotypesWithMultipleDeploymentTypes()
{
assert false;
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/Deer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/Deer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/Deer.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.multipleStereotypesWithMultipleScopeTypes;
+
+import javax.enterprise.context.RequestScoped;
+
+
+@ApplicationScopedHornedMammalStereotype
+@SessionScopedHornedMammalStereotype
+@RequestScoped
+public class Deer
+{
+
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/MultipleStereotypesWithMultipleScopeTypesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/MultipleStereotypesWithMultipleScopeTypesTest.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/MultipleStereotypesWithMultipleScopeTypesTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -6,18 +6,24 @@
import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
-@Artifact
+/**
+ * Spec version: 20090519
+ */
+@Artifact(addCurrentPackage = false)
+@Classes( { ApplicationScopedHornedMammalStereotype.class, SessionScopedHornedMammalStereotype.class, Deer_Broken.class })
+@BeansXml("beans.xml")
@ExpectedDeploymentException(DefinitionException.class)
public class MultipleStereotypesWithMultipleScopeTypesTest extends AbstractJSR299Test
{
@Test
- @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"),
- @SpecAssertion(section = "2.7.4", id = "c") })
- public void testMultipleStereotypesWithMultipleScopeTypes()
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"), @SpecAssertion(section = "2.4.4", id = "da") })
+ public void testMultipleStereotypesResultingInMultipleScopeTypes()
{
assert false;
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/ResolvedMultipleStereotypesWithMultipleScopeTypesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/ResolvedMultipleStereotypesWithMultipleScopeTypesTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/ResolvedMultipleStereotypesWithMultipleScopeTypesTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -0,0 +1,28 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.multipleStereotypesWithMultipleScopeTypes;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Classes;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+/**
+ * Spec version: 20090519
+ */
+@Artifact(addCurrentPackage = false)
+@Classes( { ApplicationScopedHornedMammalStereotype.class, SessionScopedHornedMammalStereotype.class, Deer.class })
+@BeansXml("beans.xml")
+public class ResolvedMultipleStereotypesWithMultipleScopeTypesTest extends AbstractJSR299Test
+{
+
+ @Test
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"), @SpecAssertion(section = "2.4.4", id = "e") })
+ public void testOverrideAllDefaultScopesFromMultipleStereotypes()
+ {
+ assert true;
+ }
+
+}
+
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/nonEmptyNamed/NonEmptyNamedTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/nonEmptyNamed/NonEmptyNamedTest.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/nonEmptyNamed/NonEmptyNamedTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -9,16 +9,18 @@
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
+/**
+ * Spec version: 20090519
+ */
@Artifact
@ExpectedDeploymentException(DefinitionException.class)
public class NonEmptyNamedTest extends AbstractJSR299Test
{
-
@Test
@SpecAssertions({
- @SpecAssertion(section = "2.7.1.3", id = "a"),
- @SpecAssertion(section = "2.6.3", id = "e")
+ @SpecAssertion(section = "2.7.1.3", id = "aa"),
+ @SpecAssertion(section = "2.6.2", id = "e")
})
public void testStereotypeWithNonEmptyNamed()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2009-06-17 17:21:15 UTC (rev 2844)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2009-06-17 17:23:43 UTC (rev 2845)
@@ -21,8 +21,8 @@
/**
* Sections
*
- * 6.5. Lifecycle of stateful session beans
- * 6.6. Lifecycle of stateless session and singleton beans
+ * 6.5. Lifecycle of stateful session beans
+ * 6.6. Lifecycle of stateless session and singleton beans
* 6.11. Lifecycle of EJBs
*
* Mostly overlapping with other tests...
@@ -40,7 +40,7 @@
{
@Test(groups = {"enterpriseBeans", "clientProxy", "lifecycle", "integration" })
- @SpecAssertions( {
+ @SpecAssertions( {
@SpecAssertion(section = "3.3.8", id = "a"),
@SpecAssertion(section = "3.3.9", id = "a"),
@SpecAssertion(section = "6", id = "a"),
@@ -62,14 +62,14 @@
assert anotherStadtInstance != stadtInstance : "create() should not return same bean as before";
// Verify that the instance returned is a proxy by checking for all local interfaces
- Set<Class<?>> interfaces = new HashSet<Class<?>>(Arrays.asList(stadtInstance.getClass().getInterfaces()));
+ Set<Class> interfaces = new HashSet<Class>(Arrays.asList(stadtInstance.getClass().getInterfaces()));
assert interfaces.contains(KleinStadt.class);
assert interfaces.contains(SchoeneStadt.class);
}
@Test(groups = { "ri-broken", "enterpriseBeans", "clientProxy", "lifecycle", "integration" })
- @SpecAssertions( {
+ @SpecAssertions( {
@SpecAssertion(section = "3.3.9", id = "b")
})
public void testSerializeSFSB() throws Exception
@@ -132,7 +132,7 @@
assert stadtInstance != null : "Expected instance to be created by container";
// Verify that the instance returned is a proxy by checking for all local interfaces
- Set<Class<?>> interfaces = new HashSet<Class<?>>(Arrays.asList(stadtInstance.getClass().getInterfaces()));
+ Set<Class> interfaces = new HashSet<Class>(Arrays.asList(stadtInstance.getClass().getInterfaces()));
assert interfaces.contains(NeueStadt.class);
assert interfaces.contains(GeschichtslosStadt.class);
}
@@ -182,7 +182,7 @@
}
}.run();
assert OrderProcessor.postConstructCalled;
- }
+ }
@Test
@SpecAssertion(section = "4.2", id = "bad")
@@ -199,7 +199,7 @@
}
}.run();
assert OrderProcessor.postConstructCalled;
- }
+ }
@Test(groups = "ri-broken")
@SpecAssertion(section = "4.2", id = "bbb")
@@ -211,7 +211,7 @@
{
@Override
protected void execute() throws Exception
- {
+ {
Bean<DirectOrderProcessorLocal> bean = getBeans(DirectOrderProcessorLocal.class).iterator().next();
DirectOrderProcessorLocal instance = getInstanceByType(DirectOrderProcessorLocal.class);
destroyAndRemoveBeanInstance(bean, instance);
@@ -230,12 +230,12 @@
{
@Override
protected void execute() throws Exception
- {
+ {
Bean<IndirectOrderProcessor> bean = getBeans(IndirectOrderProcessor.class).iterator().next();
IndirectOrderProcessor instance = getInstanceByType(IndirectOrderProcessor.class);
destroyAndRemoveBeanInstance(bean, instance);
}
}.run();
assert OrderProcessor.preDestroyCalled;
- }
+ }
}
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesWithMultipleScopeTypes/beans.xml 2009-06-17 17:23:43 UTC (rev 2845)
@@ -0,0 +1,8 @@
+<beans>
+ <deploy>
+ <type>javax.enterprise.inject.deployment.Standard</type>
+ <type>javax.enterprise.inject.deployment.Production</type>
+ <type>org.jboss.jsr299.tck.tests.definition.stereotype.multipleStereotypesWithMultipleScopeTypes.ApplicationScopedHornedMammalStereotype</type>
+ <type>org.jboss.jsr299.tck.tests.definition.stereotype.multipleStereotypesWithMultipleScopeTypes.SessionScopedHornedMammalStereotype</type>
+ </deploy>
+</beans>
\ No newline at end of file
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2844 - tck/trunk/impl.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-17 13:21:15 -0400 (Wed, 17 Jun 2009)
New Revision: 2844
Modified:
tck/trunk/impl/pom.xml
Log:
add missing web service client/server dependencies
Modified: tck/trunk/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml 2009-06-17 17:20:30 UTC (rev 2843)
+++ tck/trunk/impl/pom.xml 2009-06-17 17:21:15 UTC (rev 2844)
@@ -73,6 +73,11 @@
</dependency>
<dependency>
+ <groupId>javax.jws</groupId>
+ <artifactId>jsr181-api</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
@@ -287,6 +292,19 @@
</build>
</profile>
- </profiles>
+ <profile>
+ <id>javax.xml.ws</id>
+ <activation>
+ <jdk>1.5</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
</project>
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2843 - tck/trunk.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-17 13:20:30 -0400 (Wed, 17 Jun 2009)
New Revision: 2843
Modified:
tck/trunk/pom.xml
Log:
add versions for missing dependencies
Modified: tck/trunk/pom.xml
===================================================================
--- tck/trunk/pom.xml 2009-06-17 15:58:19 UTC (rev 2842)
+++ tck/trunk/pom.xml 2009-06-17 17:20:30 UTC (rev 2843)
@@ -109,6 +109,11 @@
<version>1.2_10</version>
</dependency>
<dependency>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.webbeans</groupId>
<artifactId>jsr299-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
@@ -138,6 +143,11 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>javax.jws</groupId>
+ <artifactId>jsr181-api</artifactId>
+ <version>1.0-MR1</version>
+ </dependency>
+ <dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2842 - ri/trunk/dist.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-06-17 11:58:19 -0400 (Wed, 17 Jun 2009)
New Revision: 2842
Modified:
ri/trunk/dist/versions.properties
Log:
revert to snapshot
Modified: ri/trunk/dist/versions.properties
===================================================================
--- ri/trunk/dist/versions.properties 2009-06-17 15:39:34 UTC (rev 2841)
+++ ri/trunk/dist/versions.properties 2009-06-17 15:58:19 UTC (rev 2842)
@@ -1,6 +1,6 @@
-jsr299.version=1.0.0.PREVIEW1
-webbeans.version=1.0.0.PREVIEW1
-webbeans.servlet.version=1.0.0.CR1
-webbeans.logger.version=1.0.0.CR1
-webbeans.wicket.version=1.0.0.BETA1
-webbeans.se.version=1.0.0.BETA1
+jsr299.version=1.0.0-SNAPSHOT
+webbeans.version=1.0.0-SNAPSHOT
+webbeans.servlet.version=1.0.0-SNAPSHOT
+webbeans.logger.version=1.0.0-SNAPSHOT
+webbeans.wicket.version=1.0.0-SNAPSHOT
+webbeans.se.version=1.0.0-SNAPSHOT
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2841 - examples/trunk/se/numberguess/src/main/java/org/jboss/webbeans/environment/se/example/numberguess.
by webbeans-commits@lists.jboss.org
Author: peteroyle
Date: 2009-06-17 11:39:34 -0400 (Wed, 17 Jun 2009)
New Revision: 2841
Modified:
examples/trunk/se/numberguess/src/main/java/org/jboss/webbeans/environment/se/example/numberguess/NumberGuessFrame.java
Log:
Brought up to latest spec, observing new manager initialisation events.
Modified: examples/trunk/se/numberguess/src/main/java/org/jboss/webbeans/environment/se/example/numberguess/NumberGuessFrame.java
===================================================================
--- examples/trunk/se/numberguess/src/main/java/org/jboss/webbeans/environment/se/example/numberguess/NumberGuessFrame.java 2009-06-17 15:39:25 UTC (rev 2840)
+++ examples/trunk/se/numberguess/src/main/java/org/jboss/webbeans/environment/se/example/numberguess/NumberGuessFrame.java 2009-06-17 15:39:34 UTC (rev 2841)
@@ -20,7 +20,6 @@
import javax.enterprise.inject.Current;
import javax.enterprise.inject.spi.AfterDeploymentValidation;
-import javax.enterprise.inject.spi.BeanManager;
import javax.event.Observes;
/**
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2840 - examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple.
by webbeans-commits@lists.jboss.org
Author: peteroyle
Date: 2009-06-17 11:39:25 -0400 (Wed, 17 Jun 2009)
New Revision: 2840
Modified:
examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/CommandLineArgsValidator.java
examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/HelloWorld.java
Log:
Brought up to latest spec, observing new manager initialisation events.
Modified: examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/CommandLineArgsValidator.java
===================================================================
--- examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/CommandLineArgsValidator.java 2009-06-17 15:37:44 UTC (rev 2839)
+++ examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/CommandLineArgsValidator.java 2009-06-17 15:39:25 UTC (rev 2840)
@@ -19,8 +19,8 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import javax.context.ApplicationScoped;
-import javax.inject.Initializer;
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Initializer;
import org.jboss.webbeans.environment.se.bindings.Parameters;
/**
Modified: examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/HelloWorld.java
===================================================================
--- examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/HelloWorld.java 2009-06-17 15:37:44 UTC (rev 2839)
+++ examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/HelloWorld.java 2009-06-17 15:39:25 UTC (rev 2840)
@@ -16,10 +16,9 @@
*/
package org.jboss.webbeans.environment.se.example.simple;
+import javax.enterprise.inject.Current;
+import javax.enterprise.inject.spi.AfterDeploymentValidation;
import javax.event.Observes;
-import javax.inject.Current;
-import javax.inject.manager.Deployed;
-import javax.inject.manager.Manager;
/**
* @author Peter Royle
@@ -35,7 +34,7 @@
* @param firstName The first name.
*/
public void printHello( @Observes
- @Deployed Manager manager )
+ AfterDeploymentValidation after )
{
if (!argsVlidator.hasErrors())
{
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2839 - in extensions/trunk/se/src: main/java/org/jboss/webbeans/environment/se/beans and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: peteroyle
Date: 2009-06-17 11:37:44 -0400 (Wed, 17 Jun 2009)
New Revision: 2839
Added:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/util/WebBeansManagerUtils.java
Modified:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java
extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/StartMainTest.java
extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/MainTestBean.java
Log:
Brought up to latest spec, observing new manager initialisation events.
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java 2009-06-16 21:26:33 UTC (rev 2838)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java 2009-06-17 15:37:44 UTC (rev 2839)
@@ -1,6 +1,7 @@
package org.jboss.webbeans.environment.se;
import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Current;
import javax.enterprise.inject.spi.BeanManager;
import javax.event.Observes;
@@ -8,13 +9,15 @@
import org.jboss.webbeans.environment.se.events.Shutdown;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.manager.api.WebBeansManager;
@ApplicationScoped
public class ShutdownManager
{
private static LogProvider log = Logging.getLogProvider(ShutdownManager.class);
-
+ private @Current WebBeansManager manager;
+
private boolean hasShutdownBeenCalled = false;
private Bootstrap bootstrap;
@@ -32,7 +35,7 @@
if (!hasShutdownBeenCalled)
{
- hasShutdownBeenCalled = true;
+ hasShutdownBeenCalled = true;
bootstrap.shutdown();
}
else
@@ -42,6 +45,14 @@
}
}
}
+
+ /**
+ * Shutdown WebBeans SE gracefully (call this as an alternative to firing the
+ * "@Shutdown Manager" event.
+ */
+ public void shutdown() {
+ shutdown(manager);
+ }
public void setBootstrap(Bootstrap bootstrap)
{
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java 2009-06-16 21:26:33 UTC (rev 2838)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java 2009-06-17 15:37:44 UTC (rev 2839)
@@ -25,6 +25,7 @@
import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
import org.jboss.webbeans.environment.se.discovery.SEWebBeanDiscovery;
import org.jboss.webbeans.environment.se.util.Reflections;
+import org.jboss.webbeans.environment.se.util.WebBeansManagerUtils;
import org.jboss.webbeans.manager.api.WebBeansManager;
/**
@@ -56,7 +57,7 @@
this.applicationBeanStore = new ConcurrentHashMapBeanStore();
}
- private void go()
+ public BeanManager go()
{
bootstrap.setEnvironment(Environments.SE);
bootstrap.getServices().add(WebBeanDiscovery.class, new SEWebBeanDiscovery() {});
@@ -64,7 +65,9 @@
bootstrap.initialize();
this.manager = bootstrap.getManager();
bootstrap.boot();
- bootstrap.getManager().getInstanceByType(ShutdownManager.class).setBootstrap(bootstrap);
+ WebBeansManagerUtils.getInstanceByType(manager, ShutdownManager.class).
+ setBootstrap(bootstrap);
+ return this.manager;
}
/**
@@ -75,18 +78,13 @@
*/
public static void main(String[] args)
{
- new StartMain(args).main();
+ new StartMain(args).go();
}
- public BeanManager main()
- {
- go();
- return manager;
- }
-
public static String[] getParameters()
{
// TODO(PR): make immutable
return PARAMETERS;
}
+
}
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java 2009-06-16 21:26:33 UTC (rev 2838)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java 2009-06-17 15:37:44 UTC (rev 2839)
@@ -23,7 +23,7 @@
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
import javax.enterprise.inject.spi.BeforeBeanDiscovery;
import javax.event.Observes;
@@ -86,7 +86,7 @@
*
* @param manager The Manager which has been initialized.
*/
- public void initArgs(@Observes @BeforeBeanDiscovery BeanManager manager) {
+ public void initArgs(@Observes AfterBeanDiscovery after) {
this.setArgs( StartMain.PARAMETERS );
}
}
Added: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/util/WebBeansManagerUtils.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/util/WebBeansManagerUtils.java (rev 0)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/util/WebBeansManagerUtils.java 2009-06-17 15:37:44 UTC (rev 2839)
@@ -0,0 +1,32 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.environment.se.util;
+
+import java.lang.annotation.Annotation;
+import javax.enterprise.inject.spi.BeanManager;
+
+/**
+ *
+ * @author PeteR
+ */
+public class WebBeansManagerUtils {
+
+ public static <T> T getInstanceByType(BeanManager manager, Class<T> type, Annotation... bindings) {
+ return (T)manager.getReference(
+ manager.getBeans(type).iterator().next(), type);
+ }
+}
Modified: extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/StartMainTest.java
===================================================================
--- extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/StartMainTest.java 2009-06-16 21:26:33 UTC (rev 2838)
+++ extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/StartMainTest.java 2009-06-17 15:37:44 UTC (rev 2839)
@@ -23,6 +23,7 @@
import org.jboss.webbeans.environment.se.events.Shutdown;
import org.jboss.webbeans.environment.se.test.beans.MainTestBean;
import org.jboss.webbeans.environment.se.test.beans.ParametersTestBean;
+import org.jboss.webbeans.environment.se.util.WebBeansManagerUtils;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -44,9 +45,9 @@
public void testMain()
{
String[] args = ARGS ;
- BeanManager manager = new StartMain(args).main();
+ BeanManager manager = new StartMain(args).go();
- MainTestBean mainTestBean = manager.getInstanceByType( MainTestBean.class );
+ MainTestBean mainTestBean = WebBeansManagerUtils.getInstanceByType( manager, MainTestBean.class );
Assert.assertNotNull( mainTestBean );
ParametersTestBean paramsBean = mainTestBean.getParametersTestBean();
@@ -60,16 +61,6 @@
Assert.assertEquals( ARGS[2], paramsBean.getParameters().get(2) );
shutdownManager(manager);
- boolean contextNotActive = false;
- try
- {
- assert manager.getInstanceByType(MainTestBean.class) == null;
- }
- catch (Exception e)
- {
- contextNotActive = true;
- }
- assert contextNotActive;
}
/**
@@ -79,9 +70,9 @@
@Test
public void testMainEmptyArgs()
{
- BeanManager manager = new StartMain(ARGS_EMPTY).main();
+ BeanManager manager = new StartMain(ARGS_EMPTY).go();
- MainTestBean mainTestBean = manager.getInstanceByType( MainTestBean.class );
+ MainTestBean mainTestBean = WebBeansManagerUtils.getInstanceByType( manager, MainTestBean.class );
Assert.assertNotNull( mainTestBean );
ParametersTestBean paramsBean = mainTestBean.getParametersTestBean();
Modified: extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/MainTestBean.java
===================================================================
--- extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/MainTestBean.java 2009-06-16 21:26:33 UTC (rev 2838)
+++ extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/MainTestBean.java 2009-06-17 15:37:44 UTC (rev 2839)
@@ -16,16 +16,17 @@
*/
package org.jboss.webbeans.environment.se.test.beans;
+import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Current;
import javax.enterprise.inject.Initializer;
-import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.AfterDeploymentValidation;
import javax.event.Observes;
/**
*
* @author Peter Royle
*/
+@ApplicationScoped
public class MainTestBean
{
@@ -41,7 +42,7 @@
paramsTestBean.getParameters();
}
- public void mainMethod(@Observes @AfterBeanDiscovery BeanManager manager) {
+ public void mainMethod(@Observes AfterDeploymentValidation after) {
System.out.println( "Starting main test app" );
}
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2838 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup: el and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-06-16 17:26:33 -0400 (Tue, 16 Jun 2009)
New Revision: 2838
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/noninstance/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/notypeparam/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/typevariable/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/wildcard/
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInjectionPointBean.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/lookup/injection/InjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/nullableBean/NullableBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
Log:
Additional updates for spec version 05192009 in TCK
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java 2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java 2009-06-16 21:26:33 UTC (rev 2838)
@@ -16,14 +16,15 @@
* Tests for dynamic lookup features
*
* @author Shane Bryzak
+ *
+ * Spec version: 05192009
*/
@Artifact
public class DynamicLookupTest extends AbstractJSR299Test
{
- @Test
+ @Test(groups = "ri-broken")
@SpecAssertions({
- @SpecAssertion(section = "5.8", id ="a"),
- @SpecAssertion(section = "5.8", id ="f")
+ @SpecAssertion(section = "5.5", id ="aa")
})
public void testObtainsInjectsInstanceOfInstance()
{
@@ -35,11 +36,11 @@
assert injectionPoint.getPaymentProcessor() instanceof Instance;
}
- @Test
+ @Test(groups = "ri-broken")
@SpecAssertions({
- @SpecAssertion(section = "5.8", id ="b"),
- @SpecAssertion(section = "5.8", id ="c"),
- @SpecAssertion(section = "5.8", id ="q")
+ @SpecAssertion(section = "5.5", id ="b"),
+ @SpecAssertion(section = "5.5", id ="c"),
+ @SpecAssertion(section = "5.5.1", id ="a")
})
public void testDynamicLookup()
{
@@ -51,8 +52,8 @@
assert injectionPoint.getPaymentProcessor().get() instanceof ChequePaymentProcessor;
}
- @Test(expectedExceptions = DuplicateBindingTypeException.class)
- @SpecAssertion(section = "5.8", id ="d")
+ @Test(groups = "ri-broken", expectedExceptions = DuplicateBindingTypeException.class)
+ @SpecAssertion(section = "5.5.1", id ="d")
public void testDuplicateBindingsThrowsException()
{
Bean<ObtainsInjectionPointBean> injectionPointBean =
@@ -63,8 +64,8 @@
injectionPoint.getPaymentProcessor().get(new PayByBinding() { public PaymentMethod value() { return CHEQUE; }});
}
- @Test(expectedExceptions = IllegalArgumentException.class)
- @SpecAssertion(section = "5.8", id = "e")
+ @Test(groups = "ri-broken", expectedExceptions = IllegalArgumentException.class)
+ @SpecAssertion(section = "5.5.1", id = "e")
public void testNonBindingThrowsException()
{
Bean<ObtainsInjectionPointBean> injectionPointBean =
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInjectionPointBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInjectionPointBean.java 2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInjectionPointBean.java 2009-06-16 21:26:33 UTC (rev 2838)
@@ -3,11 +3,10 @@
import static org.jboss.jsr299.tck.tests.lookup.dynamic.PayBy.PaymentMethod.CHEQUE;
import javax.enterprise.inject.Instance;
-import javax.inject.Obtains;
class ObtainsInjectionPointBean
{
- @Obtains @PayBy(CHEQUE) Instance<PaymentProcessor> paymentProcessor;
+ @PayBy(CHEQUE) Instance<PaymentProcessor> paymentProcessor;
public Instance<PaymentProcessor> getPaymentProcessor()
{
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-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java 2009-06-16 21:26:33 UTC (rev 2838)
@@ -13,27 +13,27 @@
/**
*
- * Spec version: PRD2
+ * Spec version: 05192009
*
*/
@Artifact
public class ResolutionByNameTest extends AbstractJSR299Test
{
- @Test(groups={"stub", "el"}) @SpecAssertion(section="5.10", id = "ab")
+ @Test(groups={"stub", "el"}) @SpecAssertion(section="5.6", id = "aba")
public void testELResolverRegisteredWithJsf()
{
assert false;
}
- @Test(groups={"stub", "el"}) @SpecAssertion(section="5.10", id = "aa")
+ @Test(groups={"stub", "el"}) @SpecAssertion(section="5.6", id = "aaa")
public void testELResolverRegisteredWithServlet()
{
assert false;
}
@Test
- @SpecAssertion(section="5.10", id="c")
+ @SpecAssertion(section="5.6", id="c")
public void testQualifiedNameLookup()
{
assert getCurrentConfiguration().getEl().evaluateValueExpression("#{javax.context.conversation}", Conversation.class) != null;
@@ -42,7 +42,8 @@
@Test(groups = "beanLifecycle")
@SpecAssertions({
- @SpecAssertion(section = "6", id = "h")
+ @SpecAssertion(section = "5.6", id = "bc"),
+ @SpecAssertion(section = "6.5.2", id = "a")
})
public void testContextCreatesNewInstanceForInjection()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java 2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java 2009-06-16 21:26:33 UTC (rev 2838)
@@ -10,7 +10,7 @@
/**
*
- * Spec version: PRD2
+ * Spec version: 05192009
*
*/
@Artifact
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/nullableBean/NullableBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/nullableBean/NullableBeanTest.java 2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/nullableBean/NullableBeanTest.java 2009-06-16 21:26:33 UTC (rev 2838)
@@ -8,6 +8,10 @@
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: 05192009
+ */
@Artifact
@ExpectedDeploymentException(NullableDependencyException.class)
public class NullableBeanTest extends AbstractJSR299Test
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java 2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java 2009-06-16 21:26:33 UTC (rev 2838)
@@ -20,7 +20,6 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
-import java.util.HashSet;
import java.util.Set;
import javax.enterprise.context.Dependent;
@@ -41,14 +40,14 @@
*
* @author David Allen
*
- * Spec version: PRD2
+ * Spec version: 05192009
*/
@Artifact
public class InjectionPointTest extends AbstractJSR299Test
{
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.4.9", id = "a")
+ @SpecAssertion(section = "5.4.9", id = "aa")
public void testGetBean() throws Exception
{
@@ -195,4 +194,82 @@
}
}.run();
}
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertions({
+ @SpecAssertion(section = "5.4.9", id = "e"),
+ @SpecAssertion(section = "2.5.1", id="a")
+ })
+ public void testStandardDeployment() throws Exception
+ {
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ assert getBeans(InjectionPoint.class).size() == 1;
+ assert getBeans(InjectionPoint.class).iterator().next().getDeploymentType().equals(Standard.class);
+ }
+
+ }.run();
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.4.9", id = "e")
+ public void testDependentScope() throws Exception
+ {
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ assert getBeans(InjectionPoint.class).size() == 1;
+ assert getBeans(InjectionPoint.class).iterator().next().getScopeType().equals(Dependent.class);
+ }
+
+ }.run();
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertions({
+ @SpecAssertion(section = "5.4.9", id = "e")
+ })
+ public void testApiTypeInjectionPoint() throws Exception
+ {
+ // Get an instance of the bean which has another bean injected into it
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ FieldInjectionPointBean beanWithInjectedBean = getInstanceByType(FieldInjectionPointBean.class,new CurrentLiteral());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert InjectionPoint.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getClass());
+ }
+ }.run();
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertions({
+ @SpecAssertion(section = "5.4.9", id = "e")
+ })
+ public void testCurrentBinding() throws Exception
+ {
+ // Get an instance of the bean which has another bean injected into it
+ new RunInDependentContext()
+ {
+ @Override
+ protected void execute() throws Exception
+ {
+ FieldInjectionPointBean beanWithInjectedBean = getInstanceByType(FieldInjectionPointBean.class,new CurrentLiteral());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert beanWithInjectionPoint.getInjectedMetadata().getBindings().contains(new CurrentLiteral());
+ }
+ }.run();
+ }
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java 2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java 2009-06-16 21:26:33 UTC (rev 2838)
@@ -15,7 +15,7 @@
/**
*
- * Spec version: PRD2
+ * Spec version: 05192009
*
*/
@Artifact
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java 2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java 2009-06-16 21:26:33 UTC (rev 2838)
@@ -9,6 +9,11 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: 05192009
+ *
+ */
@Artifact
@IntegrationTest
public class ManagerTest extends AbstractJSR299Test
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java 2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java 2009-06-16 21:26:33 UTC (rev 2838)
@@ -20,7 +20,7 @@
/**
*
- * Spec version: PRD2
+ * Spec version: 05192009
*
*/
@Artifact
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2837 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-15 17:54:59 -0400 (Mon, 15 Jun 2009)
New Revision: 2837
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/MagicString.java
Log:
don't use JDK 6 String#isEmpty()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/MagicString.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/MagicString.java 2009-06-15 21:54:43 UTC (rev 2836)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/MagicString.java 2009-06-15 21:54:59 UTC (rev 2837)
@@ -20,11 +20,13 @@
return value.compareToIgnoreCase(str);
}
+ @Override
public boolean equals(Object anObject)
{
return value.equals(anObject);
}
+ @Override
public int hashCode()
{
return value.hashCode();
@@ -32,7 +34,7 @@
public boolean isEmpty()
{
- return value.isEmpty();
+ return value == null || value.length() == 0;
}
public int length()
15 years, 6 months