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

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Tue Mar 17 21:38:30 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-03-17 21:38:30 -0400 (Tue, 17 Mar 2009)
New Revision: 2079

Added:
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingServiceRegistry.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ServiceRegistries.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/SimpleServiceRegistry.java
   ri/trunk/tests/temp-testng-customsuite.xml
   ri/trunk/tests/test-output/
   ri/trunk/tests/test-output/emailable-report.html
   ri/trunk/tests/test-output/index.html
   ri/trunk/tests/test-output/testng-failed.xml
   ri/trunk/tests/test-output/testng-results.xml
   ri/trunk/tests/test-output/testng.css
   ri/trunk/tests/test-output/webbeans-core-tests/
   ri/trunk/tests/test-output/webbeans-core-tests/classes.html
   ri/trunk/tests/test-output/webbeans-core-tests/groups.html
   ri/trunk/tests/test-output/webbeans-core-tests/index.html
   ri/trunk/tests/test-output/webbeans-core-tests/main.html
   ri/trunk/tests/test-output/webbeans-core-tests/methods-alphabetical.html
   ri/trunk/tests/test-output/webbeans-core-tests/methods-not-run.html
   ri/trunk/tests/test-output/webbeans-core-tests/methods.html
   ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.html
   ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.properties
   ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.xml
   ri/trunk/tests/test-output/webbeans-core-tests/reporter-output.html
   ri/trunk/tests/test-output/webbeans-core-tests/testng-failed.xml
   ri/trunk/tests/test-output/webbeans-core-tests/testng.xml.html
   ri/trunk/tests/test-output/webbeans-core-tests/toc.html
Removed:
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java
Modified:
   ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/EJBApiAbstraction.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JSFApiAbstraction.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockEjBServices.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletApiAbstraction.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/util/ApiAbstraction.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/AbstractBootstrap.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/api/SessionObjectReference.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbServices.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwardingEjbServices.java
   ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockEjbServices.java
Log:
More fixes to SPI and oterh cleanups

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -131,7 +131,7 @@
    private transient final Set<Interceptor> interceptors;
 
    // The EJB resolver provided by the container
-   private transient final ServiceRegistry serviceRegistry;
+   private transient final ServiceRegistry simpleServiceRegistry;
 
    private transient final EjbDescriptorCache ejbDescriptorCache;
    
@@ -144,9 +144,9 @@
     * 
     * @param ejbServices the ejbResolver to use
     */
-   public ManagerImpl(ServiceRegistry serviceRegistry)
+   public ManagerImpl(ServiceRegistry simpleServiceRegistry)
    {
-      this.serviceRegistry = serviceRegistry;
+      this.simpleServiceRegistry = simpleServiceRegistry;
       this.beans = new CopyOnWriteArrayList<Bean<?>>();
       this.newEnterpriseBeanMap = new ConcurrentHashMap<Class<?>, EnterpriseBean<?>>();
       this.riBeans = new ConcurrentHashMap<String, RIBean<?>>();
@@ -888,7 +888,7 @@
 
    public ServiceRegistry getServices()
    {
-      return serviceRegistry;
+      return simpleServiceRegistry;
    }
 
    /**

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -35,7 +35,6 @@
 import javax.inject.DefinitionException;
 import javax.interceptor.Interceptor;
 
-import org.jboss.webbeans.CurrentManager;
 import org.jboss.webbeans.ManagerImpl;
 import org.jboss.webbeans.bean.proxy.EnterpriseBeanInstance;
 import org.jboss.webbeans.bean.proxy.EnterpriseBeanProxyMethodHandler;
@@ -49,7 +48,6 @@
 import org.jboss.webbeans.introspector.AnnotatedMethod;
 import org.jboss.webbeans.log.LogProvider;
 import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.resources.spi.NamingContext;
 import org.jboss.webbeans.util.Proxies;
 
 /**
@@ -382,7 +380,7 @@
    
    public SessionObjectReference createReference()
    {
-      return manager.getServices().get(EjbServices.class).resolveEJB(getEjbDescriptor(), CurrentManager.rootManager().getServices().get(NamingContext.class));
+      return manager.getServices().get(EjbServices.class).resolveEjb(getEjbDescriptor());
    }
    
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -17,6 +17,7 @@
 
 package org.jboss.webbeans.bean;
 
+import java.lang.annotation.Annotation;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -25,12 +26,11 @@
 import javax.context.CreationalContext;
 import javax.inject.DefinitionException;
 import javax.inject.Initializer;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
 
 import org.jboss.webbeans.ManagerImpl;
 import org.jboss.webbeans.context.DependentContext;
 import org.jboss.webbeans.context.DependentStorageRequest;
+import org.jboss.webbeans.ejb.EJBApiAbstraction;
 import org.jboss.webbeans.ejb.spi.EjbServices;
 import org.jboss.webbeans.injection.AnnotatedInjectionPoint;
 import org.jboss.webbeans.injection.ConstructorInjectionPoint;
@@ -217,13 +217,14 @@
 
    protected void initEjbInjectionPoints()
    {
+      Class<? extends Annotation> ejbAnnotationType = manager.getServices().get(EJBApiAbstraction.class).EJB_ANNOTATION_CLASS;
       this.ejbInjectionPoints = new HashSet<AnnotatedInjectionPoint<?, ?>>();
-      for (AnnotatedField<?> field : annotatedItem.getAnnotatedFields(manager.getServices().get(EjbServices.class).getEJBAnnotation()))
+      for (AnnotatedField<?> field : annotatedItem.getAnnotatedFields(ejbAnnotationType))
       {
          this.ejbInjectionPoints.add(FieldInjectionPoint.of(this, field));
       }
 
-      for (AnnotatedMethod<?> method : annotatedItem.getAnnotatedMethods(manager.getServices().get(EjbServices.class).getEJBAnnotation()))
+      for (AnnotatedMethod<?> method : annotatedItem.getAnnotatedMethods(ejbAnnotationType))
       {
          this.ejbInjectionPoints.add(MethodInjectionPoint.of(this, method));
       }
@@ -232,18 +233,21 @@
    protected void initPersistenceUnitInjectionPoints()
    {
       this.persistenceUnitInjectionPoints = new HashSet<AnnotatedInjectionPoint<?, ?>>();
-      for (AnnotatedField<?> field : annotatedItem.getAnnotatedFields(manager.getServices().get(EjbServices.class).getPersistenceContextAnnotation()))
+      Class<? extends Annotation> persistenceContextAnnotationType = manager.getServices().get(EJBApiAbstraction.class).PERSISTENCE_CONTEXT_ANNOTATION_CLASS;
+      Object extendedPersistenceContextEnum = manager.getServices().get(EJBApiAbstraction.class).EXTENDED_PERSISTENCE_CONTEXT_ENUM_VALUE;
+      
+      for (AnnotatedField<?> field : annotatedItem.getAnnotatedFields(persistenceContextAnnotationType))
       {
-         if (field.getAnnotation(PersistenceContext.class).type().equals(PersistenceContextType.EXTENDED))
+         if (extendedPersistenceContextEnum.equals(Reflections.invokeAndWrap("type", field.getAnnotation(persistenceContextAnnotationType))))
          {
             throw new DefinitionException("Cannot inject an extended persistence context into " + field);
          }
          this.persistenceUnitInjectionPoints.add(FieldInjectionPoint.of(this, field));
       }
 
-      for (AnnotatedMethod<?> method : annotatedItem.getAnnotatedMethods(manager.getServices().get(EjbServices.class).getPersistenceContextAnnotation()))
+      for (AnnotatedMethod<?> method : annotatedItem.getAnnotatedMethods(persistenceContextAnnotationType))
       {
-         if (method.getAnnotation(PersistenceContext.class).type().equals(PersistenceContextType.EXTENDED))
+         if (extendedPersistenceContextEnum.equals(Reflections.invokeAndWrap("type", method.getAnnotation(persistenceContextAnnotationType))))
          {
             throw new DefinitionException("Cannot inject an extended persistence context into " + method);
          }
@@ -253,8 +257,9 @@
 
    protected void initResourceInjectionPoints()
    {
+      Class<? extends Annotation> resourceAnnotationType = manager.getServices().get(EJBApiAbstraction.class).RESOURCE_ANNOTATION_CLASS;
       this.resourceInjectionPoints = new HashSet<AnnotatedInjectionPoint<?, ?>>();
-      for (AnnotatedField<?> field : annotatedItem.getAnnotatedFields(manager.getServices().get(EjbServices.class).getResourceAnnotation()))
+      for (AnnotatedField<?> field : annotatedItem.getAnnotatedFields(resourceAnnotationType))
       {
          this.resourceInjectionPoints.add(FieldInjectionPoint.of(this, field));
       }
@@ -271,19 +276,19 @@
          NamingContext namingContext = manager.getServices().get(NamingContext.class);
          for (AnnotatedInjectionPoint<?, ?> injectionPoint : ejbInjectionPoints)
          {
-            Object ejbInstance = ejbServices.resolveEjb(injectionPoint, namingContext);
+            Object ejbInstance = ejbServices.resolveEjb(injectionPoint);
             injectionPoint.inject(beanInstance, ejbInstance);
          }
    
          for (AnnotatedInjectionPoint<?, ?> injectionPoint : persistenceUnitInjectionPoints)
          {
-            Object puInstance = ejbServices.resolvePersistenceContext(injectionPoint, namingContext);
+            Object puInstance = ejbServices.resolvePersistenceContext(injectionPoint);
             injectionPoint.inject(beanInstance, puInstance);
          }
    
          for (AnnotatedInjectionPoint<?, ?> injectionPoint : resourceInjectionPoints)
          {
-            Object resourceInstance = ejbServices.resolveResource(injectionPoint, namingContext);
+            Object resourceInstance = ejbServices.resolveResource(injectionPoint);
             injectionPoint.inject(beanInstance, resourceInstance);
          }
       }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -131,7 +131,7 @@
       {
          businessInterface = objectInterface;
       }
-      Object proxiedInstance = reference.getReference(businessInterface);
+      Object proxiedInstance = reference.getBusinessObject(businessInterface);
       Method proxiedMethod = Reflections.lookupMethod(method, proxiedInstance);
       Object returnValue = Reflections.invokeAndWrap(proxiedMethod, proxiedInstance, args);
       log.trace("Executed " + method + " on " + proxiedInstance + " with parameters " + args + " and got return value " + returnValue);

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -40,8 +40,8 @@
 import org.jboss.webbeans.jsf.JSFApiAbstraction;
 import org.jboss.webbeans.log.LogProvider;
 import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.resources.spi.ResourceLoader;
 import org.jboss.webbeans.servlet.ServletApiAbstraction;
+import org.jboss.webbeans.util.Reflections;
 
 public class BeanDeployer
 {
@@ -265,12 +265,12 @@
     */
    private boolean isTypeSimpleWebBean(AnnotatedClass<?> clazz)
    {
-      ResourceLoader resourceLoader = manager.getServices().get(ResourceLoader.class);
-      EJBApiAbstraction ejbApiAbstraction = new EJBApiAbstraction(resourceLoader);
-      JSFApiAbstraction jsfApiAbstraction = new JSFApiAbstraction(resourceLoader);
-      ServletApiAbstraction servletApiAbstraction = new ServletApiAbstraction(resourceLoader);
+      Class<?> rawType = clazz.getRawType();
+      EJBApiAbstraction ejbApiAbstraction = manager.getServices().get(EJBApiAbstraction.class);
+      JSFApiAbstraction jsfApiAbstraction = manager.getServices().get(JSFApiAbstraction.class);
+      ServletApiAbstraction servletApiAbstraction = manager.getServices().get(ServletApiAbstraction.class);
       // TODO: check 3.2.1 for more rules!!!!!!
-      return !clazz.isAbstract() && !clazz.isParameterizedType() && !servletApiAbstraction.SERVLET_CLASS.isAssignableFrom(clazz) && !servletApiAbstraction.FILTER_CLASS.isAssignableFrom(clazz) && !servletApiAbstraction.SERVLET_CONTEXT_LISTENER_CLASS.isAssignableFrom(clazz) && !servletApiAbstraction.HTTP_SESSION_LISTENER_CLASS.isAssignableFrom(clazz) && !servletApiAbstraction.SERVLET_REQUEST_LISTENER_CLASS.isAssignableFrom(clazz) && !ejbApiAbstraction.ENTERPRISE_BEAN_CLASS.isAssignableFrom(clazz) && !jsfApiAbstraction.UICOMPONENT_CLASS.isAssignableFrom(clazz) && hasSimpleWebBeanConstructor(clazz);
+      return !Reflections.isAbstract(rawType) && !Reflections.isParameterizedType(rawType) && !servletApiAbstraction.SERVLET_CLASS.isAssignableFrom(rawType) && !servletApiAbstraction.FILTER_CLASS.isAssignableFrom(rawType) && !servletApiAbstraction.SERVLET_CONTEXT_LISTENER_CLASS.isAssignableFrom(rawType) && !servletApiAbstraction.HTTP_SESSION_LISTENER_CLASS.isAssignableFrom(rawType) && !servletApiAbstraction.SERVLET_REQUEST_LISTENER_CLASS.isAssignableFrom(rawType) && !ejbApiAbstraction.ENTERPRISE_BEAN_CLASS.isAssignableFrom(rawType) && !jsfApiAbstraction.UICOMPONENT_CLASS.isAssignableFrom(rawType) && hasSimpleWebBeanConstructor(clazz);
    }
    
 

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-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -28,6 +28,7 @@
 import org.jboss.webbeans.bootstrap.api.Bootstrap;
 import org.jboss.webbeans.bootstrap.api.Environments;
 import org.jboss.webbeans.bootstrap.api.helpers.AbstractBootstrap;
+import org.jboss.webbeans.bootstrap.api.helpers.ServiceRegistries;
 import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
 import org.jboss.webbeans.context.ApplicationContext;
 import org.jboss.webbeans.context.ConversationContext;
@@ -40,7 +41,9 @@
 import org.jboss.webbeans.conversation.JavaSEConversationTerminator;
 import org.jboss.webbeans.conversation.NumericConversationIdGenerator;
 import org.jboss.webbeans.conversation.ServletConversationManager;
+import org.jboss.webbeans.ejb.EJBApiAbstraction;
 import org.jboss.webbeans.ejb.spi.EjbServices;
+import org.jboss.webbeans.jsf.JSFApiAbstraction;
 import org.jboss.webbeans.literal.DeployedLiteral;
 import org.jboss.webbeans.literal.InitializedLiteral;
 import org.jboss.webbeans.log.LogProvider;
@@ -50,6 +53,7 @@
 import org.jboss.webbeans.resources.spi.NamingContext;
 import org.jboss.webbeans.resources.spi.ResourceLoader;
 import org.jboss.webbeans.servlet.HttpSessionManager;
+import org.jboss.webbeans.servlet.ServletApiAbstraction;
 import org.jboss.webbeans.transaction.spi.TransactionServices;
 
 /**
@@ -84,12 +88,21 @@
       {
          log.info("EJB services not available. Session beans will be simple beans, injection into non-contextual EJBs, injection of @Resource, @PersistenceContext and @EJB in simple beans, injection of Java EE resources and JMS resources will not be available.");
       }
-      this.manager = new ManagerImpl(getServices());
+      addImplementationServices();
+      this.manager = new ManagerImpl(ServiceRegistries.unmodifiableServiceRegistry(getServices()));
       getServices().get(NamingContext.class).bind(ManagerImpl.JNDI_KEY, getManager());
       CurrentManager.setRootManager(manager);
       initializeContexts();
    }
    
+   private void addImplementationServices()
+   {
+      ResourceLoader resourceLoader = getServices().get(ResourceLoader.class);
+      getServices().add(EJBApiAbstraction.class, new EJBApiAbstraction(resourceLoader));
+      getServices().add(JSFApiAbstraction.class, new JSFApiAbstraction(resourceLoader));
+      getServices().add(ServletApiAbstraction.class, new ServletApiAbstraction(resourceLoader));
+   }
+   
    public ManagerImpl getManager()
    {
       return manager;

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/EJBApiAbstraction.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/EJBApiAbstraction.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/EJBApiAbstraction.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -17,7 +17,9 @@
 
 package org.jboss.webbeans.ejb;
 
-import org.jboss.webbeans.introspector.AnnotatedClass;
+import java.lang.annotation.Annotation;
+
+import org.jboss.webbeans.bootstrap.api.Service;
 import org.jboss.webbeans.resources.spi.ResourceLoader;
 import org.jboss.webbeans.util.ApiAbstraction;
 
@@ -26,15 +28,25 @@
  * 
  * @author Pete Muir
  */
-public class EJBApiAbstraction extends ApiAbstraction
+public class EJBApiAbstraction extends ApiAbstraction implements Service
 {
    
    public EJBApiAbstraction(ResourceLoader resourceLoader)
    {
       super(resourceLoader);
       ENTERPRISE_BEAN_CLASS = classForName("javax.ejb.EnterpriseBean");
+      PERSISTENCE_CONTEXT_ANNOTATION_CLASS = annotationTypeForName("javax.persistence.PersistenceContext");
+      EJB_ANNOTATION_CLASS = annotationTypeForName("javax.ejb.EJB");
+      RESOURCE_ANNOTATION_CLASS = annotationTypeForName("javax.annotation.Resource");
+      PERSISTENCE_CONTEXT_TYPE_CLASS = classForName("javax.persistence.PersistenceContextType");
+      EXTENDED_PERSISTENCE_CONTEXT_ENUM_VALUE = enumValue(PERSISTENCE_CONTEXT_TYPE_CLASS, "EXTENDED");
    }
 
-   public final AnnotatedClass<?> ENTERPRISE_BEAN_CLASS;
-
+   public final Class<?> PERSISTENCE_CONTEXT_TYPE_CLASS;
+   public final Class<?> ENTERPRISE_BEAN_CLASS;
+   public final Class<? extends Annotation> PERSISTENCE_CONTEXT_ANNOTATION_CLASS;
+   public final Class<? extends Annotation> EJB_ANNOTATION_CLASS;
+   public final Class<? extends Annotation> RESOURCE_ANNOTATION_CLASS;
+   public final Object EXTENDED_PERSISTENCE_CONTEXT_ENUM_VALUE;
+   
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -51,4 +51,6 @@
     */
    public <A> AnnotatedMethod<A> getMember(String memberName, AnnotatedClass<A> expectedType);
    
+   public Class<T> getRawType();
+   
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -186,6 +186,8 @@
    
    public boolean isAbstract();
    
+   public boolean isEnum();
+   
    public <S> S cast(Object object);
    
    public <U> AnnotatedClass<? extends U> asSubclass(AnnotatedClass<U> clazz);

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -106,6 +106,11 @@
       return delegate().isAbstract();
    }
    
+   public boolean isEnum()
+   {
+      return delegate().isEnum();
+   }
+   
    @Deprecated
    public AnnotatedMethod<?> getDeclaredMethod(Method method)
    {

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -259,6 +259,7 @@
    
    private final boolean _nonStaticMemberClass;
    private final boolean _abstract;
+   private final boolean _enum;
 
    
    public static <T> AnnotatedClass<T> of(Class<T> clazz)
@@ -279,6 +280,7 @@
       this.declaredMetaAnnotatedFields = new AnnotatedFieldMap();
       this._nonStaticMemberClass = Reflections.isNonMemberInnerClass(rawType);
       this._abstract = Reflections.isAbstract(rawType);
+      this._enum = rawType.isEnum();
       for (Class<?> c = rawType; c != Object.class && c != null; c = c.getSuperclass())
       {
          for (Field field : c.getDeclaredFields())
@@ -495,6 +497,11 @@
       return _abstract;
    }
    
+   public boolean isEnum()
+   {
+      return _enum;
+   }
+   
    /**
     * Gets the abstracted methods that have a certain annotation type present
     * 

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -100,7 +100,15 @@
          else
          {
             Class<?> clazz = constructor.getParameterTypes()[i];
-            Type type = constructor.getGenericParameterTypes()[i];
+            Type type;
+            if (constructor.getGenericParameterTypes().length > i)
+            {
+               type = constructor.getGenericParameterTypes()[i];
+            }
+            else
+            {
+               type = clazz;
+            }
             AnnotatedParameter<?> parameter = AnnotatedParameterImpl.of(new Annotation[0], clazz, type, this);
             parameters.add(parameter);
 

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JSFApiAbstraction.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JSFApiAbstraction.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JSFApiAbstraction.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -17,7 +17,7 @@
 
 package org.jboss.webbeans.jsf;
 
-import org.jboss.webbeans.introspector.AnnotatedClass;
+import org.jboss.webbeans.bootstrap.api.Service;
 import org.jboss.webbeans.resources.spi.ResourceLoader;
 import org.jboss.webbeans.util.ApiAbstraction;
 
@@ -27,11 +27,11 @@
  * @author Pete Muir
  * 
  */
-public class JSFApiAbstraction extends ApiAbstraction
+public class JSFApiAbstraction extends ApiAbstraction implements Service
 {
 
    // An UI component
-   public final AnnotatedClass<?> UICOMPONENT_CLASS;
+   public final Class<?> UICOMPONENT_CLASS;
    
    public JSFApiAbstraction(ResourceLoader resourceLoader)
    {

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockEjBServices.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockEjBServices.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockEjBServices.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -15,7 +15,6 @@
 import org.jboss.webbeans.ejb.api.SessionObjectReference;
 import org.jboss.webbeans.ejb.spi.EjbDescriptor;
 import org.jboss.webbeans.ejb.spi.EjbServices;
-import org.jboss.webbeans.resources.spi.NamingContext;
 
 public class MockEjBServices implements EjbServices
 {
@@ -37,12 +36,12 @@
       return PersistenceContext.class;
    }
    
-   public Object resolveEjb(InjectionPoint injectionPoint, NamingContext namingContext)
+   public Object resolveEjb(InjectionPoint injectionPoint)
    {
       return null;
    }
    
-   public Object resolvePersistenceContext(InjectionPoint injectionPoint, NamingContext namingContext)
+   public Object resolvePersistenceContext(InjectionPoint injectionPoint)
    {
       return null;
    }
@@ -52,7 +51,7 @@
       return Resource.class;
    }
    
-   public Object resolveResource(InjectionPoint injectionPoint, NamingContext namingContext)
+   public Object resolveResource(InjectionPoint injectionPoint)
    {
       return null;
    }
@@ -67,12 +66,12 @@
       return ejbDiscovery.discoverEjbs();
    }
 
-   public SessionObjectReference resolveEJB(EjbDescriptor<?> ejbDescriptor, NamingContext naming)
+   public SessionObjectReference resolveEjb(EjbDescriptor<?> ejbDescriptor)
    {
       return new SessionObjectReference()
       {
 
-         public <S> S getReference(Class<S> businessInterfaceType)
+         public <S> S getBusinessObject(Class<S> businessInterfaceType)
          {
             // TODO Auto-generated method stub
             return null;

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletApiAbstraction.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletApiAbstraction.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/servlet/ServletApiAbstraction.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -17,7 +17,7 @@
 
 package org.jboss.webbeans.servlet;
 
-import org.jboss.webbeans.introspector.AnnotatedClass;
+import org.jboss.webbeans.bootstrap.api.Service;
 import org.jboss.webbeans.resources.spi.ResourceLoader;
 import org.jboss.webbeans.util.ApiAbstraction;
 
@@ -26,14 +26,14 @@
  * 
  * @author Pete Muir
  */
-public class ServletApiAbstraction extends ApiAbstraction
+public class ServletApiAbstraction extends ApiAbstraction implements Service
 {
    
-   public final AnnotatedClass<?> SERVLET_CLASS;
-   public final AnnotatedClass<?> FILTER_CLASS;
-   public final AnnotatedClass<?> SERVLET_CONTEXT_LISTENER_CLASS;
-   public final AnnotatedClass<?> HTTP_SESSION_LISTENER_CLASS;
-   public final AnnotatedClass<?> SERVLET_REQUEST_LISTENER_CLASS;
+   public final Class<?> SERVLET_CLASS;
+   public final Class<?> FILTER_CLASS;
+   public final Class<?> SERVLET_CONTEXT_LISTENER_CLASS;
+   public final Class<?> HTTP_SESSION_LISTENER_CLASS;
+   public final Class<?> SERVLET_REQUEST_LISTENER_CLASS;
 
    /**
     * Constructor

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/ApiAbstraction.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/ApiAbstraction.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/ApiAbstraction.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -19,10 +19,6 @@
 
 import java.lang.annotation.Annotation;
 
-import org.jboss.webbeans.introspector.AnnotatedAnnotation;
-import org.jboss.webbeans.introspector.AnnotatedClass;
-import org.jboss.webbeans.introspector.jlr.AnnotatedAnnotationImpl;
-import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
 import org.jboss.webbeans.resources.spi.ResourceLoader;
 import org.jboss.webbeans.resources.spi.ResourceLoadingException;
 
@@ -34,9 +30,10 @@
 public class ApiAbstraction
 {
    
-   private static final AnnotatedAnnotation<DummyAnnotation> DUMMY_ANNOTATION = AnnotatedAnnotationImpl.of(DummyAnnotation.class);
+   private static final Class<DummyAnnotation> DUMMY_ANNOTATION = DummyAnnotation.class;
    
-   private static final AnnotatedClass<Dummy> DUMMY_CLASS = AnnotatedClassImpl.of(Dummy.class);
+   private static final Class<Dummy> DUMMY_CLASS = Dummy.class;
+   private static final Class<Object> OBJECT_CLASS = Object.class;
    
    private ResourceLoader resourceLoader;
 
@@ -73,11 +70,11 @@
     *         not found
     */
    @SuppressWarnings("unchecked")
-   protected AnnotatedAnnotation<?> annotationTypeForName(String name)
+   protected Class<? extends Annotation> annotationTypeForName(String name)
    {
       try
       {
-         return AnnotatedAnnotationImpl.of((Class<? extends Annotation>) resourceLoader.classForName(name));
+         return (Class<? extends Annotation>) resourceLoader.classForName(name);
       }
       catch (ResourceLoadingException cnfe)
       {
@@ -93,16 +90,36 @@
     *         found.
     */
    @SuppressWarnings("unchecked")
-   protected AnnotatedClass<?> classForName(String name)
+   protected Class<?> classForName(String name)
    {
       try
       {
-         return AnnotatedClassImpl.of(resourceLoader.classForName(name));
+         return resourceLoader.classForName(name);
       }
       catch (ResourceLoadingException cnfe)
       {
          return DUMMY_CLASS;
       }
    }
+   
+   protected Object enumValue(Class<?> clazz, String memberName)
+   {
+      if (!clazz.isEnum())
+      {
+         throw new IllegalArgumentException(clazz + " is not an enum!");
+      }
+      try
+      {
+         return clazz.getField(memberName);
+      }
+      catch (SecurityException e)
+      {
+         return null;
+      }
+      catch (NoSuchFieldException e)
+      {
+         return null;
+      }
+   }
 
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Reflections.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -325,6 +325,27 @@
          throw new ExecutionException("Error invoking method " + method.getName() + " on " + method.getDeclaringClass(), e);
       }
    }
+   
+   public static Object invokeAndWrap(String methodName, Object instance, Object... parameters)
+   {
+      Class<?>[] parameterTypes = new Class<?>[parameters.length];
+      for (int i = 0; i < parameters.length; i++)
+      {
+         parameterTypes[i] = parameters[i].getClass();
+      }
+      try
+      {
+         return invokeAndWrap(instance.getClass().getMethod(methodName, parameterTypes), instance, parameters);
+      }
+      catch (SecurityException e)
+      {
+         throw new ExecutionException("Error invoking method " + methodName + " on " + instance.getClass(), e);
+      }
+      catch (NoSuchMethodException e)
+      {
+         throw new ExecutionException("Error invoking method " + methodName + " on " + instance.getClass(), e);
+      }
+   }
 
    /**
     * Gets value of a field and wraps exceptions
@@ -348,6 +369,22 @@
          throw new ExecutionException("Error getting field " + field.getName() + " on " + field.getDeclaringClass(), e);
       }
    }
+   
+   public static Object getAndWrap(String fieldName, Object target)
+   {
+      try
+      {
+         return getAndWrap(target.getClass().getField(fieldName), target);
+      }
+      catch (SecurityException e)
+      {
+         throw new ExecutionException("Error getting field " + fieldName + " on " + target.getClass(), e);
+      }
+      catch (NoSuchFieldException e)
+      {
+         throw new ExecutionException("Error getting field " + fieldName + " on " + target.getClass(), e);
+      }
+   }
 
    /**
     * Looks up a method in the type hierarchy of an instance

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -1,84 +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.webbeans.bootstrap.api;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A registry for services
- * 
- * @author Pete Muir
- *
- */
-public class ServiceRegistry
-{
-   
-   private final Map<Class<? extends Service>, Service> services;
-   
-   public ServiceRegistry()
-   {
-      this.services = new HashMap<Class<? extends Service>, Service>();
-   }
-   
-   /**
-    * Add a service to bootstrap
-    * 
-    * @see Service
-    * 
-    * @param <S> the service type to add
-    * @param serviceType the service type to add
-    * @param service the service implementation
-    */
-   public <S extends Service> void add(java.lang.Class<S> type, S service) 
-   {
-      if (service == null)
-      {
-         services.remove(type);
-      }
-      else
-      {
-         services.put(type, service);
-      }
-   }
-   
-   /**
-    * Retrieve a service implementation
-    * 
-    * @param <S> the service type
-    * @param serviceType the service type
-    * @return the service implementation, or null if none is registered
-    */
-   @SuppressWarnings("unchecked")
-   public <S extends Service> S get(Class<S> type)
-   {
-      return (S) services.get(type);
-   }
-   
-   /**
-    * Check if a service is registered
-    * 
-    * @param <S> the service type
-    * @param serviceType the service type
-    * @return true if a service is registered, otherwise false
-    */
-   public <S extends Service> boolean contains(Class<S> type)
-   {
-      return services.containsKey(type);
-   }   
-   
-}

Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,41 @@
+package org.jboss.webbeans.bootstrap.api;
+
+/**
+ * A service registry
+ * 
+ * @author Pete Muir
+ *
+ */
+public interface ServiceRegistry
+{
+   
+   /**
+    * Add a service to bootstrap
+    * 
+    * @see Service
+    * 
+    * @param <S> the service type to add
+    * @param serviceType the service type to add
+    * @param service the service implementation
+    */
+   public <S extends Service> void add(java.lang.Class<S> type, S service);
+   
+   /**
+    * Retrieve a service implementation
+    * 
+    * @param <S> the service type
+    * @param serviceType the service type
+    * @return the service implementation, or null if none is registered
+    */
+   public <S extends Service> S get(Class<S> type);
+   
+   /**
+    * Check if a service is registered
+    * 
+    * @param <S> the service type
+    * @param serviceType the service type
+    * @return true if a service is registered, otherwise false
+    */
+   public <S extends Service> boolean contains(Class<S> type);
+   
+}
\ No newline at end of file

Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/AbstractBootstrap.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/AbstractBootstrap.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/AbstractBootstrap.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -39,14 +39,14 @@
  */
 public abstract class AbstractBootstrap implements Bootstrap
 {
-   private final ServiceRegistry serviceRegistry;
+   private final ServiceRegistry simpleServiceRegistry;
    private Environment environment = EE;
    
    private BeanStore applicationContext;
    
    public AbstractBootstrap()
    {
-      this.serviceRegistry = new ServiceRegistry();
+      this.simpleServiceRegistry = new SimpleServiceRegistry();
    }
 
    @Deprecated
@@ -142,7 +142,7 @@
    
    public ServiceRegistry getServices()
    {
-      return serviceRegistry;
+      return simpleServiceRegistry;
    }
    
 }
\ No newline at end of file

Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingServiceRegistry.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingServiceRegistry.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingServiceRegistry.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,26 @@
+package org.jboss.webbeans.bootstrap.api.helpers;
+
+import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
+
+public abstract class ForwardingServiceRegistry implements ServiceRegistry
+{
+   
+   protected abstract ServiceRegistry delegate();
+   
+   public <S extends Service> void add(Class<S> type, S service)
+   {
+      delegate().add(type, service);
+   }
+   
+   public <S extends Service> boolean contains(Class<S> type)
+   {
+      return delegate().contains(type);
+   }
+   
+   public <S extends Service> S get(Class<S> type)
+   {
+      return delegate().get(type);
+   }
+   
+}


Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingServiceRegistry.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ServiceRegistries.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ServiceRegistries.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ServiceRegistries.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,30 @@
+package org.jboss.webbeans.bootstrap.api.helpers;
+
+import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
+
+public class ServiceRegistries
+{
+   
+   private ServiceRegistries() {}
+   
+   public static ServiceRegistry unmodifiableServiceRegistry(final ServiceRegistry serviceRegistry)
+   {
+      return new ForwardingServiceRegistry()
+      {
+         
+         public <S extends Service> void add(java.lang.Class<S> type, S service) 
+         {
+            throw new UnsupportedOperationException("This service registry is unmodifiable");
+         }
+         
+         @Override
+         protected ServiceRegistry delegate()
+         {
+            return serviceRegistry;
+         }
+         
+      };
+   }
+   
+}


Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ServiceRegistries.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/SimpleServiceRegistry.java (from rev 2064, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/SimpleServiceRegistry.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/SimpleServiceRegistry.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,82 @@
+/*
+ * 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.bootstrap.api.helpers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
+
+/**
+ * A registry for services
+ * 
+ * @author Pete Muir
+ *
+ */
+class SimpleServiceRegistry implements ServiceRegistry
+{
+   
+   private final Map<Class<? extends Service>, Service> services;
+   
+   public SimpleServiceRegistry()
+   {
+      this.services = new HashMap<Class<? extends Service>, Service>();
+   }
+   
+   public <S extends Service> void add(java.lang.Class<S> type, S service) 
+   {
+      if (service == null)
+      {
+         services.remove(type);
+      }
+      else
+      {
+         services.put(type, service);
+      }
+   }
+   
+   @SuppressWarnings("unchecked")
+   public <S extends Service> S get(Class<S> type)
+   {
+      return (S) services.get(type);
+   }
+   
+   public <S extends Service> boolean contains(Class<S> type)
+   {
+      return services.containsKey(type);
+   }
+   
+   @Override
+   public String toString()
+   {
+      return services.toString();
+   }
+   
+   @Override
+   public int hashCode()
+   {
+      return services.hashCode();
+   }
+   
+   @Override
+   public boolean equals(Object obj)
+   {
+      return services.equals(obj);
+   }
+   
+}


Property changes on: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/SimpleServiceRegistry.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/api/SessionObjectReference.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/api/SessionObjectReference.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/api/SessionObjectReference.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -36,17 +36,20 @@
     *           the type of the business interface
     * @return a reference
     * 
-    * @throws IllegalStateException
+    * @throws IllegalArgumentException
+    *           if the business interface is not a local business interface of 
+    *           the session bean
+    * @throws NoSuchEJBException
     *           if the session object has already been removed
     */
-   public <S> S getReference(Class<S> businessInterfaceType);
+   public <S> S getBusinessObject(Class<S> businessInterfaceType);
    
    /**
     * Request the EJB container remove the stateful session object
     * 
     * @throws UnsupportedOperationException
     *            if the reference is not backed by a stateful session object
-    * @throws IllegalStateException
+    * @throws NoSuchEJBException
     *            if the session object has already been removed           
     */
    public void remove();

Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbServices.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbServices.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -17,13 +17,10 @@
 
 package org.jboss.webbeans.ejb.spi;
 
-import java.lang.annotation.Annotation;
-
 import javax.inject.manager.InjectionPoint;
 
 import org.jboss.webbeans.bootstrap.api.Service;
 import org.jboss.webbeans.ejb.api.SessionObjectReference;
-import org.jboss.webbeans.resources.spi.NamingContext;
 
 /**
  * A container should implement this interface to allow the Web Beans RI to
@@ -35,8 +32,6 @@
 public interface EjbServices extends Service
 {
    
-   public static final String PROPERTY_NAME = EjbServices.class.getName();
-   
    /**
     * Resolve the value for the given @EJB injection point
     * 
@@ -50,15 +45,13 @@
     * @throws IllegalStateException
     *            if no EJBs can be resolved for injection
     */
-   public Object resolveEjb(InjectionPoint injectionPoint, NamingContext namingContext);
+   public Object resolveEjb(InjectionPoint injectionPoint);
    
    /**
     * Resolve the value for the given @PersistenceContext injection point
     * 
     * @param injectionPoint
     *           the injection point metadata
-    * @param namingContext
-    *           the pluggable Web Beans JNDI lookup facility
     * @return an instance of the persistence unit
     * @throws IllegalArgumentException
     *            if the injection point is not annotated with
@@ -67,15 +60,13 @@
     * @throws IllegalStateException
     *            if no suitable persistence units can be resolved for injection
     */
-   public Object resolvePersistenceContext(InjectionPoint injectionPoint, NamingContext namingContext);
+   public Object resolvePersistenceContext(InjectionPoint injectionPoint);
    
    /**
     * Resolve the value for the given @Resource injection point
     * 
     * @param injectionPoint
     *           the injection point metadata
-    * @param namingContext
-    *           the pluggable Web Beans JNDI lookup facility
     * @return an instance of the resource
     * @throws IllegalArgumentException
     *            if the injection point is not annotated with @Resource, or, if
@@ -84,7 +75,7 @@
     * @throws IllegalStateException
     *            if no resource can be resolved for injection
     */
-   public Object resolveResource(InjectionPoint injectionPoint, NamingContext namingContext);
+   public Object resolveResource(InjectionPoint injectionPoint);
   
    /**
     * Request a reference to an EJB session object from the container. If the
@@ -92,10 +83,9 @@
     * the session bean is created before this method returns.
     * 
     * @param ejbDescriptor the ejb to resolve
-    * @param namingContext the pluggable Web Beans JNDI lookup facility
     * @return a reference to the session object
     */
-   public SessionObjectReference resolveEJB(EjbDescriptor<?> ejbDescriptor, NamingContext namingContext);
+   public SessionObjectReference resolveEjb(EjbDescriptor<?> ejbDescriptor);
    
    /**
     * Gets a descriptor for each EJB in the application
@@ -104,25 +94,4 @@
     */
    public Iterable<EjbDescriptor<?>> discoverEjbs();
    
-   /**
-    * Get the annotation which defines an @EJB injection point
-    * 
-    * @return the annotation which defines an @EJB injection point
-    */
-   public Class<? extends Annotation> getEJBAnnotation();
-   
-   /**
-    * Get the annotation which defines a @PersistenceContext injection point
-    * 
-    * @return the annotation which defines a @PersistenceContext injection point
-    */
-   public Class<? extends Annotation> getPersistenceContextAnnotation();
-   
-   /**
-    * Get the annotation which defines a @Resource injection point
-    * 
-    * @return the annotation which defines a @Resource injection point
-    */
-   public Class<? extends Annotation> getResourceAnnotation();
-   
 }

Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwardingEjbServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwardingEjbServices.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwardingEjbServices.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -1,13 +1,10 @@
 package org.jboss.webbeans.ejb.spi.helpers;
 
-import java.lang.annotation.Annotation;
-
 import javax.inject.manager.InjectionPoint;
 
 import org.jboss.webbeans.ejb.api.SessionObjectReference;
 import org.jboss.webbeans.ejb.spi.EjbDescriptor;
 import org.jboss.webbeans.ejb.spi.EjbServices;
-import org.jboss.webbeans.resources.spi.NamingContext;
 
 /**
  * An implementation of {@link EjbServices} which forwards all its method calls
@@ -24,40 +21,25 @@
    
    public abstract EjbServices delegate();
    
-   public Class<? extends Annotation> getEJBAnnotation()
+   public Object resolveEjb(InjectionPoint injectionPoint)
    {
-      return delegate().getEJBAnnotation();
+      return delegate().resolveEjb(injectionPoint);
    }
    
-   public Class<? extends Annotation> getPersistenceContextAnnotation()
+   public SessionObjectReference resolveEjb(EjbDescriptor<?> ejbDescriptor)
    {
-      return delegate().getPersistenceContextAnnotation();
+      return delegate().resolveEjb(ejbDescriptor);
    }
    
-   public Class<? extends Annotation> getResourceAnnotation()
+   public Object resolvePersistenceContext(InjectionPoint injectionPoint)
    {
-      return delegate().getResourceAnnotation();
+      return delegate().resolvePersistenceContext(injectionPoint);
    }
    
-   public Object resolveEjb(InjectionPoint injectionPoint, NamingContext namingContext)
+   public Object resolveResource(InjectionPoint injectionPoint)
    {
-      return delegate().resolveEjb(injectionPoint, namingContext);
+      return delegate().resolveResource(injectionPoint);
    }
-   
-   public SessionObjectReference resolveEJB(EjbDescriptor<?> ejbDescriptor, NamingContext namingContext)
-   {
-      return delegate().resolveEJB(ejbDescriptor, namingContext);
-   }
-   
-   public Object resolvePersistenceContext(InjectionPoint injectionPoint, NamingContext namingContext)
-   {
-      return delegate().resolvePersistenceContext(injectionPoint, namingContext);
-   }
-   
-   public Object resolveResource(InjectionPoint injectionPoint, NamingContext namingContext)
-   {
-      return delegate().resolveResource(injectionPoint, namingContext);
-   }
 
    public Iterable<EjbDescriptor<?>> discoverEjbs()
    {

Modified: ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockEjbServices.java
===================================================================
--- ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockEjbServices.java	2009-03-17 22:20:19 UTC (rev 2078)
+++ ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockEjbServices.java	2009-03-18 01:38:30 UTC (rev 2079)
@@ -7,7 +7,6 @@
 import org.jboss.webbeans.ejb.api.SessionObjectReference;
 import org.jboss.webbeans.ejb.spi.EjbDescriptor;
 import org.jboss.webbeans.ejb.spi.EjbServices;
-import org.jboss.webbeans.resources.spi.NamingContext;
 
 public class MockEjbServices implements EjbServices
 {
@@ -36,25 +35,25 @@
       return null;
    }
    
-   public SessionObjectReference resolveEJB(EjbDescriptor<?> ejbDescriptor, NamingContext namingContext)
+   public SessionObjectReference resolveEjb(EjbDescriptor<?> ejbDescriptor)
    {
       // TODO Auto-generated method stub
       return null;
    }
    
-   public Object resolveEjb(InjectionPoint injectionPoint, NamingContext namingContext)
+   public Object resolveEjb(InjectionPoint injectionPoint)
    {
       // TODO Auto-generated method stub
       return null;
    }
    
-   public Object resolvePersistenceContext(InjectionPoint injectionPoint, NamingContext namingContext)
+   public Object resolvePersistenceContext(InjectionPoint injectionPoint)
    {
       // TODO Auto-generated method stub
       return null;
    }
    
-   public Object resolveResource(InjectionPoint injectionPoint, NamingContext namingContext)
+   public Object resolveResource(InjectionPoint injectionPoint)
    {
       // TODO Auto-generated method stub
       return null;

Added: ri/trunk/tests/temp-testng-customsuite.xml
===================================================================
--- ri/trunk/tests/temp-testng-customsuite.xml	                        (rev 0)
+++ ri/trunk/tests/temp-testng-customsuite.xml	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,8 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="webbeans-core-tests">
+  <test verbose="2" name="org.jboss.webbeans.test.examples.ExampleTest" annotations="JDK">
+    <classes>
+      <class name="org.jboss.webbeans.test.examples.ExampleTest"/>
+    </classes>
+  </test>
+</suite>


Property changes on: ri/trunk/tests/temp-testng-customsuite.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/emailable-report.html
===================================================================
--- ri/trunk/tests/test-output/emailable-report.html	                        (rev 0)
+++ ri/trunk/tests/test-output/emailable-report.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>TestNG:  Unit Test</title>
+<style type="text/css">
+table caption,table.info_table,table.param,table.passed,table.failed {margin-bottom:10px;border:1px solid #000099;border-collapse:collapse;empty-cells:show;}
+table.info_table td,table.info_table th,table.param td,table.param th,table.passed td,table.passed th,table.failed td,table.failed th {
+border:1px solid #000099;padding:.25em .5em .25em .5em
+}
+table.param th {vertical-align:bottom}
+td.numi,th.numi,td.numi_attn {
+text-align:right
+}
+tr.total td {font-weight:bold}
+table caption {
+text-align:center;font-weight:bold;
+}
+table.passed tr.stripe td,table tr.passedodd td {background-color: #00AA00;}
+table.passed td,table tr.passedeven td {background-color: #33FF33;}
+table.passed tr.stripe td,table tr.skippedodd td {background-color: #cccccc;}
+table.passed td,table tr.skippedodd td {background-color: #dddddd;}
+table.failed tr.stripe td,table tr.failedodd td,table.param td.numi_attn {background-color: #FF3333;}
+table.failed td,table tr.failedeven td,table.param tr.stripe td.numi_attn {background-color: #DD0000;}
+tr.stripe td,tr.stripe th {background-color: #E6EBF9;}
+p.totop {font-size:85%;text-align:center;border-bottom:2px black solid}
+div.shootout {padding:2em;border:3px #4854A8 solid}
+</style>
+</head>
+<body>
+<table cellspacing=0 cellpadding=0 class="param">
+<tr><th>Test</th><th class="numi">Methods<br/>Passed</th><th class="numi">Scenarios<br/>Passed</th><th class="numi"># skipped</th><th class="numi"># failed</th><th class="numi">Total<br/>Time</th><th class="numi">Included<br/>Groups</th><th class="numi">Excluded<br/>Groups</th></tr>
+<tr><td style="text-align:left;padding-right:2em">org.jboss.webbeans.test.examples.ExampleTest</td><td class="numi">2</td><td class="numi">2</td><td class="numi">0</td><td class="numi">0</td><td class="numi">0.7 seconds</td><td class="numi"></td><td class="numi"></td></tr>
+</table>
+<a id="summary"></a>
+<table cellspacing=0 cellpadding=0 class="passed">
+<tr><th>Class</th><th>Method</th><th># of<br/>Scenarios</th><th>Time<br/>(Msecs)</th></tr>
+<tr><th colspan="4">org.jboss.webbeans.test.examples.ExampleTest &#8212; passed</th></tr>
+<tr class="passedodd"><td rowspan="2">org.jboss.webbeans.test.examples.ExampleTest<td><a href="#m1">testGameGenerator</a></td><td class="numi">1</td><td class="numi">49</td></tr><tr class="passedodd"><td><a href="#m2">testSentenceTranslator</a></td><td class="numi">1</td><td class="numi">6</td></tr>
+</table>
+<h1>org.jboss.webbeans.test.examples.ExampleTest</h1>
+<a id="m1"></a><h2>org.jboss.webbeans.test.examples.ExampleTest:testGameGenerator</h2>
+<p class="totop"><a href="#summary">back to summary</a></p>
+<a id="m2"></a><h2>org.jboss.webbeans.test.examples.ExampleTest:testSentenceTranslator</h2>
+<p class="totop"><a href="#summary">back to summary</a></p>
+</body></html>


Property changes on: ri/trunk/tests/test-output/emailable-report.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/index.html
===================================================================
--- ri/trunk/tests/test-output/index.html	                        (rev 0)
+++ ri/trunk/tests/test-output/index.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,9 @@
+<html>
+<head><title>Test results</title><link href="./testng.css" rel="stylesheet" type="text/css" />
+<link href="./my-testng.css" rel="stylesheet" type="text/css" />
+</head><body>
+<h2><p align='center'>Test results</p></h2>
+<table border='1' width='100%' class='main-page'><tr><th>Suite</th><th>Passed</th><th>Failed</th><th>Skipped</th><th>testng.xml</th></tr>
+<tr align='center' class='invocation-passed'><td><em>Total</em></td><td><em>2</em></td><td><em>0</em></td><td><em>0</em></td><td>&nbsp;</td></tr>
+<tr align='center' class='invocation-passed'><td><a href='webbeans-core-tests/index.html'>webbeans-core-tests</a></td>
+<td>2</td><td>0</td><td>0</td><td><a href='webbeans-core-tests/testng.xml.html'>Link</a></td></tr></table></body></html>


Property changes on: ri/trunk/tests/test-output/index.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/testng-failed.xml
===================================================================
--- ri/trunk/tests/test-output/testng-failed.xml	                        (rev 0)
+++ ri/trunk/tests/test-output/testng-failed.xml	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,17 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite thread-count="5" skipfailedinvocationCounts="false" verbose="1" name="Failed suite [webbeans-core-tests]" junit="false" annotations="JDK">
+  <test name="org.jboss.webbeans.test.examples.ExampleTest(failed)" junit="false" annotations="JDK">
+    <classes>
+      <class name="org.jboss.webbeans.test.examples.ExampleTest">
+        <methods>
+          <include name="afterClass"/>
+          <include name="testSentenceTranslator"/>
+          <include name="beforeClass"/>
+          <include name="afterSuite"/>
+          <include name="testGameGenerator"/>
+          <include name="beforeSuite"/>
+        </methods>
+      </class>
+    </classes>
+  </test>
+</suite>


Property changes on: ri/trunk/tests/test-output/testng-failed.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/testng-results.xml
===================================================================
--- ri/trunk/tests/test-output/testng-results.xml	                        (rev 0)
+++ ri/trunk/tests/test-output/testng-results.xml	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,39 @@
+<testng-results>
+  <reporter-output>
+  </reporter-output>
+  <suite name="webbeans-core-tests">
+    <groups>
+    </groups>
+    <test name="org.jboss.webbeans.test.examples.ExampleTest">
+      <class name="org.jboss.webbeans.test.examples.ExampleTest">
+        <test-method status="PASS" signature="beforeSuite(org.testng.ITestContext)" name="beforeSuite" is-config="true" duration-ms="39" started-at="2009-03-18T00:53:36Z" finished-at="2009-03-18T00:53:36Z">
+          <params>
+            <param index="0">
+              <value>
+                <![CDATA[org.testng.TestRunner at 76307efc]]>
+              </value>
+            </param>
+          </params>
+        </test-method>
+        <test-method status="PASS" signature="before()" name="before" is-config="true" duration-ms="0" started-at="2009-03-18T00:53:37Z" finished-at="2009-03-18T00:53:37Z">
+        </test-method>
+        <test-method status="PASS" signature="afterClass()" name="afterClass" is-config="true" duration-ms="1" started-at="2009-03-18T00:53:37Z" finished-at="2009-03-18T00:53:37Z">
+        </test-method>
+        <test-method status="PASS" signature="testGameGenerator()" name="testGameGenerator" duration-ms="49" started-at="2009-03-18T00:53:37Z" finished-at="2009-03-18T00:53:37Z">
+        </test-method>
+        <test-method status="PASS" signature="after()" name="after" is-config="true" duration-ms="0" started-at="2009-03-18T00:53:37Z" finished-at="2009-03-18T00:53:37Z">
+        </test-method>
+        <test-method status="PASS" signature="testSentenceTranslator()" name="testSentenceTranslator" duration-ms="6" started-at="2009-03-18T00:53:37Z" finished-at="2009-03-18T00:53:37Z">
+        </test-method>
+        <test-method status="PASS" signature="before()" name="before" is-config="true" duration-ms="0" started-at="2009-03-18T00:53:37Z" finished-at="2009-03-18T00:53:37Z">
+        </test-method>
+        <test-method status="PASS" signature="beforeClass()" name="beforeClass" is-config="true" duration-ms="672" started-at="2009-03-18T00:53:36Z" finished-at="2009-03-18T00:53:37Z">
+        </test-method>
+        <test-method status="PASS" signature="after()" name="after" is-config="true" duration-ms="1" started-at="2009-03-18T00:53:37Z" finished-at="2009-03-18T00:53:37Z">
+        </test-method>
+        <test-method status="PASS" signature="afterSuite()" name="afterSuite" is-config="true" duration-ms="1" started-at="2009-03-18T00:53:37Z" finished-at="2009-03-18T00:53:37Z">
+        </test-method>
+      </class>
+    </test>
+  </suite>
+</testng-results>


Property changes on: ri/trunk/tests/test-output/testng-results.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/testng.css
===================================================================
--- ri/trunk/tests/test-output/testng.css	                        (rev 0)
+++ ri/trunk/tests/test-output/testng.css	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,9 @@
+.invocation-failed,  .test-failed  { background-color: #DD0000; }
+.invocation-percent, .test-percent { background-color: #006600; }
+.invocation-passed,  .test-passed  { background-color: #00AA00; }
+.invocation-skipped, .test-skipped { background-color: #CCCC00; }
+
+.main-page {
+  font-size: x-large;
+}
+


Property changes on: ri/trunk/tests/test-output/testng.css
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/classes.html
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/classes.html	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/classes.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,50 @@
+<table border='1'>
+<tr>
+<th>Class name</th>
+<th>Method name</th>
+<th>Groups</th>
+</tr><tr>
+<td>org.jboss.webbeans.test.examples.ExampleTest</td>
+<td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr>
+<td align='center' colspan='3'>@Test</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>testSentenceTranslator</td>
+<td>&nbsp;</td></tr>
+<tr>
+<td>&nbsp;</td>
+<td>testGameGenerator</td>
+<td>&nbsp;</td></tr>
+<tr>
+<td align='center' colspan='3'>@BeforeClass</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>beforeClass</td>
+<td>scaffold </td>
+</tr>
+<tr>
+<td align='center' colspan='3'>@BeforeMethod</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>before</td>
+<td>&nbsp;</td></tr>
+<tr>
+<td align='center' colspan='3'>@AfterMethod</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>after</td>
+<td>&nbsp;</td></tr>
+<tr>
+<td align='center' colspan='3'>@AfterClass</td>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<td>afterClass</td>
+<td>scaffold </td>
+</tr>
+</table>


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/classes.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/groups.html
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/groups.html	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/groups.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1 @@
+<h2>Groups used for this test run</h2>
\ No newline at end of file


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/groups.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/index.html
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/index.html	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/index.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,6 @@
+<html><head><title>Results for webbeans-core-tests</title></head>
+<frameset cols="26%,74%">
+<frame src="toc.html" name="navFrame">
+<frame src="main.html" name="mainFrame">
+</frameset>
+</html>


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/index.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/main.html
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/main.html	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/main.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,2 @@
+<html><head><title>Results for webbeans-core-tests</title></head>
+<body>Select a result on the left-hand pane.</body></html>


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/main.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/methods-alphabetical.html
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/methods-alphabetical.html	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/methods-alphabetical.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,24 @@
+<h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>webbeans-core-tests</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
+<table border="1">
+<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
+<tr bgcolor="836be4">  <td>09/03/18 00:53:37</td>   <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;org.jboss.webbeans.test.unit.AbstractWebBeansTest.after()">&lt;&lt;after</td> 
+<td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="836be4">  <td>09/03/18 00:53:37</td>   <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;org.jboss.webbeans.test.unit.AbstractWebBeansTest.after()">&lt;&lt;after</td> 
+<td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="7b6fad">  <td>09/03/18 00:53:37</td>   <td>2</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;org.jboss.testharness.AbstractTest.afterClass()">&lt;&lt;afterClass</td> 
+<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="7b6fad">  <td>09/03/18 00:53:37</td>   <td>16</td> <td title="&lt;&lt;org.jboss.testharness.AbstractTest.afterSuite()">&lt;&lt;afterSuite</td> 
+<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="836be4">  <td>09/03/18 00:53:37</td>   <td>-50</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;org.jboss.webbeans.test.unit.AbstractWebBeansTest.before()">&gt;&gt;before</td> 
+<td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="836be4">  <td>09/03/18 00:53:37</td>   <td>-50</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;org.jboss.webbeans.test.unit.AbstractWebBeansTest.before()">&gt;&gt;before</td> 
+<td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="7b6fad">  <td>09/03/18 00:53:36</td>   <td>-733</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;org.jboss.testharness.AbstractTest.beforeClass()">&gt;&gt;beforeClass</td> 
+<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="836be4">  <td>09/03/18 00:53:36</td>   <td>-778</td> <td title="&gt;&gt;org.jboss.webbeans.test.unit.AbstractWebBeansTest.beforeSuite(org.testng.ITestContext)">&gt;&gt;beforeSuite</td> 
+<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="908fc5">  <td>09/03/18 00:53:37</td>   <td>-49</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="org.jboss.webbeans.test.examples.ExampleTest.testGameGenerator()">testGameGenerator</td> 
+  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="908fc5">  <td>09/03/18 00:53:37</td>   <td>-56</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="org.jboss.webbeans.test.examples.ExampleTest.testSentenceTranslator()">testSentenceTranslator</td> 
+  <td>main at 408255870</td>   <td></td> </tr>
+</table>


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/methods-alphabetical.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/methods-not-run.html
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/methods-not-run.html	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/methods-not-run.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,2 @@
+<h2>Methods that were not run</h2><table>
+</table>
\ No newline at end of file


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/methods-not-run.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/methods.html
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/methods.html	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/methods.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,24 @@
+<h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>webbeans-core-tests</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
+<table border="1">
+<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
+<tr bgcolor="836be4">  <td>09/03/18 00:53:36</td>   <td>0</td> <td title="&gt;&gt;org.jboss.webbeans.test.unit.AbstractWebBeansTest.beforeSuite(org.testng.ITestContext)">&gt;&gt;beforeSuite</td> 
+<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="7b6fad">  <td>09/03/18 00:53:36</td>   <td>45</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;org.jboss.testharness.AbstractTest.beforeClass()">&gt;&gt;beforeClass</td> 
+<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="836be4">  <td>09/03/18 00:53:37</td>   <td>728</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;org.jboss.webbeans.test.unit.AbstractWebBeansTest.before()">&gt;&gt;before</td> 
+<td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="908fc5">  <td>09/03/18 00:53:37</td>   <td>722</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="org.jboss.webbeans.test.examples.ExampleTest.testSentenceTranslator()">testSentenceTranslator</td> 
+  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="836be4">  <td>09/03/18 00:53:37</td>   <td>778</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;org.jboss.webbeans.test.unit.AbstractWebBeansTest.after()">&lt;&lt;after</td> 
+<td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="836be4">  <td>09/03/18 00:53:37</td>   <td>728</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;org.jboss.webbeans.test.unit.AbstractWebBeansTest.before()">&gt;&gt;before</td> 
+<td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="908fc5">  <td>09/03/18 00:53:37</td>   <td>729</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="org.jboss.webbeans.test.examples.ExampleTest.testGameGenerator()">testGameGenerator</td> 
+  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="836be4">  <td>09/03/18 00:53:37</td>   <td>778</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;org.jboss.webbeans.test.unit.AbstractWebBeansTest.after()">&lt;&lt;after</td> 
+<td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="7b6fad">  <td>09/03/18 00:53:37</td>   <td>780</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;org.jboss.testharness.AbstractTest.afterClass()">&lt;&lt;afterClass</td> 
+<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+<tr bgcolor="7b6fad">  <td>09/03/18 00:53:37</td>   <td>794</td> <td title="&lt;&lt;org.jboss.testharness.AbstractTest.afterSuite()">&lt;&lt;afterSuite</td> 
+<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>  <td>main at 408255870</td>   <td></td> </tr>
+</table>


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/methods.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.html
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.html	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,88 @@
+<html>
+<head>
+<title>TestNG:  org.jboss.webbeans.test.examples.ExampleTest</title>
+<link href="../testng.css" rel="stylesheet" type="text/css" />
+<link href="../my-testng.css" rel="stylesheet" type="text/css" />
+
+<style type="text/css">
+.log { display: none;} 
+.stack-trace { display: none;} 
+</style>
+<script type="text/javascript">
+<!--
+function flip(e) {
+  current = e.style.display;
+  if (current == 'block') {
+    e.style.display = 'none';
+    return 0;
+  }
+  else {
+    e.style.display = 'block';
+    return 1;
+  }
+}
+
+function toggleBox(szDivId, elem, msg1, msg2)
+{
+  var res = -1;  if (document.getElementById) {
+    res = flip(document.getElementById(szDivId));
+  }
+  else if (document.all) {
+    // this is the way old msie versions work
+    res = flip(document.all[szDivId]);
+  }
+  if(elem) {
+    if(res == 0) elem.innerHTML = msg1; else elem.innerHTML = msg2;
+  }
+
+}
+
+function toggleAllBoxes() {
+  if (document.getElementsByTagName) {
+    d = document.getElementsByTagName('div');
+    for (i = 0; i < d.length; i++) {
+      if (d[i].className == 'log') {
+        flip(d[i]);
+      }
+    }
+  }
+}
+
+// -->
+</script>
+
+</head>
+<body>
+<h2 align='center'>org.jboss.webbeans.test.examples.ExampleTest</h2><table border='1' align="center">
+<tr>
+<td>Tests passed/Failed/Skipped:</td><td>2/0/0</td>
+</tr><tr>
+<td>Started on:</td><td>Wed Mar 18 00:53:36 GMT 2009</td>
+</tr>
+<tr><td>Total time:</td><td>0 seconds (744 ms)</td>
+</tr><tr>
+<td>Included groups:</td><td></td>
+</tr><tr>
+<td>Excluded groups:</td><td></td>
+</tr>
+</table><p/>
+<small><i>(Hover the method name to see the test class name)</i></small><p/>
+<table width='100%' border='1' class='invocation-passed'>
+<tr><td colspan='3' align='center'><b>PASSED TESTS</b></td></tr>
+<tr><td><b>Test method</b></td>
+<td width="10%"><b>Time (seconds)</b></td>
+<td width="30%"><b>Exception</b></td>
+</tr>
+<tr>
+<td title='org.jboss.webbeans.test.examples.ExampleTest.testGameGenerator()'>testGameGenerator</td>
+<td>0</td>
+<td></td>
+</tr>
+<tr>
+<td title='org.jboss.webbeans.test.examples.ExampleTest.testSentenceTranslator()'>testSentenceTranslator</td>
+<td>0</td>
+<td></td>
+</tr>
+</table><p>
+</body>
+</html>
\ No newline at end of file


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.properties
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.properties	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.properties	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1 @@
+[SuiteResult org.jboss.webbeans.test.examples.ExampleTest]
\ No newline at end of file


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.properties
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.xml
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.xml	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.xml	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<testsuite name="org.jboss.webbeans.test.examples.ExampleTest" failures="0" tests="2" time="0.744" errors="0">
+  <properties/>
+  <testcase name="testSentenceTranslator" time="0.0060" classname="org.jboss.webbeans.test.examples.ExampleTest"/>
+  <testcase name="testGameGenerator" time="0.049" classname="org.jboss.webbeans.test.examples.ExampleTest"/>
+</testsuite>


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/org.jboss.webbeans.test.examples.ExampleTest.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/reporter-output.html
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/reporter-output.html	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/reporter-output.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1 @@
+<h2>Reporter output</h2><table></table>
\ No newline at end of file


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/reporter-output.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/testng-failed.xml
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/testng-failed.xml	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/testng-failed.xml	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,17 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite thread-count="5" skipfailedinvocationCounts="false" verbose="1" name="Failed suite [webbeans-core-tests]" junit="false" annotations="JDK">
+  <test name="org.jboss.webbeans.test.examples.ExampleTest(failed)" junit="false" annotations="JDK">
+    <classes>
+      <class name="org.jboss.webbeans.test.examples.ExampleTest">
+        <methods>
+          <include name="afterClass"/>
+          <include name="testSentenceTranslator"/>
+          <include name="beforeClass"/>
+          <include name="afterSuite"/>
+          <include name="testGameGenerator"/>
+          <include name="beforeSuite"/>
+        </methods>
+      </class>
+    </classes>
+  </test>
+</suite>


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/testng-failed.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/testng.xml.html
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/testng.xml.html	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/testng.xml.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1 @@
+<html><head><title>testng.xml for webbeans-core-tests</title></head><body><tt>&lt;!DOCTYPE&nbsp;suite&nbsp;SYSTEM&nbsp;"http://testng.org/testng-1.0.dtd"&gt;<br/>&lt;suite&nbsp;thread-count="5"&nbsp;skipfailedinvocationCounts="false"&nbsp;verbose="1"&nbsp;name="webbeans-core-tests"&nbsp;junit="false"&nbsp;annotations="JDK"&gt;<br/>&nbsp;&nbsp;&lt;test&nbsp;verbose="2"&nbsp;name="org.jboss.webbeans.test.examples.ExampleTest"&nbsp;junit="false"&nbsp;annotations="JDK"&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;classes&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;class&nbsp;name="org.jboss.webbeans.test.examples.ExampleTest"/&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/classes&gt;<br/>&nbsp;&nbsp;&lt;/test&gt;<br/>&lt;/suite&gt;<br/></tt></body></html>
\ No newline at end of file


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/testng.xml.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/tests/test-output/webbeans-core-tests/toc.html
===================================================================
--- ri/trunk/tests/test-output/webbeans-core-tests/toc.html	                        (rev 0)
+++ ri/trunk/tests/test-output/webbeans-core-tests/toc.html	2009-03-18 01:38:30 UTC (rev 2079)
@@ -0,0 +1,30 @@
+<html>
+<head>
+<title>Results for webbeans-core-tests</title>
+<link href="../testng.css" rel="stylesheet" type="text/css" />
+<link href="../my-testng.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<h3><p align="center">Results for<br/><em>webbeans-core-tests</em></p></h3>
+<table border='1' width='100%'>
+<tr valign='top'>
+<td>1 test</td>
+<td><a target='mainFrame' href='classes.html'>1 class</a></td>
+<td>2 methods:<br/>
+&nbsp;&nbsp;<a target='mainFrame' href='methods.html'>chronological</a><br/>
+&nbsp;&nbsp;<a target='mainFrame' href='methods-alphabetical.html'>alphabetical</a><br/>
+&nbsp;&nbsp;<a target='mainFrame' href='methods-not-run.html'>not run (0)</a></td>
+</tr>
+<tr>
+<td><a target='mainFrame' href='groups.html'>0 group</a></td>
+<td><a target='mainFrame' href='reporter-output.html'>reporter output</a></td>
+<td><a target='mainFrame' href='testng.xml.html'>testng.xml</a></td>
+</tr></table>
+<table width='100%' class='test-passed'>
+<tr><td>
+<table style='width: 100%'><tr><td valign='top'>org.jboss.webbeans.test.examples.ExampleTest (2/0/0)</td><td valign='top' align='right'>
+  <a href='org.jboss.webbeans.test.examples.ExampleTest.html' target='mainFrame'>Results</a>
+</td></tr></table>
+</td></tr><p/>
+</table>
+</body></html>
\ No newline at end of file


Property changes on: ri/trunk/tests/test-output/webbeans-core-tests/toc.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the weld-commits mailing list