[webbeans-commits] Webbeans SVN: r3818 - in ri/trunk: impl/src/main/java/org/jboss/webbeans and 24 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Wed Sep 30 07:43:25 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-09-30 07:43:24 -0400 (Wed, 30 Sep 2009)
New Revision: 3818

Added:
   ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractApplicationContext.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SingletonContext.java
   ri/trunk/inject-tck-runner/
   ri/trunk/inject-tck-runner/pom.xml
   ri/trunk/inject-tck-runner/src/
   ri/trunk/inject-tck-runner/src/main/
   ri/trunk/inject-tck-runner/src/main/java/
   ri/trunk/inject-tck-runner/src/main/resources/
   ri/trunk/inject-tck-runner/src/test/
   ri/trunk/inject-tck-runner/src/test/java/
   ri/trunk/inject-tck-runner/src/test/java/org/
   ri/trunk/inject-tck-runner/src/test/java/org/jboss/
   ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/
   ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/
   ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/
   ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/AtInjectTCK.java
   ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/DriversSeatProducer.java
   ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/SpareTireProducer.java
   ri/trunk/inject-tck-runner/src/test/resources/
   ri/trunk/inject-tck-runner/src/test/resources/log4j.xml
   ri/trunk/inject-tck-runner/tests.xml
Modified:
   ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ApplicationContext.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ContextLifecycle.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBFieldImpl.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBMethodImpl.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBParameterImpl.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeBeanResolver.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanStore.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionBeanStore.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Beans.java
   ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml
   ri/trunk/pom.xml
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Lifecycle.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingLifecycle.java
   ri/trunk/tests/pom.xml
   ri/trunk/version-matrix/pom.xml
Log:
add SingletonContext, remove a couple of uneeded checks, add atinject tck runner module

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -18,10 +18,10 @@
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
 import java.lang.reflect.TypeVariable;
 import java.lang.reflect.WildcardType;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -43,8 +43,8 @@
 import org.jboss.webbeans.bean.AbstractProducerBean;
 import org.jboss.webbeans.bean.DecoratorImpl;
 import org.jboss.webbeans.bean.DisposalMethod;
-import org.jboss.webbeans.bean.NewSessionBean;
 import org.jboss.webbeans.bean.NewManagedBean;
+import org.jboss.webbeans.bean.NewSessionBean;
 import org.jboss.webbeans.bean.RIBean;
 import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
 import org.jboss.webbeans.bootstrap.api.Service;
@@ -52,7 +52,6 @@
 import org.jboss.webbeans.metadata.cache.MetaAnnotationStore;
 import org.jboss.webbeans.resolution.ResolvableWBClass;
 import org.jboss.webbeans.util.Beans;
-import org.jboss.webbeans.util.Names;
 import org.jboss.webbeans.util.Proxies;
 import org.jboss.webbeans.util.Reflections;
 
@@ -153,21 +152,6 @@
       {
          throw new DefinitionException("Cannot declare an injection point with a type variable " + ij);
       }
-      if (ij.getType() instanceof ParameterizedType)
-      {
-         ParameterizedType parameterizedType = (ParameterizedType) ij.getType();
-         for (Type type : parameterizedType.getActualTypeArguments())
-         {
-//            if (type instanceof TypeVariable<?>)
-//            {
-//               throw new DefinitionException("Injection point cannot have a type variable type parameter " + ij);
-//            }
-//            if (type instanceof WildcardType)
-//            {
-//               throw new DefinitionException("Injection point cannot have a wildcard type parameter " + ij);
-//            }
-         }
-      }
       checkFacadeInjectionPoint(ij, Instance.class);
       checkFacadeInjectionPoint(ij, Event.class);
       Annotation[] bindings = ij.getQualifiers().toArray(new Annotation[0]);
@@ -175,11 +159,11 @@
       Set<?> resolvedBeans = beanManager.getBeanResolver().resolve(beanManager.getInjectableBeans(ij));
       if (resolvedBeans.isEmpty())
       {
-         throw new DeploymentException("The injection point " + ij + " with binding types "  + Names.annotationsToString(ij.getQualifiers()) + " in " + ij.getBean() + " has unsatisfied dependencies with binding types ");
+         throw new DeploymentException("Injection point has unstatisfied dependencies. Injection point: " + ij.toString() + "; Qualifiers: " + Arrays.toString(bindings));
       }
       if (resolvedBeans.size() > 1)
       {
-         throw new DeploymentException("The injection point " + ij + " with binding types " + Names.annotationsToString(ij.getQualifiers()) + " in " + ij.getBean() + " has ambiguous dependencies " + resolvedBeans);
+         throw new DeploymentException("Injection point has ambiguous dependencies. Injection point: " + ij.toString() + "; Qualifiers: " + Arrays.toString(bindings) +"; Possible dependencies: " + resolvedBeans);
       }
       Bean<?> resolvedBean = (Bean<?>) resolvedBeans.iterator().next();
       if (beanManager.getServices().get(MetaAnnotationStore.class).getScopeModel(resolvedBean.getScope()).isNormal() && !Proxies.isTypeProxyable(ij.getType()))

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -31,6 +31,7 @@
 import javax.inject.Qualifier;
 
 import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.Container;
 import org.jboss.webbeans.DefinitionException;
 import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
 import org.jboss.webbeans.injection.WBInjectionPoint;
@@ -468,6 +469,11 @@
       return Dependent.class.equals(getScope());
    }
    
+   public boolean isNormalScoped()
+   {
+      return Container.instance().deploymentServices().get(MetaAnnotationStore.class).getScopeModel(getScope()).isNormal();
+   }
+   
    public boolean isAlternative()
    {
       return policy;

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ManagedBean.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -250,7 +250,7 @@
    protected void checkBeanImplementation()
    {
       super.checkBeanImplementation();
-      if (!isDependent())
+      if (isNormalScoped())
       {
          for (WBField<?, ?> field : getAnnotatedItem().getWBFields())
          {

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -25,6 +25,7 @@
 import javax.enterprise.inject.Any;
 import javax.enterprise.inject.Instance;
 import javax.enterprise.inject.TypeLiteral;
+import javax.inject.Provider;
 
 import org.jboss.webbeans.BeanManagerImpl;
 import org.jboss.webbeans.literal.AnyLiteral;
@@ -34,11 +35,13 @@
 public class InstanceBean extends AbstractFacadeBean<Instance<?>>
 {
 
-   private static final Class<Instance<?>> TYPE = new TypeLiteral<Instance<?>>() {}.getRawType();
-   private static final Set<Type> DEFAULT_TYPES = Arrays2.<Type>asSet(TYPE, Object.class);
+   private static final Class<Instance<?>> INSTANCE_TYPE = new TypeLiteral<Instance<?>>() {}.getRawType();
+   private static final Class<Provider<?>> PROVIDER_TYPE = new TypeLiteral<Provider<?>>() {}.getRawType();
+   private static final Set<Type> DEFAULT_TYPES = Arrays2.<Type>asSet(INSTANCE_TYPE, PROVIDER_TYPE, Object.class);
    private static final Any ANY = new AnyLiteral();
    private static final Set<Annotation> DEFAULT_BINDINGS = new HashSet<Annotation>(Arrays.asList(ANY));
-   public static final ResolvableTransformer TRANSFORMER = new FacadeBeanResolvableTransformer(TYPE);
+   public static final ResolvableTransformer INSTANCE_TRANSFORMER = new FacadeBeanResolvableTransformer(INSTANCE_TYPE);
+   public static final ResolvableTransformer PROVIDER_TRANSFORMER = new FacadeBeanResolvableTransformer(PROVIDER_TYPE);
    
    public InstanceBean(BeanManagerImpl manager)
    {
@@ -48,7 +51,7 @@
    @Override
    public Class<Instance<?>> getType()
    {
-      return TYPE;
+      return INSTANCE_TYPE;
    }
 
    @Override

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -42,12 +42,14 @@
 import org.jboss.webbeans.bootstrap.api.helpers.SimpleServiceRegistry;
 import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
 import org.jboss.webbeans.bootstrap.spi.Deployment;
+import org.jboss.webbeans.context.AbstractApplicationContext;
 import org.jboss.webbeans.context.ApplicationContext;
 import org.jboss.webbeans.context.ContextLifecycle;
 import org.jboss.webbeans.context.ConversationContext;
 import org.jboss.webbeans.context.DependentContext;
 import org.jboss.webbeans.context.RequestContext;
 import org.jboss.webbeans.context.SessionContext;
+import org.jboss.webbeans.context.SingletonContext;
 import org.jboss.webbeans.context.api.BeanStore;
 import org.jboss.webbeans.ejb.EJBApiAbstraction;
 import org.jboss.webbeans.jsf.JsfApiAbstraction;
@@ -380,17 +382,19 @@
       deploymentManager.addContext(lifecycle.getConversationContext());
       deploymentManager.addContext(lifecycle.getSessionContext());
       deploymentManager.addContext(lifecycle.getApplicationContext());
+      deploymentManager.addContext(lifecycle.getSingletonContext());
    }
    
    protected void createContexts()
    {
-      ApplicationContext applicationContext = new ApplicationContext();
+      AbstractApplicationContext applicationContext = new ApplicationContext();
+      AbstractApplicationContext singletonContext = new SingletonContext();
       SessionContext sessionContext = new SessionContext();
       ConversationContext conversationContext = new ConversationContext();
       RequestContext requestContext = new RequestContext();
       DependentContext dependentContext = new DependentContext();
       
-      deployment.getServices().add(ContextLifecycle.class, new ContextLifecycle(applicationContext, sessionContext, conversationContext, requestContext, dependentContext));
+      deployment.getServices().add(ContextLifecycle.class, new ContextLifecycle(applicationContext, singletonContext, sessionContext, conversationContext, requestContext, dependentContext));
    }
    
    public void shutdown()

Copied: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractApplicationContext.java (from rev 3811, ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ApplicationContext.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractApplicationContext.java	                        (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractApplicationContext.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -0,0 +1,111 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ * 
+ * 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.context;
+
+import java.lang.annotation.Annotation;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.jboss.webbeans.context.api.BeanStore;
+
+/**
+ * The Application context
+ * 
+ * @author Nicklas Karlsson
+ * 
+ * @see org.jboss.webbeans.context.AbstractApplicationContext
+ */
+public abstract class AbstractApplicationContext extends AbstractMapContext
+{
+
+   // The beans
+   private BeanStore beanStore;
+   // Is the context active?
+   private final AtomicBoolean active;
+
+   /**
+    * Constructor
+    */
+   public AbstractApplicationContext(Class<? extends Annotation> scope)
+   {
+      super(scope);
+      this.active = new AtomicBoolean(false);
+   }
+
+   /**
+    * Gets the bean store
+    * 
+    * @return The bean store
+    */
+   @Override
+   public BeanStore getBeanStore()
+   {
+      return this.beanStore;
+   }
+
+   /**
+    * Sets the bean store
+    * 
+    * @param applicationBeanStore The bean store
+    */
+   public void setBeanStore(BeanStore applicationBeanStore)
+   {
+      this.beanStore = applicationBeanStore;
+   }
+
+   /**
+    * Indicates if the context is active
+    * 
+    * @return True if active, false otherwise
+    */
+   @Override
+   public boolean isActive()
+   {
+      return active.get();
+   }
+
+   /**
+    * Sets the active state of the context
+    * 
+    * @param active The new state
+    */
+   @Override
+   public void setActive(boolean active)
+   {
+      this.active.set(active);
+   }
+
+   @Override
+   public String toString()
+   {
+      String active = isActive() ? "Active " : "Inactive ";
+      String beanStoreInfo = getBeanStore() == null ? "" : getBeanStore().toString();
+      return active + "application context " + beanStoreInfo;
+   }
+
+   @Override
+   protected boolean isCreationLockRequired()
+   {
+      return true;
+   }
+
+}

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ApplicationContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ApplicationContext.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ApplicationContext.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -1,112 +1,13 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- * 
- * 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.context;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.enterprise.context.ApplicationScoped;
-
-import org.jboss.webbeans.context.api.BeanStore;
-
-/**
- * The Application context
- * 
- * @author Nicklas Karlsson
- * 
- * @see org.jboss.webbeans.context.ApplicationContext
- */
-public class ApplicationContext extends AbstractMapContext
-{
-
-   // The beans
-   private BeanStore beanStore;
-   // Is the context active?
-   private final AtomicBoolean active;
-
-   /**
-    * Constructor
-    */
-   public ApplicationContext()
-   {
-      super(ApplicationScoped.class);
-      this.active = new AtomicBoolean(false);
-   }
-
-   /**
-    * Gets the bean store
-    * 
-    * @return The bean store
-    */
-   @Override
-   public BeanStore getBeanStore()
-   {
-      return this.beanStore;
-   }
-
-   /**
-    * Sets the bean store
-    * 
-    * @param applicationBeanStore The bean store
-    */
-   public void setBeanStore(BeanStore applicationBeanStore)
-   {
-      this.beanStore = applicationBeanStore;
-   }
-
-   /**
-    * Indicates if the context is active
-    * 
-    * @return True if active, false otherwise
-    */
-   @Override
-   public boolean isActive()
-   {
-      return active.get();
-   }
-
-   /**
-    * Sets the active state of the context
-    * 
-    * @param active The new state
-    */
-   @Override
-   public void setActive(boolean active)
-   {
-      this.active.set(active);
-   }
-
-   @Override
-   public String toString()
-   {
-      String active = isActive() ? "Active " : "Inactive ";
-      String beanStoreInfo = getBeanStore() == null ? "" : getBeanStore().toString();
-      return active + "application context " + beanStoreInfo;
-   }
-
-   @Override
-   protected boolean isCreationLockRequired()
-   {
-      return true;
-   }
-
-}
+package org.jboss.webbeans.context;
+
+import javax.enterprise.context.ApplicationScoped;
+
+public class ApplicationContext extends AbstractApplicationContext
+{
+   
+   public ApplicationContext()
+   {
+      super(ApplicationScoped.class);
+   }
+
+}

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ContextLifecycle.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ContextLifecycle.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/ContextLifecycle.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -26,6 +26,7 @@
 import org.jboss.webbeans.bootstrap.api.Lifecycle;
 import org.jboss.webbeans.bootstrap.api.Service;
 import org.jboss.webbeans.context.api.BeanStore;
+import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
 import org.jboss.webbeans.log.LogProvider;
 import org.jboss.webbeans.log.Logging;
 
@@ -41,15 +42,17 @@
    
    public static LogProvider log = Logging.getLogProvider(ContextLifecycle.class);
 
-   private final ApplicationContext applicationContext;
+   private final AbstractApplicationContext applicationContext;
+   private final AbstractApplicationContext singletonContext;
    private final SessionContext sessionContext;
    private final ConversationContext conversationContext;
    private final RequestContext requestContext;
    private final DependentContext dependentContext;
    
-   public ContextLifecycle(ApplicationContext applicationContext, SessionContext sessionContext, ConversationContext conversationContext, RequestContext requestContext, DependentContext dependentContext)
+   public ContextLifecycle(AbstractApplicationContext applicationContext, AbstractApplicationContext singletonContext, SessionContext sessionContext, ConversationContext conversationContext, RequestContext requestContext, DependentContext dependentContext)
    {
       this.applicationContext = applicationContext;
+      this.singletonContext = singletonContext;
       this.sessionContext = sessionContext;
       this.conversationContext = conversationContext;
       this.requestContext = requestContext;
@@ -92,22 +95,22 @@
    
    public boolean isRequestActive()
    {
-      return applicationContext.isActive() && requestContext.isActive() && dependentContext.isActive();
+      return singletonContext.isActive() && applicationContext.isActive() && requestContext.isActive() && dependentContext.isActive();
    }
    
    public boolean isApplicationActive()
    {
-      return applicationContext.isActive() && dependentContext.isActive();
+      return singletonContext.isActive() && applicationContext.isActive() && dependentContext.isActive();
    }
    
    public boolean isConversationActive()
    {
-      return applicationContext.isActive() && sessionContext.isActive() && conversationContext.isActive() && dependentContext.isActive();
+      return singletonContext.isActive() && applicationContext.isActive() && sessionContext.isActive() && conversationContext.isActive() && dependentContext.isActive();
    }
    
    public boolean isSessionActive() 
    {
-      return applicationContext.isActive() && sessionContext.isActive() && dependentContext.isActive();
+      return singletonContext.isActive() && applicationContext.isActive() && sessionContext.isActive() && dependentContext.isActive();
    }
    
 
@@ -116,7 +119,8 @@
       log.trace("Starting application");
       applicationContext.setBeanStore(applicationBeanStore);
       applicationContext.setActive(true);
-
+      singletonContext.setBeanStore(new ConcurrentHashMapBeanStore());
+      singletonContext.setActive(true);
    }
    
    public void endApplication()
@@ -125,7 +129,9 @@
       applicationContext.destroy();
       applicationContext.setActive(false);
       applicationContext.setBeanStore(null);
-      
+      singletonContext.destroy();
+      singletonContext.setActive(false);
+      singletonContext.setBeanStore(null);
       Container.instance().cleanup();
    }
    
@@ -135,14 +141,20 @@
       requestContext.cleanup();
       conversationContext.cleanup();
       sessionContext.cleanup();
+      singletonContext.cleanup();
       applicationContext.cleanup();
    }
    
-   public ApplicationContext getApplicationContext()
+   public AbstractApplicationContext getApplicationContext()
    {
       return applicationContext;
    }
    
+   public AbstractApplicationContext getSingletonContext()
+   {
+      return singletonContext;
+   }
+   
    public SessionContext getSessionContext()
    {
       return sessionContext;

Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SingletonContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SingletonContext.java	                        (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SingletonContext.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.context;
+
+import javax.inject.Singleton;
+
+public class SingletonContext extends AbstractApplicationContext
+{
+   
+   public SingletonContext()
+   {
+      super(Singleton.class);
+   }
+
+}


Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/SingletonContext.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -39,7 +39,6 @@
 import org.jboss.webbeans.introspector.WBConstructor;
 import org.jboss.webbeans.introspector.WBParameter;
 import org.jboss.webbeans.resources.ClassTransformer;
-import org.jboss.webbeans.util.Names;
 
 import com.google.common.base.Supplier;
 import com.google.common.collect.ListMultimap;
@@ -68,7 +67,7 @@
    private final ConstructorSignature signature;
 
    // Cached string representation
-   private String toString;
+   private final String toString;
    
    public static <T> WBConstructor<T> of(Constructor<T> constructor, WBClass<T> declaringClass, ClassTransformer classTransformer)
    {
@@ -93,6 +92,7 @@
    private WBConstructorImpl(Constructor<T> constructor, AnnotatedConstructor<T> annotatedConstructor, AnnotationStore annotationStore, WBClass<T> declaringClass, ClassTransformer classTransformer)
    {
       super(annotationStore, constructor, constructor.getDeclaringClass(), constructor.getDeclaringClass(), declaringClass);
+      this.toString = new StringBuilder().append("constructor ").append(constructor.toString()).toString();
       this.constructor = constructor;
 
       this.parameters = new ArrayList<WBParameter<?, ?>>();
@@ -271,11 +271,6 @@
    @Override
    public String toString()
    {
-      if (toString != null)
-      {
-         return toString;
-      }
-      toString = "Annotated constructor " + Names.constructorToString(constructor);
       return toString;
    }
    

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBFieldImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBFieldImpl.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBFieldImpl.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -26,7 +26,6 @@
 import org.jboss.webbeans.introspector.WBClass;
 import org.jboss.webbeans.introspector.WBField;
 import org.jboss.webbeans.resources.ClassTransformer;
-import org.jboss.webbeans.util.Names;
 import org.jboss.webbeans.util.Reflections;
 
 /**
@@ -45,7 +44,7 @@
    private final Field field;
 
    // Cached string representation
-   private String toString;
+   private final String toString;
 
    public static <T, X> WBFieldImpl<T, X> of(Field field, WBClass<X> declaringClass, ClassTransformer classTransformer)
    {
@@ -72,6 +71,7 @@
    {
       super(annotationStore, field, (Class<T>) field.getType(), field.getGenericType(), declaringClass);
       this.field = field;
+      this.toString = new StringBuilder().append("field ").append(declaringClass.getName()).append(".").append(field.getName()).toString();
    }
 
    /**
@@ -84,6 +84,7 @@
       return field;
    }
 
+   @Override
    public Field getDelegate()
    {
       return field;
@@ -125,12 +126,7 @@
    @Override
    public String toString()
    {
-      if (toString != null)
-      {
-         return toString;
-      }
-      toString = Names.fieldToString(field) + " on " + getDeclaringType();
-      return toString;
+      return this.toString;
    }
 
    @Override

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBMethodImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBMethodImpl.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBMethodImpl.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -39,7 +39,6 @@
 import org.jboss.webbeans.introspector.WBMethod;
 import org.jboss.webbeans.introspector.WBParameter;
 import org.jboss.webbeans.resources.ClassTransformer;
-import org.jboss.webbeans.util.Names;
 import org.jboss.webbeans.util.Reflections;
 
 import com.google.common.base.Supplier;
@@ -71,7 +70,7 @@
    private final String propertyName;
 
    // Cached string representation
-   private String toString;
+   private final String toString;
 
    private final MethodSignature signature;
 
@@ -101,6 +100,7 @@
    {
       super(annotationStore, method, (Class<T>) method.getReturnType(), method.getGenericReturnType(), declaringClass);
       this.method = method;
+      this.toString = new StringBuilder().append("method ").append(method.toString()).toString();
       this.parameters = new ArrayList<WBParameter<?, ?>>();
       this.annotatedParameters = Multimaps.newListMultimap(new HashMap<Class<? extends Annotation>, Collection<WBParameter<?, ?>>>(), new Supplier< List<WBParameter<?, ?>>>()
       {
@@ -166,6 +166,7 @@
          this.propertyName = propertyName;
       }
       this.signature = new MethodSignatureImpl(this);
+      
    }
 
    public Method getAnnotatedMethod()
@@ -173,6 +174,7 @@
       return method;
    }
 
+   @Override
    public Method getDelegate()
    {
       return method;
@@ -241,12 +243,7 @@
    @Override
    public String toString()
    {
-      if (toString != null)
-      {
-         return toString;
-      }
-      toString = "Annotated method on class " + getDeclaringType().getName() + Names.methodToString(method);
-      return toString;
+      return this.toString;
    }
 
    public MethodSignature getSignature()

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBParameterImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBParameterImpl.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBParameterImpl.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -49,10 +49,9 @@
    private final boolean _private = false;
    private final int position;
    private final WBCallable<?, X, ?> declaringMember;
-
-   // Cached string representation
-   private String toString;
    
+   private final String toString;
+   
    public static <T, X> WBParameter<T, X> of(Annotation[] annotations, Class<T> rawType, Type type, WBCallable<?, X, ?> declaringMember, int position, ClassTransformer classTransformer)
    {
       return new WBParameterImpl<T, X>(annotations, rawType, type, declaringMember, position, classTransformer);
@@ -74,6 +73,7 @@
       super(AnnotationStore.of(annotations, annotations, classTransformer.getTypeStore()), rawType, type);
       this.declaringMember = declaringMember;
       this.position = position;
+      this.toString = new StringBuilder().append("parameter ").append(position + 1).append(" of ").append(declaringMember.toString()).toString();
    }
 
    /**
@@ -130,19 +130,6 @@
    @Override
    public String toString()
    {
-      if (toString == null)
-      {
-         StringBuilder buffer = new StringBuilder();
-         buffer.append("Annotated parameter ");
-         if (_static)
-            buffer.append("static ");
-         if (_final)
-            buffer.append("final ");
-         buffer.append(getJavaClass().getName());
-         buffer.append(" for operation ");
-         buffer.append(getDeclaringCallable().toString());
-         toString = buffer.toString();
-      }
       return toString;
    }
 

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeBeanResolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeBeanResolver.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeBeanResolver.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -46,7 +46,8 @@
    {
       TRANSFORMERS = new HashSet<ResolvableTransformer>();
       TRANSFORMERS.add(EventBean.TRANSFORMER);
-      TRANSFORMERS.add(InstanceBean.TRANSFORMER);
+      TRANSFORMERS.add(InstanceBean.INSTANCE_TRANSFORMER);
+      TRANSFORMERS.add(InstanceBean.PROVIDER_TRANSFORMER);
       TRANSFORMERS.add(new NewResolvableTransformer());
    }
 

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanStore.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanStore.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanStore.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -21,7 +21,7 @@
 
 import javax.servlet.ServletContext;
 
-import org.jboss.webbeans.context.ApplicationContext;
+import org.jboss.webbeans.context.AbstractApplicationContext;
 import org.jboss.webbeans.context.beanstore.AbstractAttributeBackedBeanStore;
 import org.jboss.webbeans.context.beanstore.NamingScheme;
 
@@ -30,12 +30,12 @@
  * 
  * @author Nicklas Karlsson
  * 
- * @see org.jboss.webbeans.context.ApplicationContext
+ * @see org.jboss.webbeans.context.AbstractApplicationContext
  */
 public class ApplicationBeanStore extends AbstractAttributeBackedBeanStore
 {
    
-   private static final NamingScheme NAMING_SCHEME = new NamingScheme(ApplicationContext.class.getName(), "#");
+   private static final NamingScheme NAMING_SCHEME = new NamingScheme(AbstractApplicationContext.class.getName(), "#");
    
    // The servlet context to use as backing map
    private ServletContext context;

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionBeanStore.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionBeanStore.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/HttpSessionBeanStore.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -29,7 +29,7 @@
  * 
  * @author Nicklas Karlsson
  * 
- * @see org.jboss.webbeans.context.ApplicationContext
+ * @see org.jboss.webbeans.context.AbstractApplicationContext
  */
 public class HttpSessionBeanStore extends AbstractAttributeBackedBeanStore
 {

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Beans.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Beans.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Beans.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -38,8 +38,8 @@
 import org.jboss.webbeans.BeanManagerImpl;
 import org.jboss.webbeans.DefinitionException;
 import org.jboss.webbeans.bean.AbstractProducerBean;
-import org.jboss.webbeans.bean.SessionBean;
 import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.bean.SessionBean;
 import org.jboss.webbeans.ejb.EJBApiAbstraction;
 import org.jboss.webbeans.injection.ConstructorInjectionPoint;
 import org.jboss.webbeans.injection.FieldInjectionPoint;
@@ -265,12 +265,8 @@
       Set<MethodInjectionPoint<?, ?>> initializerMethods = new HashSet<MethodInjectionPoint<?, ?>>();
       for (WBMethod<?, ?> method : type.getAnnotatedWBMethods(Inject.class))
       {
-         if (method.isStatic())
+         if (method.getAnnotation(Produces.class) != null)
          {
-            throw new DefinitionException("Initializer method " + method.toString() + " cannot be static on " + type);
-         }
-         else if (method.getAnnotation(Produces.class) != null)
-         {
             throw new DefinitionException("Initializer method " + method.toString() + " cannot be annotated @Produces on " + type);
          }
          else if (method.getAnnotatedWBParameters(Disposes.class).size() > 0)
@@ -317,10 +313,6 @@
    {
       if (!annotatedField.isAnnotationPresent(Produces.class))
       {
-         if (annotatedField.isStatic())
-         {
-            throw new DefinitionException("Don't place binding annotations on static fields " + annotatedField);
-         }
          if (annotatedField.isFinal())
          {
             throw new DefinitionException("Don't place binding annotations on final fields " + annotatedField);

Added: ri/trunk/inject-tck-runner/pom.xml
===================================================================
--- ri/trunk/inject-tck-runner/pom.xml	                        (rev 0)
+++ ri/trunk/inject-tck-runner/pom.xml	2009-09-30 11:43:24 UTC (rev 3818)
@@ -0,0 +1,53 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <artifactId>webbeans-parent</artifactId>
+      <groupId>org.jboss.webbeans</groupId>
+      <version>1.0.0-SNAPSHOT</version>
+      <relativePath>../parent</relativePath>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>org.jboss.webbeans</groupId>
+   <artifactId>webbeans-inject-tck-runner</artifactId>
+   <name>javax.inject TCK runner for Web Beans</name>
+   <description>Aggregates dependencies and run's the javax.inject TCK for Web Beans</description>
+   
+   <dependencies>
+
+      <dependency>
+         <groupId>org.jboss.webbeans</groupId>
+         <artifactId>webbeans-core</artifactId>
+      </dependency>
+
+      <dependency>
+         <groupId>org.jboss.webbeans</groupId>
+         <artifactId>webbeans-porting-package</artifactId>
+      </dependency>
+
+      <dependency>
+         <groupId>org.atinject</groupId>
+         <artifactId>inject-tck</artifactId>
+      </dependency>
+      
+      <dependency>
+         <groupId>junit</groupId>
+         <artifactId>junit</artifactId>
+    </dependency>
+      
+   </dependencies>
+   
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+               <testFailureIgnore>true</testFailureIgnore>
+               <suiteXmlFiles>
+                  <suiteXmlFile>tests.xml</suiteXmlFile>
+               </suiteXmlFiles>
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+   
+</project>

Added: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/AtInjectTCK.java
===================================================================
--- ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/AtInjectTCK.java	                        (rev 0)
+++ ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/AtInjectTCK.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -0,0 +1,35 @@
+package org.jboss.webbeans.atinject.tck;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+
+import junit.framework.Test;
+
+import org.atinject.tck.Tck;
+import org.atinject.tck.auto.Car;
+import org.atinject.tck.auto.Convertible;
+import org.atinject.tck.auto.DriversSeat;
+import org.atinject.tck.auto.FuelTank;
+import org.atinject.tck.auto.V8Engine;
+import org.atinject.tck.auto.accessories.Cupholder;
+import org.atinject.tck.auto.accessories.SpareTire;
+import org.jboss.webbeans.mock.MockEELifecycle;
+import org.jboss.webbeans.mock.TestContainer;
+
+public class AtInjectTCK
+{
+   
+   private static final List<Class<?>> classes = Arrays.<Class<?>>asList(Convertible.class, DriversSeat.class, DriversSeatProducer.class, V8Engine.class, Cupholder.class, FuelTank.class, SpareTireProducer.class, SpareTire.class);
+   
+   public static Test suite()
+   {
+      TestContainer container = new TestContainer(new MockEELifecycle(), classes, null);
+      container.startContainer();
+      BeanManager beanManager = container.getBeanManager();
+      Bean<?> bean = beanManager.resolve(beanManager.getBeans(Car.class));
+      Car instance = (Car) beanManager.getReference(bean, Car.class, beanManager.createCreationalContext(bean));
+      return Tck.testsFor(instance, false /* supportsStatic */, false /* supportsPrivate */);
+   }
+}
\ No newline at end of file

Added: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/DriversSeatProducer.java
===================================================================
--- ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/DriversSeatProducer.java	                        (rev 0)
+++ ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/DriversSeatProducer.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.atinject.tck;
+
+import javax.enterprise.inject.Produces;
+
+import org.atinject.tck.auto.Drivers;
+import org.atinject.tck.auto.DriversSeat;
+import org.atinject.tck.auto.Seat;
+
+public class DriversSeatProducer
+{
+
+   @Produces @Drivers
+   public Seat produceDriversSeat(DriversSeat seat)
+   {
+      return seat;
+   }
+   
+}

Added: ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/SpareTireProducer.java
===================================================================
--- ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/SpareTireProducer.java	                        (rev 0)
+++ ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/SpareTireProducer.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.atinject.tck;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Named;
+
+import org.atinject.tck.auto.Tire;
+import org.atinject.tck.auto.accessories.SpareTire;
+
+public class SpareTireProducer
+{
+
+   @Produces @Named("spare")
+   public Tire produceSpareTire(SpareTire spareTire)
+   {
+      return spareTire;
+   }
+   
+}

Added: ri/trunk/inject-tck-runner/src/test/resources/log4j.xml
===================================================================
--- ri/trunk/inject-tck-runner/src/test/resources/log4j.xml	                        (rev 0)
+++ ri/trunk/inject-tck-runner/src/test/resources/log4j.xml	2009-09-30 11:43:24 UTC (rev 3818)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+        <param name="Target" value="System.out"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <!-- The default pattern: Date Priority [Category] Message\n -->
+            <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{2}] %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.varia.StringMatchFilter">
+        	<param name="AcceptOnMatch" value="false" />
+        	<param name="StringToMatch" value="Failure while notifying an observer of event [a]" />
+        </filter>
+        <filter class="org.apache.log4j.varia.StringMatchFilter">
+        	<param name="AcceptOnMatch" value="false" />
+        	<param name="StringToMatch" value="Error destroying org.jboss.webbeans.bean-test-ManagedBean-org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.Cod" />
+        </filter>
+    </appender>
+
+    <!-- ############### Embedded EJB3 #################  -->
+    <category name="org.jboss">
+        <priority value="ERROR"/>
+    </category>
+    
+    <category name="org.jboss.test">
+        <priority value="ERROR"/>
+    </category>
+    
+    <category name="com.arjuna">
+        <priority value="ERROR"/>
+    </category>
+
+    <!-- ############### Hibernate logging ################# -->
+
+    <category name="org.hibernate">
+        <priority value="ERROR"/>
+    </category>
+
+    <!--
+    <category name="org.hibernate.SQL">
+        <priority value="TRACE"/>
+    </category>
+
+    <category name="org.hibernate.type">
+        <priority value="TRACE"/>
+    </category>
+
+    <category name="org.hibernate.loader">
+        <priority value="TRACE"/>
+    </category>
+    <category name="org.hibernate.cache">
+        <priority value="TRACE"/>
+    </category>
+    -->
+
+    <!-- ############### Web Beans logging ################### -->
+
+    <category name="org.jboss.webbeans">
+        <priority value="WARN"/>
+    </category>
+    
+    <category name="org.jboss.webbeans.tck">
+        <priority value="INFO"/>
+    </category>
+    
+    <category name="org.jboss.testharness">
+        <priority value="INFO"/>
+    </category>
+    
+    <root>
+        <priority value="INFO"/>
+        <appender-ref ref="CONSOLE"/>
+    </root>
+
+</log4j:configuration>

Added: ri/trunk/inject-tck-runner/tests.xml
===================================================================
--- ri/trunk/inject-tck-runner/tests.xml	                        (rev 0)
+++ ri/trunk/inject-tck-runner/tests.xml	2009-09-30 11:43:24 UTC (rev 3818)
@@ -0,0 +1,11 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+
+<suite name="Web Beans AtInject TCK" verbose="2" >
+
+   <test name="Web Beans RI" junit="true">
+      <classes>
+         <class name="org.jboss.webbeans.atinject.tck.AtInjectTCK"></class>
+      </classes>
+   </test>
+   
+</suite>
\ No newline at end of file

Modified: ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml
===================================================================
--- ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml	2009-09-30 11:43:24 UTC (rev 3818)
@@ -14,7 +14,7 @@
         </filter>
         <filter class="org.apache.log4j.varia.StringMatchFilter">
         	<param name="AcceptOnMatch" value="false" />
-        	<param name="StringToMatch" value="Error destroying Request scoped unnamed simple bean org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.Cod" />
+        	<param name="StringToMatch" value="Error destroying org.jboss.webbeans.bean-test-ManagedBean-org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.Cod" />
         </filter>
     </appender>
 

Modified: ri/trunk/pom.xml
===================================================================
--- ri/trunk/pom.xml	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/pom.xml	2009-09-30 11:43:24 UTC (rev 3818)
@@ -58,6 +58,7 @@
             <module>impl</module>
             <module>tests</module>
             <module>porting-package</module>
+            <module>inject-tck-runner</module>
             <module>jboss-tck-runner</module>
             <module>osgi-bundle</module>
          </modules>

Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Lifecycle.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Lifecycle.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Lifecycle.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -36,6 +36,8 @@
    public void endApplication();
 
    public Context getApplicationContext();
+   
+   public Context getSingletonContext();
 
    public Context getSessionContext();
 

Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingLifecycle.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingLifecycle.java	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingLifecycle.java	2009-09-30 11:43:24 UTC (rev 3818)
@@ -79,6 +79,11 @@
    {
       return delegate().getSessionContext();
    }
+   
+   public Context getSingletonContext()
+   {
+      return delegate().getSingletonContext();
+   }
 
    public boolean isRequestActive()
    {

Modified: ri/trunk/tests/pom.xml
===================================================================
--- ri/trunk/tests/pom.xml	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/tests/pom.xml	2009-09-30 11:43:24 UTC (rev 3818)
@@ -63,7 +63,6 @@
       <dependency>
          <groupId>org.jboss.ejb3</groupId>
          <artifactId>jboss-ejb3-api</artifactId>
-         <optional>true</optional>
          <exclusions>
             <exclusion>
                <artifactId>jboss-jaxrpc</artifactId>

Modified: ri/trunk/version-matrix/pom.xml
===================================================================
--- ri/trunk/version-matrix/pom.xml	2009-09-30 11:34:49 UTC (rev 3817)
+++ ri/trunk/version-matrix/pom.xml	2009-09-30 11:43:24 UTC (rev 3818)
@@ -83,6 +83,14 @@
             <artifactId>jsp-2.1-jetty</artifactId>
             <version>${jetty.version}</version>
          </dependency>
+         
+         <dependency>
+            <groupId>org.atinject</groupId>
+            <artifactId>inject-tck</artifactId>
+            <version>1.0.0-PRD</version>
+         </dependency>
+         
+         
 
          <dependency>
             <groupId>org.testng</groupId>
@@ -409,8 +417,14 @@
       		<groupId>commons-httpclient</groupId>
       		<artifactId>commons-httpclient</artifactId>
       		<version>3.1</version>
-    </dependency>
+         </dependency>
          
+    		<dependency>
+    			<groupId>junit</groupId>
+    			<artifactId>junit</artifactId>
+    			<version>4.7</version>
+    		</dependency>
+         
       </dependencies>
    </dependencyManagement>
 




More information about the weld-commits mailing list