[webbeans-commits] Webbeans SVN: r1687 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle and 3 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Tue Feb 24 14:59:45 EST 2009


Author: pete.muir at jboss.org
Date: 2009-02-24 14:59:44 -0500 (Tue, 24 Feb 2009)
New Revision: 1687

Added:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Animal.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/AnotherDeploymentType.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidow.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidowConsumer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidowProducer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Broken.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DeadlyAnimal.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DeadlySpider.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DefangedTarantula.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/HighestDeploymentType.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Null.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderConsumer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderConsumerForBrokenProducer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderProducer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderProducer_Broken.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/SpecializedTarantulaProducer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Spider.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/SpiderStereotype.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/StaticTarantulaProducer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Tarantula.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/TarantulaConsumer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/TarantulaProducer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Working.java
   tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/
   tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/
   tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/beans.xml
Removed:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidowConsumer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java
Log:
Fix producer lifecycle tests standalone


Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidowConsumer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidowConsumer.java	2009-02-24 19:30:54 UTC (rev 1686)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidowConsumer.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -1,38 +0,0 @@
-/*
- * 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.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.Current;
-
-/**
- * This simple bean contains an injection point to receive the value of a
- * producer field in another bean.
- * 
- * @author David Allen
- * 
- */
-public class BlackWidowConsumer
-{
-   @Current
-   private BlackWidow injectedSpider;
-
-   public BlackWidow getInjectedSpider()
-   {
-      return injectedSpider;
-   }
-}

Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java	2009-02-24 19:30:54 UTC (rev 1686)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -1,142 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import java.lang.annotation.Annotation;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import javax.inject.IllegalProductException;
-import javax.inject.Production;
-import javax.inject.Standard;
-
-import org.hibernate.tck.annotations.SpecAssertion;
-import org.hibernate.tck.annotations.SpecAssertions;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.jboss.jsr299.tck.impl.packaging.Artifact;
-import org.testng.annotations.Test;
-
-/**
- * 
- * Spec version: PRD2
- *
- */
- at Artifact
-public class ProducerFieldLifecycleTest extends AbstractDeclarativeTest
-{
-   /*
-    * (non-Javadoc)
-    * 
-    * @see org.jboss.webbeans.tck.AbstractTest#getEnabledDeploymentTypes()
-    */
-   @SuppressWarnings("unchecked")
-   @Override
-   protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
-   {
-      // Add a local deployment type used in tests
-      return Collections.unmodifiableList(Arrays.asList(Standard.class, Production.class, AnotherDeploymentType.class, HighestDeploymentType.class));
-   }
-
-   @Test(groups = { "producerField" })
-   @SpecAssertions({
-      @SpecAssertion(section = "6.8", id = "h"),
-      @SpecAssertion(section = "3.5", id = "b")
-   })
-   public void testProducerStaticFieldBean()
-   {
-      new RunInDependentContext()
-      {
-
-         @Override
-         protected void execute() throws Exception
-         {
-            TarantulaConsumer tarantulaConsumer = getCurrentManager().getInstanceByType(TarantulaConsumer.class);
-            assert tarantulaConsumer.getConsumedTarantula().equals(StaticTarantulaProducer.produceTarantula);
-         }
-      };
-   }
-
-   @Test(groups = { "producerField" })
-   @SpecAssertions({
-     @SpecAssertion(section = "6.8", id = "k"),
-     @SpecAssertion(section = "6.8", id = "l"),
-     @SpecAssertion(section = "6", id = "c"),
-     @SpecAssertion(section = "6.8", id = "a"),
-     @SpecAssertion(section = "6.8", id = "g")
-   })
-   public void testProducerFieldBeanCreate() throws Exception
-   {
-      new RunInDependentContext()
-      {
-         @Override
-         protected void execute() throws Exception
-         {
-            BlackWidowConsumer spiderConsumer = getCurrentManager().getInstanceByType(BlackWidowConsumer.class);
-            assert spiderConsumer.getInjectedSpider().equals(BlackWidowProducer.blackWidow);
-         }
-      }.run();
-   }
-
-   @Test(groups = { "producerField", "specialization" })
-   @SpecAssertion(section = "6.8", id = "i")
-   public void testSpecializedBeanAlwaysUsed() throws Exception
-   {
-      new RunInDependentContext()
-      {
-         @Override
-         protected void execute() throws Exception
-         {
-            TarantulaConsumer spiderConsumer = getCurrentManager().getInstanceByType(TarantulaConsumer.class);
-            assert spiderConsumer.getConsumedTarantula() != null;
-            assert spiderConsumer.getConsumedTarantula() instanceof DefangedTarantula;
-         }
-      }.run();
-   }
-
-   @Test(groups = { "producerField" })
-   @SpecAssertions({
-      @SpecAssertion(section = "3.5", id = "d"),
-      @SpecAssertion(section = "6.8", id = "m")
-    })    
-   public void testProducerFieldReturnsNullIsDependent() throws Exception
-   {
-      new RunInDependentContext()
-      {
-         @Override
-         protected void execute() throws Exception
-         {
-            NullSpiderConsumer consumerBean = getCurrentManager().getInstanceByType(NullSpiderConsumer.class);
-            assert consumerBean.getInjectedSpider() == null;
-         }
-      }.run();
-   }
-
-   @Test(groups = { "producerField" }, expectedExceptions = IllegalProductException.class)  
-   @SpecAssertions({
-     @SpecAssertion(section = "3.5", id = "e"),
-     @SpecAssertion(section = "6.8", id = "n")
-   })   
-   public void testProducerFieldReturnsNullIsNotDependent() throws Exception
-   {
-      new RunInDependentContext()
-      {
-         @Override
-         protected void execute() throws Exception
-         {
-            NullSpiderConsumer consumer = getCurrentManager().getInstanceByType(NullSpiderConsumer.class);
-            // The injected spider is proxied since it is in the request scope.
-            // So to actually create the bean instance, we need to invoke
-            // some method on the proxy.
-            if (consumer.getInjectedSpider() == null)
-            {
-               // No proxy in this impl, and no exception = fail
-            }
-            else
-            {
-               // Proxy is assumed, so invoke some method
-               consumer.getInjectedSpider().bite();
-            }
-         }
-      }.run();
-   }
-
-}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Animal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Animal.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Animal.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+interface Animal
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Animal.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/AnotherDeploymentType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/AnotherDeploymentType.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/AnotherDeploymentType.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+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.inject.DeploymentType;
+
+ at Target( { TYPE, METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at DeploymentType
+ at interface AnotherDeploymentType
+{
+
+}
\ No newline at end of file


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/AnotherDeploymentType.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidow.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidow.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidow.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+class BlackWidow extends Spider implements DeadlySpider
+{
+   public void bite()
+   {
+      // Test method used for proxy instances to force
+      // creation of the instance.
+   }
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidow.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidowConsumer.java (from rev 1682, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidowConsumer.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidowConsumer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidowConsumer.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,38 @@
+/*
+ * 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.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import javax.inject.Current;
+
+/**
+ * This simple bean contains an injection point to receive the value of a
+ * producer field in another bean.
+ * 
+ * @author David Allen
+ * 
+ */
+public class BlackWidowConsumer
+{
+   @Current
+   private BlackWidow injectedSpider;
+
+   public BlackWidow getInjectedSpider()
+   {
+      return injectedSpider;
+   }
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidowConsumer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidowProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidowProducer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidowProducer.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import javax.annotation.Named;
+import javax.inject.Produces;
+
+ at AnotherDeploymentType
+public class BlackWidowProducer
+{
+   public static BlackWidow blackWidow = new BlackWidow();
+   @Produces
+   @Named("blackWidow")
+   public BlackWidow produceBlackWidow = blackWidow;
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/BlackWidowProducer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Broken.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Broken.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+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.inject.BindingType;
+
+ at Target( { TYPE, METHOD, PARAMETER, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at BindingType
+ at interface Broken
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Broken.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DeadlyAnimal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DeadlyAnimal.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DeadlyAnimal.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+interface DeadlyAnimal
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DeadlyAnimal.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DeadlySpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DeadlySpider.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DeadlySpider.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+interface DeadlySpider extends DeadlyAnimal
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DeadlySpider.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DefangedTarantula.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DefangedTarantula.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DefangedTarantula.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+class DefangedTarantula extends Tarantula
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/DefangedTarantula.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/HighestDeploymentType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/HighestDeploymentType.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/HighestDeploymentType.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+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.inject.DeploymentType;
+
+ at Target( { TYPE, METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at DeploymentType
+ at interface HighestDeploymentType
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/HighestDeploymentType.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Null.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Null.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Null.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+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.inject.BindingType;
+
+ at Target( { TYPE, METHOD, PARAMETER, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at BindingType
+ at interface Null
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Null.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderConsumer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderConsumer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderConsumer.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,39 @@
+/*
+ * 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.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import java.io.Serializable;
+
+/**
+ * Simple bean that has an injection point for a spider
+ * 
+ * @author David Allen
+ * 
+ */
+public class NullSpiderConsumer implements Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   @Null @Working
+   private BlackWidow injectedSpider;
+
+   public BlackWidow getInjectedSpider()
+   {
+      return injectedSpider;
+   }
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderConsumer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderConsumerForBrokenProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderConsumerForBrokenProducer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderConsumerForBrokenProducer.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,39 @@
+/*
+ * 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.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import java.io.Serializable;
+
+/**
+ * Simple bean that has an injection point for a spider
+ * 
+ * @author David Allen
+ * 
+ */
+public class NullSpiderConsumerForBrokenProducer implements Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   @Null @Broken
+   private BlackWidow injectedSpider;
+
+   public BlackWidow getInjectedSpider()
+   {
+      return injectedSpider;
+   }
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderConsumerForBrokenProducer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderProducer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderProducer.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,35 @@
+/*
+ * 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.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import javax.annotation.Named;
+import javax.inject.Produces;
+
+/**
+ * Contains producer for Spider which always is a null value and
+ * in Dependent scope
+ * 
+ * @author David Allen
+ *
+ */
+ at AnotherDeploymentType
+public class NullSpiderProducer
+{
+   @Produces @Named("blackWidow") @Null @Working public BlackWidow produceBlackWidow = null;
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderProducer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderProducer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderProducer_Broken.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderProducer_Broken.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,36 @@
+/*
+ * 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.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import javax.annotation.Named;
+import javax.context.RequestScoped;
+import javax.inject.Produces;
+
+/**
+ * Bean with a producer field that always returns null and is not
+ * in Dependent context (the produced result)
+ * 
+ * @author David Allen
+ *
+ */
+ at AnotherDeploymentType
+public class NullSpiderProducer_Broken
+{
+   @Produces @RequestScoped @Named("blackWidow") @Null @Broken public BlackWidow produceBlackWidow = null;
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/NullSpiderProducer_Broken.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java (from rev 1682, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,125 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import javax.inject.IllegalProductException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.jboss.jsr299.tck.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+/**
+ * 
+ * Spec version: PRD2
+ *
+ */
+ at Artifact
+ at BeansXml("beans.xml")
+public class ProducerFieldLifecycleTest extends AbstractDeclarativeTest
+{
+
+   @Test(groups = { "producerField" })
+   @SpecAssertions({
+      @SpecAssertion(section = "6.8", id = "h"),
+      @SpecAssertion(section = "3.5", id = "b")
+   })
+   public void testProducerStaticFieldBean()
+   {
+      new RunInDependentContext()
+      {
+
+         @Override
+         protected void execute() throws Exception
+         {
+            TarantulaConsumer tarantulaConsumer = getCurrentManager().getInstanceByType(TarantulaConsumer.class);
+            assert tarantulaConsumer.getConsumedTarantula().equals(StaticTarantulaProducer.produceTarantula);
+         }
+      };
+   }
+
+   @Test(groups = { "producerField" })
+   @SpecAssertions({
+     @SpecAssertion(section = "6.8", id = "k"),
+     @SpecAssertion(section = "6.8", id = "l"),
+     @SpecAssertion(section = "6", id = "c"),
+     @SpecAssertion(section = "6.8", id = "a"),
+     @SpecAssertion(section = "6.8", id = "g")
+   })
+   public void testProducerFieldBeanCreate() throws Exception
+   {
+      new RunInDependentContext()
+      {
+         @Override
+         protected void execute() throws Exception
+         {
+            BlackWidowConsumer spiderConsumer = getCurrentManager().getInstanceByType(BlackWidowConsumer.class);
+            assert spiderConsumer.getInjectedSpider().equals(BlackWidowProducer.blackWidow);
+         }
+      }.run();
+   }
+
+   @Test(groups = { "producerField", "specialization" })
+   @SpecAssertion(section = "6.8", id = "i")
+   public void testSpecializedBeanAlwaysUsed() throws Exception
+   {
+      new RunInDependentContext()
+      {
+         @Override
+         protected void execute() throws Exception
+         {
+            TarantulaConsumer spiderConsumer = getCurrentManager().getInstanceByType(TarantulaConsumer.class);
+            assert spiderConsumer.getConsumedTarantula() != null;
+            assert spiderConsumer.getConsumedTarantula() instanceof DefangedTarantula;
+         }
+      }.run();
+   }
+
+   @Test(groups = { "producerField" })
+   @SpecAssertions({
+      @SpecAssertion(section = "3.5", id = "d"),
+      @SpecAssertion(section = "6.8", id = "m")
+    })    
+   public void testProducerFieldReturnsNullIsDependent() throws Exception
+   {
+      new RunInDependentContext()
+      {
+         @Override
+         protected void execute() throws Exception
+         {
+            NullSpiderConsumer consumerBean = getCurrentManager().getInstanceByType(NullSpiderConsumer.class);
+            assert consumerBean.getInjectedSpider() == null;
+         }
+      }.run();
+   }
+
+   @Test(groups = { "producerField" }, expectedExceptions = IllegalProductException.class)  
+   @SpecAssertions({
+     @SpecAssertion(section = "3.5", id = "e"),
+     @SpecAssertion(section = "6.8", id = "n")
+   })   
+   public void testProducerFieldReturnsNullIsNotDependent() throws Exception
+   {
+      new RunInDependentContext()
+      {
+         @Override
+         protected void execute() throws Exception
+         {
+            NullSpiderConsumerForBrokenProducer consumer = getCurrentManager().getInstanceByType(NullSpiderConsumerForBrokenProducer.class);
+            // The injected spider is proxied since it is in the request scope.
+            // So to actually create the bean instance, we need to invoke
+            // some method on the proxy.
+            if (consumer.getInjectedSpider() == null)
+            {
+               // No proxy in this impl, and no exception = fail
+            }
+            else
+            {
+               // Proxy is assumed, so invoke some method
+               consumer.getInjectedSpider().bite();
+            }
+         }
+      }.run();
+   }
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/SpecializedTarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/SpecializedTarantulaProducer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/SpecializedTarantulaProducer.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,36 @@
+/*
+ * 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.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import javax.inject.Produces;
+import javax.inject.Specializes;
+
+/**
+ * This bean contains a producer field and specializes another bean
+ * which has the same producer field.
+ * 
+ * @author David Allen
+ *
+ */
+ at Specializes
+ at HighestDeploymentType
+public class SpecializedTarantulaProducer extends TarantulaProducer
+{
+   @Produces public Tarantula produceTarantula = new DefangedTarantula();
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/SpecializedTarantulaProducer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Spider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Spider.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Spider.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+class Spider implements Animal
+{
+
+   private static final long serialVersionUID = 1L;
+
+   public void layEggs()
+   {
+      
+   }
+   
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Spider.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/SpiderStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/SpiderStereotype.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/SpiderStereotype.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,49 @@
+/*
+ * 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.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+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.annotation.Named;
+import javax.annotation.Stereotype;
+import javax.context.RequestScoped;
+import javax.inject.Production;
+
+/**
+ * Test stereotype used to change the scope type and deployment type
+ * of another bean, in particular a producer field bean.
+ * 
+ * @author David Allen
+ *
+ */
+ at Stereotype(requiredTypes=Spider.class)
+ at Target( { TYPE, METHOD, FIELD })
+ at Retention(RUNTIME)
+ at RequestScoped
+ at Production
+ at Named
+public @interface SpiderStereotype
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/SpiderStereotype.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/StaticTarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/StaticTarantulaProducer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/StaticTarantulaProducer.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,26 @@
+/*
+ * 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.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import javax.inject.Produces;
+
+public class StaticTarantulaProducer
+{
+   @Produces @SpiderStereotype public static Tarantula produceTarantula = new Tarantula();
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/StaticTarantulaProducer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Tarantula.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Tarantula.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Tarantula.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+class Tarantula extends Spider implements DeadlySpider
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Tarantula.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/TarantulaConsumer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/TarantulaConsumer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/TarantulaConsumer.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,39 @@
+/*
+ * 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.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import javax.inject.Current;
+
+/**
+ * This bean contains an injection point for a Tarantula that must be provided
+ * by the container via a (static) producer field.
+ * 
+ * @author David Allen
+ * 
+ */
+public class TarantulaConsumer
+{
+   @Current
+   private Tarantula consumedTarantula;
+
+   public Tarantula getConsumedTarantula()
+   {
+      return consumedTarantula;
+   }
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/TarantulaConsumer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/TarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/TarantulaProducer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/TarantulaProducer.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+import javax.inject.Produces;
+
+ at AnotherDeploymentType
+public class TarantulaProducer
+{
+   @Produces public Tarantula produceTarantula = new Tarantula();
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/TarantulaProducer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Working.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Working.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Working.java	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle;
+
+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.inject.BindingType;
+
+ at Target( { TYPE, METHOD, PARAMETER, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at BindingType
+ at interface Working
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/Working.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/beans.xml	                        (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/beans.xml	2009-02-24 19:59:44 UTC (rev 1687)
@@ -0,0 +1,9 @@
+<Beans xmlns="urn:java:ee"
+       xmlns:test="urn:java:org.jboss.jsr299.tck.unit.implementation.producer.field.lifecycle"> 
+   <Deploy>
+      <Standard />
+      <Production />
+      <test:AnotherDeploymentType />
+      <test:HighestDeploymentType />
+   </Deploy>
+</Beans>


Property changes on: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/lifecycle/beans.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the weld-commits mailing list