[webbeans-commits] Webbeans SVN: r3513 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sun Aug 16 05:51:06 EDT 2009
Author: pete.muir at jboss.org
Date: 2009-08-16 05:51:06 -0400 (Sun, 16 Aug 2009)
New Revision: 3513
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/Lazy.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ManagedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java
Log:
Use binding type to ensure correct bean is returned
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java 2009-08-16 09:49:10 UTC (rev 3512)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java 2009-08-16 09:51:06 UTC (rev 3513)
@@ -22,12 +22,13 @@
import java.util.Set;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.spi.Bean;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecAssertions;
import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Packaging;
@@ -70,7 +71,7 @@
})
public void testProduceEjbProxyWithContainerInjections()
{
- Bean<RemoteEjb> remoteEjbBean = getBeans(RemoteEjb.class).iterator().next();
+ Bean<RemoteEjb> remoteEjbBean = getBeans(RemoteEjb.class, new AnnotationLiteral<Lazy>(){}).iterator().next();
CreationalContext<RemoteEjb> remoteEjbCc = getCurrentManager().createCreationalContext(remoteEjbBean);
RemoteEjb instance = remoteEjbBean.create(remoteEjbCc);
assert instance != null;
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/Lazy.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/Lazy.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/Lazy.java 2009-08-16 09:51:06 UTC (rev 3513)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+ at Target( { TYPE, METHOD, PARAMETER, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at BindingType
+ at interface Lazy
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/Lazy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ManagedBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ManagedBean.java 2009-08-16 09:49:10 UTC (rev 3512)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ManagedBean.java 2009-08-16 09:51:06 UTC (rev 3513)
@@ -1,10 +1,9 @@
package org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb;
-import javax.enterprise.inject.Current;
class ManagedBean
{
- private @Current RemoteEjb myEjb;
+ private @Lazy RemoteEjb myEjb;
public RemoteEjb getMyEjb()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java 2009-08-16 09:49:10 UTC (rev 3512)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java 2009-08-16 09:51:06 UTC (rev 3513)
@@ -5,5 +5,5 @@
class ResourceProducer
{
- private @Produces @EJB RemoteEjb remoteEjb;
+ private @Produces @EJB @Lazy RemoteEjb remoteEjb;
}
More information about the weld-commits
mailing list