[weld-commits] Weld SVN: r3875 - in ri/trunk/spi/src/main/java/org/jboss: webbeans and 44 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Wed Oct 7 23:07:47 EDT 2009


Author: shane.bryzak at jboss.com
Date: 2009-10-07 23:07:40 -0400 (Wed, 07 Oct 2009)
New Revision: 3875

Added:
   ri/trunk/spi/src/main/java/org/jboss/weld/
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Bootstrap.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environments.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Lifecycle.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Service.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/ServiceRegistry.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/SingletonProvider.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/helpers/
   ri/trunk/spi/src/main/java/org/jboss/weld/context/
   ri/trunk/spi/src/main/java/org/jboss/weld/context/api/
   ri/trunk/spi/src/main/java/org/jboss/weld/context/api/BeanStore.java
   ri/trunk/spi/src/main/java/org/jboss/weld/context/api/ContextualInstance.java
   ri/trunk/spi/src/main/java/org/jboss/weld/context/api/helpers/
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/api/
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/BusinessInterfaceDescriptor.java
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbDescriptor.java
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/InterceptorBindings.java
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/helpers/
   ri/trunk/spi/src/main/java/org/jboss/weld/injection/
   ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/
   ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/EjbInjectionServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionContext.java
   ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/ResourceInjectionServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/
   ri/trunk/spi/src/main/java/org/jboss/weld/manager/
   ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/
   ri/trunk/spi/src/main/java/org/jboss/weld/messaging/
   ri/trunk/spi/src/main/java/org/jboss/weld/persistence/
   ri/trunk/spi/src/main/java/org/jboss/weld/persistence/spi/
   ri/trunk/spi/src/main/java/org/jboss/weld/resources/
   ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/
   ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoader.java
   ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoadingException.java
   ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/helpers/
   ri/trunk/spi/src/main/java/org/jboss/weld/security/
   ri/trunk/spi/src/main/java/org/jboss/weld/security/spi/
   ri/trunk/spi/src/main/java/org/jboss/weld/servlet/
   ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/
   ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletListener.java
   ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/helpers/
   ri/trunk/spi/src/main/java/org/jboss/weld/transaction/
   ri/trunk/spi/src/main/java/org/jboss/weld/transaction/spi/
   ri/trunk/spi/src/main/java/org/jboss/weld/validation/
   ri/trunk/spi/src/main/java/org/jboss/weld/validation/spi/
   ri/trunk/spi/src/main/java/org/jboss/weld/ws/
Removed:
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Bootstrap.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environment.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environments.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Lifecycle.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Service.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Singleton.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/SingletonProvider.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BeanDeploymentArchive.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/Deployment.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/helpers/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/BeanStore.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContextualInstance.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/api/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/BusinessInterfaceDescriptor.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbDescriptor.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/InterceptorBindings.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/EjbInjectionServices.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionContext.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionServices.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/JpaInjectionServices.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/ResourceInjectionServices.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/helpers/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/helpers/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/security/spi/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java
   ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/transaction/spi/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/validation/spi/
   ri/trunk/spi/src/main/java/org/jboss/webbeans/ws/
Modified:
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingBootstrap.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingLifecycle.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingServiceRegistry.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ServiceRegistries.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/SimpleServiceRegistry.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/TCCLSingletonProvider.java
   ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/helpers/ForwardingBeanDeploymentArchive.java
   ri/trunk/spi/src/main/java/org/jboss/weld/context/api/helpers/AbstractMapBackedBeanStore.java
   ri/trunk/spi/src/main/java/org/jboss/weld/context/api/helpers/ConcurrentHashMapBeanStore.java
   ri/trunk/spi/src/main/java/org/jboss/weld/context/api/helpers/ForwardingBeanStore.java
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/api/SessionObjectReference.java
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/helpers/ForwadingBusinessInterfaceDescriptor.java
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/helpers/ForwardingEjbDescriptor.java
   ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/helpers/ForwardingEjbServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/AbstractResourceServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/ForwardingJpaInjectionServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/ForwardingResourceInjectionServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/ExecutorServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WebBeansManager.java
   ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/helpers/ForwardingResourceLoader.java
   ri/trunk/spi/src/main/java/org/jboss/weld/security/spi/SecurityServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/helpers/AbstractServletListener.java
   ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/helpers/ForwardingServletListener.java
   ri/trunk/spi/src/main/java/org/jboss/weld/transaction/spi/TransactionServices.java
   ri/trunk/spi/src/main/java/org/jboss/weld/validation/spi/ValidationServices.java
Log:
renamed spi packages


Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Bootstrap.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Bootstrap.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Bootstrap.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,137 +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 javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.enterprise.inject.spi.AfterDeploymentValidation;
-import javax.enterprise.inject.spi.BeforeBeanDiscovery;
-import javax.enterprise.inject.spi.BeforeShutdown;
-import javax.enterprise.inject.spi.Extension;
-
-import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
-import org.jboss.webbeans.bootstrap.spi.Deployment;
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.manager.api.WebBeansManager;
-
-/**
- * Application container initialization API for Web Beans.
- * 
- * To initialize the container you must call, in this order:
- * 
- * <ol>
- * <li>{@link #startContainer()}</li>
- * <li>{@link #startInitialization()}</li>
- * <li>{@link #deployBeans()}</li>
- * <li>{@link #validateBeans()}</li>
- * <li>{@link #endInitialization()}</li>
- * </ol>
- * 
- * To stop the container and clean up, you must call {@link #shutdown()}
- * 
- * @author Pete Muir
- * 
- */
-public interface Bootstrap
-{
-
-   /**
-    * Creates the application container:
-    * <ul>
-    * <li>Checks that the services required by the environment have been
-    * provided</li>
-    * <li>Adds container provided services</li>
-    * <li>Creates and initializes the built in contexts</li>
-    * <li>Creates the manager</li>
-    * </ul>
-    * 
-    * @param beanStore the bean store to use as backing for the application
-    *           context
-    * @param environment the environment in use, by default
-    *           {@link Environments.EE}
-    * @param deployment the Deployment to be booted
-    * @throws IllegalStateException if not all the services required for the
-    *            given environment are available
-    * 
-    */
-   public Bootstrap startContainer(Environment environment, Deployment deployment, BeanStore beanStore);
-
-   /**
-    * Starts the application container initialization process:
-    * 
-    * <ul>
-    * <li>Reads metadata from beans.xml and the {@link Deployment} service</li>
-    * <li>Starts the application context</li>
-    * <li>Starts the request context which lasts until
-    * {@link #endInitialization()} is called</li>
-    * <li>Discovers and creates {@link Extension} service providers</li>
-    * </ul>
-    * 
-    * Finally, the {@link BeforeBeanDiscovery} event is fired.
-    * 
-    */
-   public Bootstrap startInitialization();
-
-   /**
-    * Creates and deploys the application's beans:
-    * 
-    * <ul>
-    * <li>Creates and deploys the discovered beans</li>
-    * <li>Creates and deploys the built-in beans defined by the CDI
-    * specification</li>
-    * </ul>
-    * 
-    * Finally the {@link AfterBeanDiscovery} is event is fired
-    */
-   public Bootstrap deployBeans();
-
-   /**
-    * Validates the deployment.
-    * 
-    * After validation, the {@link AfterDeploymentValidation} event is fired
-    */
-   public Bootstrap validateBeans();
-
-   /**
-    * Cleans up after the initialization
-    * 
-    */
-   public Bootstrap endInitialization();
-
-   /**
-    * Causes the container to clean up and shutdown
-    * 
-    * Before the contain is shutdown the {@link BeforeShutdown} event is fired
-    */
-   public void shutdown();
-
-   /**
-    * Get the manager used for this beanDeploymentArchive.
-    * 
-    * If {@link #startContainer()} has not been called, this method will return
-    * null.
-    * 
-    * If the beanDeploymentArchive is not known to Web Beans (for example, it
-    * was not passed to the Web Beans as part of the {@link Deployment}, or has
-    * not yet been requested by
-    * {@link Deployment#loadBeanDeploymentArchive(Class)}), null will be
-    * returned.
-    * 
-    * @return the manager or null if not yet available or not found.
-    */
-   public WebBeansManager getManager(BeanDeploymentArchive beanDeploymentArchive);
-
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environment.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environment.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environment.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,39 +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.Set;
-
-/**
- * Represents an environment. Specifies the services Web Beans requires
- * 
- * @author Pete Muir
- *
- */
-public interface Environment
-{
-   
-   /**
-    * The deployment scoped services required for this environment
-    * 
-    * @return the services to require
-    */
-   public Set<Class<? extends Service>> getRequiredDeploymentServices();
-   
-   public Set<Class<? extends Service>> getRequiredBeanDeploymentArchiveServices();
- 
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environments.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environments.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environments.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,153 +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.HashSet;
-import java.util.Set;
-
-import org.jboss.webbeans.ejb.spi.EjbServices;
-import org.jboss.webbeans.injection.spi.EjbInjectionServices;
-import org.jboss.webbeans.injection.spi.InjectionServices;
-import org.jboss.webbeans.injection.spi.JpaInjectionServices;
-import org.jboss.webbeans.injection.spi.ResourceInjectionServices;
-import org.jboss.webbeans.resources.spi.ResourceLoader;
-import org.jboss.webbeans.security.spi.SecurityServices;
-import org.jboss.webbeans.servlet.api.ServletServices;
-import org.jboss.webbeans.transaction.spi.TransactionServices;
-import org.jboss.webbeans.validation.spi.ValidationServices;
-
-/**
- * Requirements for various well known environments.
- * 
- * @author Pete Muir
- *
- */
-public enum Environments implements Environment
-{
- 
-   /**
-    * Java EE5 or Java EE6
-    * 
-    * In this environment, Web Beans requires that {@link JpaInjectionServices},
-    * {@link ResourceInjectionServices} and {@link EjbInjectionServices} are
-    * present, and so will perform EE-style field injection on managed beans
-    * itself
-    */
-   EE_INJECT(new EnvironmentBuilder()
-         .addRequiredDeploymentService(TransactionServices.class)
-         .addRequiredDeploymentService(ResourceLoader.class)
-         .addRequiredDeploymentService(SecurityServices.class)
-         .addRequiredDeploymentService(ValidationServices.class)
-         .addRequiredDeploymentService(ServletServices.class)
-         .addRequiredDeploymentService(EjbServices.class)
-         .addRequiredBeanDeploymentArchiveService(JpaInjectionServices.class)
-         .addRequiredBeanDeploymentArchiveService(ResourceInjectionServices.class)
-         .addRequiredBeanDeploymentArchiveService(EjbInjectionServices.class)
-   ),
-   
-   /**
-    * Java EE5 or Java EE6
-    * 
-    * In this environment, Web Beans requires that {@link InjectionServices} are
-    * present, and expects the container to use this callback to perform EE-style
-    * injection
-    * 
-    */
-   EE(new EnvironmentBuilder()
-         .addRequiredDeploymentService(TransactionServices.class)
-         .addRequiredDeploymentService(ResourceLoader.class)
-         .addRequiredDeploymentService(SecurityServices.class)
-         .addRequiredDeploymentService(ValidationServices.class)
-         .addRequiredDeploymentService(ServletServices.class)
-         .addRequiredDeploymentService(EjbServices.class)
-         .addRequiredBeanDeploymentArchiveService(InjectionServices.class)
-   ),
-   
-   
-   
-   /**
-    * Servlet container such as Tomcat
-    */
-   SERVLET(new EnvironmentBuilder()
-         .addRequiredDeploymentService(ResourceLoader.class)
-         .addRequiredDeploymentService(ServletServices.class)
-   ),
-   
-   /**
-    * Java SE
-    */
-   SE(new EnvironmentBuilder()
-   );
-   
-   private final Set<Class<? extends Service>> requiredDeploymentServices;
-   
-   private final Set<Class<? extends Service>> requiredBeanDeploymentArchiveServices;
-   
-   private Environments(EnvironmentBuilder builder)
-   {
-      this.requiredDeploymentServices = builder.getRequiredDeploymentServices();
-      this.requiredBeanDeploymentArchiveServices = builder.getRequiredBeanDeploymentArchiveServices();
-   }
-
-   public Set<Class<? extends Service>> getRequiredDeploymentServices()
-   {
-      return requiredDeploymentServices;
-   }
-   
-   public Set<Class<? extends Service>> getRequiredBeanDeploymentArchiveServices()
-   {
-      return requiredBeanDeploymentArchiveServices;
-   }
-   
-   private static class EnvironmentBuilder
-   {
-      
-      private final Set<Class<? extends Service>> requiredDeploymentServices;
-      
-      private final Set<Class<? extends Service>> requiredBeanDeploymentArchiveServices;
-      
-      private EnvironmentBuilder()
-      {
-         this.requiredBeanDeploymentArchiveServices = new HashSet<Class<? extends Service>>();
-         this.requiredDeploymentServices = new HashSet<Class<? extends Service>>();
-      }
-      
-      private Set<Class<? extends Service>> getRequiredBeanDeploymentArchiveServices()
-      {
-         return requiredBeanDeploymentArchiveServices;
-      }
-      
-      private Set<Class<? extends Service>> getRequiredDeploymentServices()
-      {
-         return requiredDeploymentServices;
-      }
-      
-      private EnvironmentBuilder addRequiredDeploymentService(Class<? extends Service> service)
-      {
-         this.requiredDeploymentServices.add(service);
-         return this;
-      }
-      
-      private EnvironmentBuilder addRequiredBeanDeploymentArchiveService(Class<? extends Service> service)
-      {
-         this.requiredBeanDeploymentArchiveServices.add(service);
-         return this;
-      }
-      
-   }
-   
-}
\ No newline at end of file

Deleted: 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-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Lifecycle.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,50 +0,0 @@
-package org.jboss.webbeans.bootstrap.api;
-
-import javax.enterprise.context.spi.Context;
-
-import org.jboss.webbeans.context.api.BeanStore;
-
-/**
- * Note Lifecycle is not complete, and the API may change.
- * 
- * {@link Lifecycle} is a per-deployment service.
- * 
- * @author pmuir
- *
- */
-public interface Lifecycle
-{
-
-   public void restoreSession(String id, BeanStore sessionBeanStore);
-
-   public void endSession(String id, BeanStore sessionBeanStore);
-
-   public void beginRequest(String id, BeanStore requestBeanStore);
-
-   public void endRequest(String id, BeanStore requestBeanStore);
-
-   public boolean isRequestActive();
-   
-   public boolean isSessionActive();
-   
-   public boolean isApplicationActive();
-   
-   public boolean isConversationActive();
-
-   public void beginApplication(BeanStore applicationBeanStore);
-
-   public void endApplication();
-
-   public Context getApplicationContext();
-   
-   public Context getSingletonContext();
-
-   public Context getSessionContext();
-
-   public Context getConversationContext();
-
-   public Context getRequestContext();
-
-   public Context getDependentContext();
-
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Service.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Service.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Service.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,33 +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;
-
-/**
- * Marks a Service which is used by Web Beans to interact with it's environment
- * @author Pete Muir
- *
- */
-public interface Service
-{
-   
-   /**
-    * Called by Web beans when it is shutting down, allowing the service to
-    * perform any cleanup needed.
-    */
-   public void cleanup();
-   
-}

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-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,62 +0,0 @@
-package org.jboss.webbeans.bootstrap.api;
-
-import java.util.Collection;
-import java.util.Set;
-import java.util.Map.Entry;
-
-/**
- * A service registry
- * 
- * @author Pete Muir
- *
- */
-public interface ServiceRegistry extends Iterable<Service>
-{
-   
-   /**
-    * Add a service
-    * 
-    * @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(Class<S> type, S service);
-   
-   /**
-    * Add services
-    * 
-    * @param services
-    */
-   public void addAll(Collection<Entry<Class<? extends Service>, Service>> services);
-   
-   public Set<Entry<Class<? extends Service>, Service>> entrySet();
-   
-   /**
-    * 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);
-   
-   /**
-    * Clear up the services registered, by calling {@link Service#cleanup()} on
-    * each registered service
-    */
-   public void cleanup();
-   
-   
-   
-}
\ No newline at end of file

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Singleton.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Singleton.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Singleton.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,70 +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.
- * 
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * 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;
-
-/**
- * Holds a reference to an application singleton. This singleton is used 
- * internally by Web Beans to store various application scoped objects.
- * 
- * This allows Web Beans to operate as a shared library. In a shared mode, the 
- * same instance of WebBeans implementation is used by all the applications in 
- * a server environment. In the exclusive  mode, each application loads a 
- * separate copy of WebBeans implementation at the application level. 
- * 
- * Alternative implementations of Singleton can be used as required
- *
- * @see SingletonProvider
- * @author Sanjeeb.Sahoo at Sun.COM
- * @author Pete Muir
- */
-public interface Singleton<T>
-{
-    /**
-     * Access the singleton
-     * 
-     * @return a singleton object
-     * @throws IllegalStateException if the singleton is not set
-     */
-    public T get();
-    
-    /**
-     * Check if the singleton is set
-     * 
-     * @return true if the singleton is set
-     */
-    public boolean isSet();
-
-    /**
-     * Store a singleton
-     * 
-     * @param object the object to store
-     */
-    public void set(T object);
-    
-    /**
-     * Clear the singleton
-     */
-    public void clear();
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/SingletonProvider.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/SingletonProvider.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/SingletonProvider.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,123 +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.
- * 
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * 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 org.jboss.webbeans.bootstrap.api.helpers.IsolatedStaticSingletonProvider;
-import org.jboss.webbeans.bootstrap.api.helpers.TCCLSingletonProvider;
-
-/**
- * A provider of {@link Singleton}s
- * 
- * @see IsolatedStaticSingletonProvider
- * @see TCCLSingletonProvider
- * 
- * @author Sanjeeb.Sahoo at Sun.COM
- * @author Pete Muir
- */
-public abstract class SingletonProvider
-{
-   /*
-    * Singleton pattern. Upon first access (see instance()), it initializes
-    * itself by a default implementation. Containers are free to explicitly
-    * initialize it by calling initialize() method.
-    */
-   private static volatile SingletonProvider INSTANCE;
-
-   private static final String DEFAULT_SCOPE_FACTORY = IsolatedStaticSingletonProvider.class.getName();
-
-   public static SingletonProvider instance()
-   {
-      if (INSTANCE == null)
-      {
-         synchronized (SingletonProvider.class)
-         {
-            if (INSTANCE == null)
-            {
-               /*
-                * TODO: We should discover ScopeFactory implementation using
-                * Service Provider Mechanism. In the absence of any explicitly
-                * configured service, should we default to the default
-                * implementation.
-                */
-               initializeWithDefaultScope();
-            }
-         }
-      }
-      return INSTANCE;
-   }
-
-   protected SingletonProvider()
-   {
-   }
-
-   /**
-    * Create a new singleton
-    * 
-    * @param expectedType represents the type of Java object stored in the singleton
-    * @return a singelton
-    */
-   public abstract <T> Singleton<T> create(Class<? extends T> expectedType);
-
-   /**
-    * Initialize with the default instance
-    */
-   private static void initializeWithDefaultScope()
-   {
-      try
-      {
-         Class<?> aClass = Class.forName(DEFAULT_SCOPE_FACTORY);
-         INSTANCE = (SingletonProvider) aClass.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   /**
-    * Initialize with an explicit instance
-    * 
-    * @param instance
-    */
-   public static void initialize(SingletonProvider instance)
-   {
-      synchronized (SingletonProvider.class)
-      {
-         if (INSTANCE == null)
-         {
-            INSTANCE = instance;
-         }
-         else
-         {
-            throw new RuntimeException("SingletonProvider is already initialized with " + INSTANCE);
-         }
-      }
-   }
-   
-   public static void reset()
-   {
-      INSTANCE = null;
-   }
-
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BeanDeploymentArchive.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BeanDeploymentArchive.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BeanDeploymentArchive.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,108 +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.spi;
-
-import java.net.URL;
-import java.util.Collection;
-
-import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
-import org.jboss.webbeans.ejb.spi.EjbDescriptor;
-
-/**
- * Represents a CDI bean deployment archive.
- * 
- * A deployment archive is any library jar, library directory, EJB jar, rar
- * archive or any war WEB-INF/classes directory contained in the Java EE
- * deployment (as defined in the Java Platform, Enterprise Edition (Java EE)
- * Specification, v6, Section 8.1.2).
- * 
- * TODO Java SE definition of a deployment archive
- * 
- * A bean deployment archive is any deployment archive with a META-INF/beans.xml
- * file, or for a war, with a WEB-INF/beans.xml.
- * 
- * The container is allowed to specify a deployment archive as
- * {@link BeanDeploymentArchive} even if no beans.xml is present (for example, a
- * container could define a deployment archive with container specific metadata
- * to be a bean deployment archive).
- * 
- * @see Deployment
- * 
- * @author Pete Muir
- * 
- */
-public interface BeanDeploymentArchive
-{
-
-   /**
-    * Get the bean deployment archives which are accessible to this bean
-    * deployment archive and adjacent to it in the deployment archive graph.
-    * 
-    * Cycles in the accessible BeanDeploymentArchive graph are allowed. If a 
-    * cycle is detected by Web Beans, it will be automatically removed by Web
-    * Beans. This means any implementor of this interface don't need to worry
-    * about circularities.
-    * 
-    * @return the accessible bean deployment archives
-    */
-   public Collection<BeanDeploymentArchive> getBeanDeploymentArchives();
-
-   /**
-    * Gets all classes in the bean deployment archive
-    * 
-    * @return the classes, empty if no classes are present
-    */
-   public Collection<Class<?>> getBeanClasses();
-
-   /**
-    * Get any deployment descriptors in the bean deployment archive.
-    * 
-    * The container will normally return a single deployment descriptor per bean
-    * deployment archive (the physical META-INF/beans.xml or WEB-INF/beans.xml),
-    * however it is permitted to return other deployment descriptors defined
-    * using other methods.
-    * 
-    * @return the URLs pointing to the deployment descriptor,
-    *         or an empty set if none are present
-    */
-   public Collection<URL> getBeansXml();
-
-   /**
-    * Get all the EJBs in the deployment archive
-    * 
-    * @return the EJBs, or empty if no EJBs are present or if
-    *         this is not an EJB archive
-    */
-   public Collection<EjbDescriptor<?>> getEjbs();
-   
-   /**
-    * Get the Bean Deployment Archive scoped services
-    * 
-    * @return
-    */
-   public ServiceRegistry getServices();
-   
-   /**
-    * Get a string which uniquely identifies the {@link BeanDeploymentArchive} within
-    * the {@link Deployment}. The identifier must be consistent between multiple
-    * occurrences of this deployment.
-    * 
-    * @return
-    */
-   public String getId();
-
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/Deployment.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/Deployment.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/Deployment.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,154 +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.spi;
-
-import java.util.Collection;
-
-import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
-
-/**
- * Represents a deployment of a CDI application.
- * 
- * <h3>Background</h3>
- * 
- * <p>
- * Java EE defines a series of accessibility rules for classloading, which CDI
- * extends to cover bean resolution. For example a bean in the war can inject a
- * bean in an ejb-jar, but not vice-versa.
- * </p>
- * 
- * <p>
- * These rules are defined via the MANIFEST.MF <a
- * href="http://java.sun.com/javase/6/docs/technotes/guides/extensions/"
- * >Extension Mechanism Architecture</a> and <a
- * href="http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html">JAR
- * File Specification</a>.
- * </p>
- * 
- * <h3>Deployment structure representation</h3>
- * 
- * <p>
- * Web Beans will request the bean archive deployment structure during the bean
- * discovery initialization step. After this step, CDI allows users to define
- * bean's programmatically, possibly with bean classes from a deployment archive
- * which is currently not a bean deployment archive. Web Beans will request the
- * {@link BeanDeploymentArchive} for each programmatically using
- * {@link #loadBeanDeploymentArchive(Class)}. If any unknown
- * {@link BeanDeploymentArchive}s are loaded, before Web Beans proceeds to
- * validating the deployment, the bean archive deployment structure will
- * re-requested.
- * </p>
- * 
- * <p>
- * The BeanDeploymentArchive tree represents the "logical structure" of the
- * deployment; Given two archives A and B, which have a transitive closure of
- * accessible archives A' and B', it allowable for the the archives A & B to be
- * represented as a single BeanDeploymentArchive, assuming that A' and B' are
- * bi-directionally accessible.
- * </p>
- * 
- * <p>
- * For an application deployed as an ear to a Java EE container, all library
- * jars, EJB jars, rars and war WEB-INF/classes directories should be searched,
- * and the bean deployment archive structure built.
- * </p>
- * 
- * <p>
- * For an application deployed as a war to a Java EE or Servlet container, all
- * library jars and the WEB-INF/classes directory should be searched, and the
- * bean deployment archive structure built.
- * </p>
- * 
- * <p>
- * For an application deployed in the SE environment, all library jars and
- * classpath directories should be searched, and the bean deployment archive
- * structure built. A single, logical deployment archive will be built for all
- * beans and beans.xml files found on the classpath.
- * </p>
- * 
- * <h3>A Java EE example</h3>
- * 
- * <p>
- * Given an ejb-module A (not as part of an ear), an ear B (containing an
- * ejb-jar C which uses the standard mechanism to reference module A, libraries
- * F bundled in /lib, and a war D which references module C), and a war E (which
- * references module A and bundles libraries G in /WEB-INF/lib) all deployed.
- * </p>
- * 
- * <p>
- * War E would have be able to resolve beans from ejb module A, libraries G, as
- * well as other app server libraries. Furthermore, any libraries in G will be
- * able to resolve beans in other libraries G as well as in ejb module A and war
- * E. Ejb module A will not be able to resolve beans in war E or libraries G. It
- * would be legal to represent any libraries G as a single logical
- * BeanDeploymentArchive, also incorportating classes in war E.
- * </p>
- * 
- * <p>
- * War D would be able to resolve beans from from ejb module C, module A
- * (transitively via C), libraries F, as well as other app server libraries. Ejb
- * module C can resolve beans in libraries F as well as module A, but not beans
- * in War D. Ejb module A cannot resolve beans in libraries F, module A or war
- * D. It would be legal to represent libraries F as a single logical
- * BeanDeploymentArchive.
- * </p>
- * 
- * @see BeanDeploymentArchive
- * 
- * @author Pete Muir
- * 
- */
-public interface Deployment
-{
-
-   /**
-    * Get the bean deployment archives which are part of this deployment
-    * and adjacent to it in the deployment archive graph. This should include
-    * all Java EE modules such as WARs, EJB jars and RARs.
-    * 
-    * Cycles in the accessible BeanDeploymentArchive graph are allowed. If a 
-    * cycle is detected by Web Beans, it will be automatically removed by Web
-    * Beans. This means any implementor of this interface don't need to worry
-    * about circularities.
-    * 
-    * @return the accessible bean deployment archives
-    * 
-    */
-   public Collection<BeanDeploymentArchive> getBeanDeploymentArchives();
-
-   /**
-    * Load the {@link BeanDeploymentArchive} containing the given class.
-    * 
-    * If the deployment archive containing the given class is not currently a
-    * bean deployment archive, it should be added to the bean deployment archive
-    * graph and returned. If the deployment archive is currently a bean
-    * deployment archive it should be returned.
-    * 
-    * @param beanClass the bean class to load
-    * @return the {@link BeanDeploymentArchive} containing the bean class
-    */
-   public BeanDeploymentArchive loadBeanDeploymentArchive(Class<?> beanClass);
-  
-
-   /**
-    * Get the services available to this deployment
-    * 
-    * @return the services available
-    */
-   public ServiceRegistry getServices();
-
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/BeanStore.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/BeanStore.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/BeanStore.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,58 +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.context.api;
-
-import java.util.Collection;
-
-
-/**
- * Interface for different implementations of Contextual instance storage.
- * 
- * @author Nicklas Karlsson
- * 
- */
-public interface BeanStore
-{
-   /**
-    * Gets an instance of a contextual from the store
-    * 
-    * @param contextual The id of the contextual to return
-    * @return The instance. Null if not found
-    */
-   public abstract <T> ContextualInstance<T> get(String id);
-
-   /**
-    * Clears the store of contextual instances
-    */
-   public abstract void clear();
-
-   /**
-    * Returns the current contextual instances in the store
-    * 
-    * @return the instances
-    */
-   public abstract Collection<String> getContextualIds();
-
-   /**
-    * Adds a bean instance to the storage
-    * 
-    * @param contextualInstance the contextual instance
-    * @return the id for the instance
-    */
-   public abstract <T> void put(String id, ContextualInstance<T> contextualInstance);
-}
\ No newline at end of file

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContextualInstance.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContextualInstance.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContextualInstance.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.context.api;
-
-import javax.enterprise.context.spi.Contextual;
-import javax.enterprise.context.spi.CreationalContext;
-
-public interface ContextualInstance<T>
-{
-   
-   public T getInstance();
-   
-   public CreationalContext<T> getCreationalContext();
-   
-   public Contextual<T> getContextual();
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/BusinessInterfaceDescriptor.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/BusinessInterfaceDescriptor.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/BusinessInterfaceDescriptor.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,35 +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.ejb.spi;
-
-/**
- * Represents the business interface of an EJB
- * 
- * @author Pete Muir
- *
- * @param <T>
- */
-public interface BusinessInterfaceDescriptor<T>
-{
-
-   /**
-    * Gets the business interface class
-    */
-   public Class<T> getInterface();
-   
-}
\ No newline at end of file

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbDescriptor.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbDescriptor.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbDescriptor.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,90 +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.ejb.spi;
-
-import java.lang.reflect.Method;
-import java.util.Collection;
-
-
-/**
- * EJB metadata from the EJB descriptor
- * 
- * @author Pete Muir
- *
- * @param <T> the bean type
- */
-public interface EjbDescriptor<T>
-{
-   
-   /**
-    * Gets the EJB type
-    * 
-    * @return The EJB Bean class
-    */
-   public Class<T> getBeanClass();
-
-   /**
-    * Gets the local business interfaces of the EJB
-    * 
-    * @return An iterator over the local business interfaces
-    */
-   public Collection<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces();
-   
-   /**
-    * Get the EJB name
-    * 
-    * @return
-    */
-   public String getEjbName();
-   
-   /**
-    * Get the remove methods of the EJB
-    * 
-    * @return An iterator over the remove methods
-    */
-   public Collection<Method> getRemoveMethods();
-
-   /**
-    * Indicates if the bean is a stateless session bean 
-    * 
-    * @return True if stateless, false otherwise
-    */
-   public boolean isStateless();
-
-   /**
-    * Indicates if the bean is a EJB 3.1 Singleton session bean
-    * 
-    * @return True if the bean is a singleton, false otherwise
-    */
-   public boolean isSingleton();
-
-   /**
-    * Indicates if the EJB is a stateful session bean
-    * 
-    * @return True if the bean is stateful, false otherwise
-    */
-   public boolean isStateful();
-
-   /**
-    * Indicates if the EJB is an MDB
-    * 
-    * @return True if the bean is an MDB, false otherwise
-    */
-   public boolean isMessageDriven();
-   
-}

Deleted: 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-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,55 +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.ejb.spi;
-
-import org.jboss.webbeans.bootstrap.api.Service;
-import org.jboss.webbeans.ejb.api.SessionObjectReference;
-
-/**
- * A container should implement this interface to allow Web Beans to
- * resolve EJB and discover EJBs
- *
- * {@link EjbServices} is a per-deployment service.
- *
- * @author Pete Muir
- * @author Marius Bogoevici
- *
- */
-public interface EjbServices extends Service
-{
-
-   /**
-    * Request a reference to an EJB session object from the container. If the
-    * EJB being resolved is a stateful session bean, the container should ensure
-    * the session bean is created before this method returns.
-    *
-    * @param ejbDescriptor the ejb to resolve
-    * @return a reference to the session object
-    */
-   public SessionObjectReference resolveEjb(EjbDescriptor<?> ejbDescriptor);
-
-   /**
-    * Provides interceptor binding metadata to the container. This method should be
-    * called before any EJB object is created.
-    *
-    * @param ejbDescriptor the ejb to bound interceptors to
-    * @param interceptorBindings the interceptor bindings descriptor
-    */
-   public void registerInterceptors(EjbDescriptor<?> ejbDescriptor, InterceptorBindings interceptorBindings);
-
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/InterceptorBindings.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/InterceptorBindings.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/InterceptorBindings.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.ejb.spi;
-
-import java.util.List;
-import java.util.Collection;
-import java.lang.reflect.Method;
-
-import javax.enterprise.inject.spi.Interceptor;
-import javax.enterprise.inject.spi.InterceptionType;
-import javax.interceptor.InterceptorBinding;
-
-/**
- * @author Marius Bogoevici
- */
-public interface InterceptorBindings
-{
-   /**
-    * Returns all interceptors that are bound to an EJB object through
-    * the {@link InterceptorBinding} mechanism and are
-    * enabled through the beans.xml file.
-    *
-    * This includes class and method-bound interceptors.The purpose of this
-    * method is to indicate what interceptors does the container need to
-    * interact with, for a given EJB.
-    *
-    * Note: in the case of an EJB, the expectation is that the interpretation
-    * of {link @javax.interceptor.Interceptors} is left to the container, and
-    * the interceptors provided by the binding are complementary
-    */
-   Collection<Interceptor<?>> getAllInterceptors();
-
-
-   /**
-    * Returns the interceptors that are applicable to a given {@link InterceptionType}
-    * and method (bound by {@link InterceptorBinding}).
-    * This includes class and method-bound interceptors, but no interceptors
-    * bound by EJB-specific mechanisms.
-    *
-    * @param interceptionType - the interception type (non-lifecycle)
-    * @param method - the method that is to be intercepted
-    * @return - an immutable list of interceptors applicable to the method (empty if no such
-    *          interceptors exist)
-    * @throw IllegalArgumentException if interceptionType is not {@link InterceptionType.AROUND_INVOKE}
-    *        or {@link InterceptionType.AROUND_TIMEOUT}
-    */
-   List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method);
-
-
-    /**
-    * Returns the lifecycle interceptors that are applicable to a given {@link InterceptionType}
-    * (bound by {@link InterceptorBinding}).
-    *
-    * This includes class and method-bound interceptors, but no interceptors
-    * bound by EJB-specific mechanisms.
-    *
-    * @param interceptionType - the interception type (lifecycle)
-    * @param method - the method that is to be intercepted
-    * @return - an immutable list of interceptors applicable to the method (empty if no such
-    *          interceptors exist)
-    * @throw IllegalArgumentException if interceptionType not {@link InterceptionType.AROUND_INVOKE}
-    *        or {@link InterceptionType.AROUND_TIMEOUT}
-    */
-   List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType);
-
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/EjbInjectionServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/EjbInjectionServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/EjbInjectionServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,50 +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.injection.spi;
-
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.webbeans.bootstrap.api.Service;
-
-/**
- * A container should implement this interface to allow Web Beans to
- * resolve EJB.
- * 
- * {@link EjbInjectionServices} is a per-module service.
- * 
- * @author Pete Muir
- * 
- */
-public interface EjbInjectionServices extends Service
-{
-   
-   /**
-    * Resolve the value for the given @EJB injection point
-    * 
-    * @param injectionPoint
-    *           the injection point metadata
-    * @return an instance of the EJB
-    * @throws IllegalArgumentException
-    *            if the injection point is not annotated with @EJB, or, if the
-    *            injection point is a method that doesn't follow JavaBean
-    *            conventions
-   
-    */
-   public Object resolveEjb(InjectionPoint injectionPoint);
-   
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionContext.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionContext.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionContext.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,34 +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.injection.spi;
-
-import javax.enterprise.inject.spi.InjectionTarget;
-
-/**
- * @author pmuir
- *
- */
-public interface InjectionContext<T>
-{
-   
-   public void proceed();
-   
-   public T getTarget();
-   
-   public InjectionTarget<T> getInjectionTarget();
-
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,45 +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.injection.spi;
-
-import org.jboss.webbeans.bootstrap.api.Service;
-
-/**
- * Provides callbacks to the container when Web Beans performs injection on an
- * InjectionTarget, managed bean or session bean
- * 
- * This service may be used to provide EE-style injection.
- * 
- * {@link InjectionServices} is a per-BeanDeploymentArchive service.
- * 
- * @author pmuir
- *
- */
-public interface InjectionServices extends Service
-{
-   
-   /**
-    * Callback for injection.
-    * 
-    * Call {@link InjectionContext#proceed()} to cause CDI-style injection to
-    * occur.
-    * 
-    * @param injectionContext
-    */
-   public <T> void aroundInject(InjectionContext<T> injectionContext);
-
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/JpaInjectionServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/JpaInjectionServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/JpaInjectionServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,67 +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.injection.spi;
-
-import javax.enterprise.inject.spi.InjectionPoint;
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-
-import org.jboss.webbeans.bootstrap.api.Service;
-
-/**
- * A container should implement this interface to allow the Web Beans RI to
- * resolve JPA persistence units and discover entities
- * 
- * {@link JpaInjectionServices} is a per-module service.
- * 
- * @author Pete Muir
- * 
- */
-public interface JpaInjectionServices extends Service
-{
-	
-   /**
-    * Resolve the value for the given @PersistenceContext injection point
-    * 
-    * @param injectionPoint
-    *           the injection point metadata
-    * @return an instance of the entity manager
-    * @throws IllegalArgumentException
-    *            if the injection point is not annotated with 
-    *            @PersistenceContext, or, if the injection point is a method 
-    *            that doesn't follow JavaBean conventions
-    * @throws IllegalStateException
-    *            if no suitable persistence units can be resolved for injection
-    */
-   public EntityManager resolvePersistenceContext(InjectionPoint injectionPoint);
-   
-   /**
-    * Resolve the value for the given @PersistenceUnit injection point
-    * 
-    * @param injectionPoint
-    *           the injection point metadata
-    * @return an instance of the entity manager
-    * @throws IllegalArgumentException
-    *            if the injection point is not annotated with 
-    *            @PersistenceUnit, or, if the injection point is a method 
-    *            that doesn't follow JavaBean conventions
-    * @throws IllegalStateException
-    *            if no suitable persistence units can be resolved for injection
-    */
-   public EntityManagerFactory resolvePersistenceUnit(InjectionPoint injectionPoint);
-   
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/ResourceInjectionServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/ResourceInjectionServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/ResourceInjectionServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,63 +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.injection.spi;
-
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.webbeans.bootstrap.api.Service;
-
-/**
- * A container should implement this interface to allow the Web Beans RI to
- * resolve Resources
- * 
- * {@link ResourceInjectionServices} is per-module service.
- * 
- * @author Pete Muir
- * 
- */
-public interface ResourceInjectionServices extends Service
-{
-   
-   /**
-    * Resolve the value for the given @Resource injection point
-    * 
-    * @param injectionPoint
-    *           the injection point metadata
-    * @return an instance of the resource
-    * @throws IllegalArgumentException
-    *            if the injection point is not annotated with @Resource, or, if
-    *            the injection point is a method that doesn't follow JavaBean
-    *            conventions
-    * @throws IllegalStateException
-    *            if no resource can be resolved for injection
-    */
-   public Object resolveResource(InjectionPoint injectionPoint);
-   
-   /**
-    * Resolve the value for the given JNDI name and mapped name
-    * 
-    * @param injectionPoint
-    *           the injection point metadata
-    * @return an instance of the resource
-    * @throws IllegalStateException
-    *            if no resource can be resolved for injection
-    * @throws IllegalArgumentException
-    *            if both jndiName and mappedName are null
-    */
-   public Object resolveResource(String jndiName, String mappedName);
-   
-}
\ No newline at end of file

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,64 +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.resources.spi;
-
-import java.net.URL;
-import java.util.Collection;
-
-import org.jboss.webbeans.bootstrap.api.Service;
-
-/**
- * Resource loading/class creation services for Web Beans. By default an
- * implementation which uses the Thread Context ClassLoader if available, 
- * otherwise the classloading of the implementation is used.
- * 
- * The {@link ResourceLoader} is a per-deployment service.
- * 
- * @author Pete Muir
- *
- */
-public interface ResourceLoader extends Service
-{
-   // Name of the resource loader
-   public static final String PROPERTY_NAME = ResourceLoader.class.getName();
-   
-   /**
-    * Creates a class from a given FQCN
-    * 
-    * @param name The name of the clsas
-    * @return The class
-    */
-   public Class<?> classForName(String name);
-   
-   /**
-    * Gets a resource as a URL by name
-    * 
-    * @param name The name of the resource
-    * @return An URL to the resource
-    */
-   public URL getResource(String name);
-   
-   /**
-    * Gets resources as URLs by name
-    * 
-    * @param name The name of the resource
-    * @return references to the URLS
-    */
-   public Collection<URL> getResources(String name);
-   
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,57 +0,0 @@
-/**
- * 
- */
-package org.jboss.webbeans.resources.spi;
-
-
-
-/**
- * Exception thrown when errors occur while loading resource
- * 
- * @author Pete Muir
- *
- */
-public class ResourceLoadingException extends RuntimeException
-{
-   private static final long serialVersionUID = 1L;
-
-   /**
-    * Constructor
-    */
-   public ResourceLoadingException()
-   {
-      super();
-   }
-
-   /**
-    * Constructor
-    * 
-    * @param message The message
-    * @param throwable The exception
-    */
-   public ResourceLoadingException(String message, Throwable throwable)
-   {
-      super(message, throwable);
-   }
-
-   /**
-    * Constructor
-    * 
-    * @param message The message
-    */
-   public ResourceLoadingException(String message)
-   {
-      super(message);
-   }
-
-   /**
-    * Constructor
-    * 
-    * @param throwable The exception
-    */
-   public ResourceLoadingException(Throwable throwable)
-   {
-      super(throwable);
-   }
-   
-}
\ No newline at end of file

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.servlet.api;
-
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletRequestListener;
-import javax.servlet.http.HttpSessionListener;
-
-public interface ServletListener extends ServletContextListener, ServletRequestListener, HttpSessionListener
-{
-   
-   
-   
-}

Deleted: ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,46 +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.servlet.api;
-
-import javax.servlet.ServletContext;
-
-import org.jboss.webbeans.bootstrap.api.Service;
-import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
-
-/**
- * Allows the container to identify BDA in use for a request. This method will
- * be called, in the same thread as the request, every time Web Beans needs to
- * identify a request.
- * 
- * {@link ServletServices} is a per-deployment service.
- * 
- * @author pmuir
- *
- */
-public interface ServletServices extends Service
-{
-   
-   /**
-    * Get the BDA for the current request. The ServletContext is provided for
-    * context.
-    * 
-    * @param ctx
-    * @return
-    */
-   public BeanDeploymentArchive getBeanDeploymentArchive(ServletContext ctx);
-
-}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Bootstrap.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Bootstrap.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Bootstrap.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Bootstrap.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,137 @@
+/*
+ * 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.weld.bootstrap.api;
+
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.AfterDeploymentValidation;
+import javax.enterprise.inject.spi.BeforeBeanDiscovery;
+import javax.enterprise.inject.spi.BeforeShutdown;
+import javax.enterprise.inject.spi.Extension;
+
+import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.weld.bootstrap.spi.Deployment;
+import org.jboss.weld.context.api.BeanStore;
+import org.jboss.weld.manager.api.WebBeansManager;
+
+/**
+ * Application container initialization API for Web Beans.
+ * 
+ * To initialize the container you must call, in this order:
+ * 
+ * <ol>
+ * <li>{@link #startContainer()}</li>
+ * <li>{@link #startInitialization()}</li>
+ * <li>{@link #deployBeans()}</li>
+ * <li>{@link #validateBeans()}</li>
+ * <li>{@link #endInitialization()}</li>
+ * </ol>
+ * 
+ * To stop the container and clean up, you must call {@link #shutdown()}
+ * 
+ * @author Pete Muir
+ * 
+ */
+public interface Bootstrap
+{
+
+   /**
+    * Creates the application container:
+    * <ul>
+    * <li>Checks that the services required by the environment have been
+    * provided</li>
+    * <li>Adds container provided services</li>
+    * <li>Creates and initializes the built in contexts</li>
+    * <li>Creates the manager</li>
+    * </ul>
+    * 
+    * @param beanStore the bean store to use as backing for the application
+    *           context
+    * @param environment the environment in use, by default
+    *           {@link Environments.EE}
+    * @param deployment the Deployment to be booted
+    * @throws IllegalStateException if not all the services required for the
+    *            given environment are available
+    * 
+    */
+   public Bootstrap startContainer(Environment environment, Deployment deployment, BeanStore beanStore);
+
+   /**
+    * Starts the application container initialization process:
+    * 
+    * <ul>
+    * <li>Reads metadata from beans.xml and the {@link Deployment} service</li>
+    * <li>Starts the application context</li>
+    * <li>Starts the request context which lasts until
+    * {@link #endInitialization()} is called</li>
+    * <li>Discovers and creates {@link Extension} service providers</li>
+    * </ul>
+    * 
+    * Finally, the {@link BeforeBeanDiscovery} event is fired.
+    * 
+    */
+   public Bootstrap startInitialization();
+
+   /**
+    * Creates and deploys the application's beans:
+    * 
+    * <ul>
+    * <li>Creates and deploys the discovered beans</li>
+    * <li>Creates and deploys the built-in beans defined by the CDI
+    * specification</li>
+    * </ul>
+    * 
+    * Finally the {@link AfterBeanDiscovery} is event is fired
+    */
+   public Bootstrap deployBeans();
+
+   /**
+    * Validates the deployment.
+    * 
+    * After validation, the {@link AfterDeploymentValidation} event is fired
+    */
+   public Bootstrap validateBeans();
+
+   /**
+    * Cleans up after the initialization
+    * 
+    */
+   public Bootstrap endInitialization();
+
+   /**
+    * Causes the container to clean up and shutdown
+    * 
+    * Before the contain is shutdown the {@link BeforeShutdown} event is fired
+    */
+   public void shutdown();
+
+   /**
+    * Get the manager used for this beanDeploymentArchive.
+    * 
+    * If {@link #startContainer()} has not been called, this method will return
+    * null.
+    * 
+    * If the beanDeploymentArchive is not known to Web Beans (for example, it
+    * was not passed to the Web Beans as part of the {@link Deployment}, or has
+    * not yet been requested by
+    * {@link Deployment#loadBeanDeploymentArchive(Class)}), null will be
+    * returned.
+    * 
+    * @return the manager or null if not yet available or not found.
+    */
+   public WebBeansManager getManager(BeanDeploymentArchive beanDeploymentArchive);
+
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environment.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.bootstrap.api;
+
+import java.util.Set;
+
+/**
+ * Represents an environment. Specifies the services Web Beans requires
+ * 
+ * @author Pete Muir
+ *
+ */
+public interface Environment
+{
+   
+   /**
+    * The deployment scoped services required for this environment
+    * 
+    * @return the services to require
+    */
+   public Set<Class<? extends Service>> getRequiredDeploymentServices();
+   
+   public Set<Class<? extends Service>> getRequiredBeanDeploymentArchiveServices();
+ 
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environments.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Environments.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environments.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environments.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,153 @@
+/*
+ * 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.weld.bootstrap.api;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.weld.ejb.spi.EjbServices;
+import org.jboss.weld.injection.spi.EjbInjectionServices;
+import org.jboss.weld.injection.spi.InjectionServices;
+import org.jboss.weld.injection.spi.JpaInjectionServices;
+import org.jboss.weld.injection.spi.ResourceInjectionServices;
+import org.jboss.weld.resources.spi.ResourceLoader;
+import org.jboss.weld.security.spi.SecurityServices;
+import org.jboss.weld.servlet.api.ServletServices;
+import org.jboss.weld.transaction.spi.TransactionServices;
+import org.jboss.weld.validation.spi.ValidationServices;
+
+/**
+ * Requirements for various well known environments.
+ * 
+ * @author Pete Muir
+ *
+ */
+public enum Environments implements Environment
+{
+ 
+   /**
+    * Java EE5 or Java EE6
+    * 
+    * In this environment, Web Beans requires that {@link JpaInjectionServices},
+    * {@link ResourceInjectionServices} and {@link EjbInjectionServices} are
+    * present, and so will perform EE-style field injection on managed beans
+    * itself
+    */
+   EE_INJECT(new EnvironmentBuilder()
+         .addRequiredDeploymentService(TransactionServices.class)
+         .addRequiredDeploymentService(ResourceLoader.class)
+         .addRequiredDeploymentService(SecurityServices.class)
+         .addRequiredDeploymentService(ValidationServices.class)
+         .addRequiredDeploymentService(ServletServices.class)
+         .addRequiredDeploymentService(EjbServices.class)
+         .addRequiredBeanDeploymentArchiveService(JpaInjectionServices.class)
+         .addRequiredBeanDeploymentArchiveService(ResourceInjectionServices.class)
+         .addRequiredBeanDeploymentArchiveService(EjbInjectionServices.class)
+   ),
+   
+   /**
+    * Java EE5 or Java EE6
+    * 
+    * In this environment, Web Beans requires that {@link InjectionServices} are
+    * present, and expects the container to use this callback to perform EE-style
+    * injection
+    * 
+    */
+   EE(new EnvironmentBuilder()
+         .addRequiredDeploymentService(TransactionServices.class)
+         .addRequiredDeploymentService(ResourceLoader.class)
+         .addRequiredDeploymentService(SecurityServices.class)
+         .addRequiredDeploymentService(ValidationServices.class)
+         .addRequiredDeploymentService(ServletServices.class)
+         .addRequiredDeploymentService(EjbServices.class)
+         .addRequiredBeanDeploymentArchiveService(InjectionServices.class)
+   ),
+   
+   
+   
+   /**
+    * Servlet container such as Tomcat
+    */
+   SERVLET(new EnvironmentBuilder()
+         .addRequiredDeploymentService(ResourceLoader.class)
+         .addRequiredDeploymentService(ServletServices.class)
+   ),
+   
+   /**
+    * Java SE
+    */
+   SE(new EnvironmentBuilder()
+   );
+   
+   private final Set<Class<? extends Service>> requiredDeploymentServices;
+   
+   private final Set<Class<? extends Service>> requiredBeanDeploymentArchiveServices;
+   
+   private Environments(EnvironmentBuilder builder)
+   {
+      this.requiredDeploymentServices = builder.getRequiredDeploymentServices();
+      this.requiredBeanDeploymentArchiveServices = builder.getRequiredBeanDeploymentArchiveServices();
+   }
+
+   public Set<Class<? extends Service>> getRequiredDeploymentServices()
+   {
+      return requiredDeploymentServices;
+   }
+   
+   public Set<Class<? extends Service>> getRequiredBeanDeploymentArchiveServices()
+   {
+      return requiredBeanDeploymentArchiveServices;
+   }
+   
+   private static class EnvironmentBuilder
+   {
+      
+      private final Set<Class<? extends Service>> requiredDeploymentServices;
+      
+      private final Set<Class<? extends Service>> requiredBeanDeploymentArchiveServices;
+      
+      private EnvironmentBuilder()
+      {
+         this.requiredBeanDeploymentArchiveServices = new HashSet<Class<? extends Service>>();
+         this.requiredDeploymentServices = new HashSet<Class<? extends Service>>();
+      }
+      
+      private Set<Class<? extends Service>> getRequiredBeanDeploymentArchiveServices()
+      {
+         return requiredBeanDeploymentArchiveServices;
+      }
+      
+      private Set<Class<? extends Service>> getRequiredDeploymentServices()
+      {
+         return requiredDeploymentServices;
+      }
+      
+      private EnvironmentBuilder addRequiredDeploymentService(Class<? extends Service> service)
+      {
+         this.requiredDeploymentServices.add(service);
+         return this;
+      }
+      
+      private EnvironmentBuilder addRequiredBeanDeploymentArchiveService(Class<? extends Service> service)
+      {
+         this.requiredBeanDeploymentArchiveServices.add(service);
+         return this;
+      }
+      
+   }
+   
+}
\ No newline at end of file

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Lifecycle.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Lifecycle.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Lifecycle.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Lifecycle.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,50 @@
+package org.jboss.weld.bootstrap.api;
+
+import javax.enterprise.context.spi.Context;
+
+import org.jboss.weld.context.api.BeanStore;
+
+/**
+ * Note Lifecycle is not complete, and the API may change.
+ * 
+ * {@link Lifecycle} is a per-deployment service.
+ * 
+ * @author pmuir
+ *
+ */
+public interface Lifecycle
+{
+
+   public void restoreSession(String id, BeanStore sessionBeanStore);
+
+   public void endSession(String id, BeanStore sessionBeanStore);
+
+   public void beginRequest(String id, BeanStore requestBeanStore);
+
+   public void endRequest(String id, BeanStore requestBeanStore);
+
+   public boolean isRequestActive();
+   
+   public boolean isSessionActive();
+   
+   public boolean isApplicationActive();
+   
+   public boolean isConversationActive();
+
+   public void beginApplication(BeanStore applicationBeanStore);
+
+   public void endApplication();
+
+   public Context getApplicationContext();
+   
+   public Context getSingletonContext();
+
+   public Context getSessionContext();
+
+   public Context getConversationContext();
+
+   public Context getRequestContext();
+
+   public Context getDependentContext();
+
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Service.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Service.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Service.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Service.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,33 @@
+/*
+ * 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.weld.bootstrap.api;
+
+/**
+ * Marks a Service which is used by Web Beans to interact with it's environment
+ * @author Pete Muir
+ *
+ */
+public interface Service
+{
+   
+   /**
+    * Called by Web beans when it is shutting down, allowing the service to
+    * perform any cleanup needed.
+    */
+   public void cleanup();
+   
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/ServiceRegistry.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/ServiceRegistry.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/ServiceRegistry.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/ServiceRegistry.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,62 @@
+package org.jboss.weld.bootstrap.api;
+
+import java.util.Collection;
+import java.util.Set;
+import java.util.Map.Entry;
+
+/**
+ * A service registry
+ * 
+ * @author Pete Muir
+ *
+ */
+public interface ServiceRegistry extends Iterable<Service>
+{
+   
+   /**
+    * Add a service
+    * 
+    * @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(Class<S> type, S service);
+   
+   /**
+    * Add services
+    * 
+    * @param services
+    */
+   public void addAll(Collection<Entry<Class<? extends Service>, Service>> services);
+   
+   public Set<Entry<Class<? extends Service>, Service>> entrySet();
+   
+   /**
+    * 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);
+   
+   /**
+    * Clear up the services registered, by calling {@link Service#cleanup()} on
+    * each registered service
+    */
+   public void cleanup();
+   
+   
+   
+}
\ No newline at end of file

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Singleton.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ * 
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * 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.weld.bootstrap.api;
+
+/**
+ * Holds a reference to an application singleton. This singleton is used 
+ * internally by Web Beans to store various application scoped objects.
+ * 
+ * This allows Web Beans to operate as a shared library. In a shared mode, the 
+ * same instance of WebBeans implementation is used by all the applications in 
+ * a server environment. In the exclusive  mode, each application loads a 
+ * separate copy of WebBeans implementation at the application level. 
+ * 
+ * Alternative implementations of Singleton can be used as required
+ *
+ * @see SingletonProvider
+ * @author Sanjeeb.Sahoo at Sun.COM
+ * @author Pete Muir
+ */
+public interface Singleton<T>
+{
+    /**
+     * Access the singleton
+     * 
+     * @return a singleton object
+     * @throws IllegalStateException if the singleton is not set
+     */
+    public T get();
+    
+    /**
+     * Check if the singleton is set
+     * 
+     * @return true if the singleton is set
+     */
+    public boolean isSet();
+
+    /**
+     * Store a singleton
+     * 
+     * @param object the object to store
+     */
+    public void set(T object);
+    
+    /**
+     * Clear the singleton
+     */
+    public void clear();
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/SingletonProvider.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/SingletonProvider.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/SingletonProvider.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/SingletonProvider.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,123 @@
+/*
+ * 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.
+ * 
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * 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.weld.bootstrap.api;
+
+import org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider;
+import org.jboss.weld.bootstrap.api.helpers.TCCLSingletonProvider;
+
+/**
+ * A provider of {@link Singleton}s
+ * 
+ * @see IsolatedStaticSingletonProvider
+ * @see TCCLSingletonProvider
+ * 
+ * @author Sanjeeb.Sahoo at Sun.COM
+ * @author Pete Muir
+ */
+public abstract class SingletonProvider
+{
+   /*
+    * Singleton pattern. Upon first access (see instance()), it initializes
+    * itself by a default implementation. Containers are free to explicitly
+    * initialize it by calling initialize() method.
+    */
+   private static volatile SingletonProvider INSTANCE;
+
+   private static final String DEFAULT_SCOPE_FACTORY = IsolatedStaticSingletonProvider.class.getName();
+
+   public static SingletonProvider instance()
+   {
+      if (INSTANCE == null)
+      {
+         synchronized (SingletonProvider.class)
+         {
+            if (INSTANCE == null)
+            {
+               /*
+                * TODO: We should discover ScopeFactory implementation using
+                * Service Provider Mechanism. In the absence of any explicitly
+                * configured service, should we default to the default
+                * implementation.
+                */
+               initializeWithDefaultScope();
+            }
+         }
+      }
+      return INSTANCE;
+   }
+
+   protected SingletonProvider()
+   {
+   }
+
+   /**
+    * Create a new singleton
+    * 
+    * @param expectedType represents the type of Java object stored in the singleton
+    * @return a singelton
+    */
+   public abstract <T> Singleton<T> create(Class<? extends T> expectedType);
+
+   /**
+    * Initialize with the default instance
+    */
+   private static void initializeWithDefaultScope()
+   {
+      try
+      {
+         Class<?> aClass = Class.forName(DEFAULT_SCOPE_FACTORY);
+         INSTANCE = (SingletonProvider) aClass.newInstance();
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+
+   /**
+    * Initialize with an explicit instance
+    * 
+    * @param instance
+    */
+   public static void initialize(SingletonProvider instance)
+   {
+      synchronized (SingletonProvider.class)
+      {
+         if (INSTANCE == null)
+         {
+            INSTANCE = instance;
+         }
+         else
+         {
+            throw new RuntimeException("SingletonProvider is already initialized with " + INSTANCE);
+         }
+      }
+   }
+   
+   public static void reset()
+   {
+      INSTANCE = null;
+   }
+
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingBootstrap.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingBootstrap.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingBootstrap.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -14,14 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.jboss.webbeans.bootstrap.api.helpers;
+package org.jboss.weld.bootstrap.api.helpers;
 
-import org.jboss.webbeans.bootstrap.api.Bootstrap;
-import org.jboss.webbeans.bootstrap.api.Environment;
-import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
-import org.jboss.webbeans.bootstrap.spi.Deployment;
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.manager.api.WebBeansManager;
+import org.jboss.weld.bootstrap.api.Bootstrap;
+import org.jboss.weld.bootstrap.api.Environment;
+import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.weld.bootstrap.spi.Deployment;
+import org.jboss.weld.context.api.BeanStore;
+import org.jboss.weld.manager.api.WebBeansManager;
 
 /**
  * Implementation of {@link Bootstrap} which supports the decorator pattern

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingLifecycle.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingLifecycle.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingLifecycle.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -14,12 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.jboss.webbeans.bootstrap.api.helpers;
+package org.jboss.weld.bootstrap.api.helpers;
 
 import javax.enterprise.context.spi.Context;
 
-import org.jboss.webbeans.bootstrap.api.Lifecycle;
-import org.jboss.webbeans.context.api.BeanStore;
+import org.jboss.weld.bootstrap.api.Lifecycle;
+import org.jboss.weld.context.api.BeanStore;
 
 /**
  * @author pmuir

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingServiceRegistry.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingServiceRegistry.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingServiceRegistry.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,12 +1,12 @@
-package org.jboss.webbeans.bootstrap.api.helpers;
+package org.jboss.weld.bootstrap.api.helpers;
 
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.Set;
 import java.util.Map.Entry;
 
-import org.jboss.webbeans.bootstrap.api.Service;
-import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
+import org.jboss.weld.bootstrap.api.Service;
+import org.jboss.weld.bootstrap.api.ServiceRegistry;
 
 public abstract class ForwardingServiceRegistry implements ServiceRegistry
 {

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -21,10 +21,10 @@
  * limitations under the License.
  */
 
-package org.jboss.webbeans.bootstrap.api.helpers;
+package org.jboss.weld.bootstrap.api.helpers;
 
-import org.jboss.webbeans.bootstrap.api.Singleton;
-import org.jboss.webbeans.bootstrap.api.SingletonProvider;
+import org.jboss.weld.bootstrap.api.Singleton;
+import org.jboss.weld.bootstrap.api.SingletonProvider;
 
 /**
  * 

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ServiceRegistries.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ServiceRegistries.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ServiceRegistries.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,7 +1,7 @@
-package org.jboss.webbeans.bootstrap.api.helpers;
+package org.jboss.weld.bootstrap.api.helpers;
 
-import org.jboss.webbeans.bootstrap.api.Service;
-import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
+import org.jboss.weld.bootstrap.api.Service;
+import org.jboss.weld.bootstrap.api.ServiceRegistry;
 
 public class ServiceRegistries
 {

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/SimpleServiceRegistry.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/SimpleServiceRegistry.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/SimpleServiceRegistry.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.jboss.webbeans.bootstrap.api.helpers;
+package org.jboss.weld.bootstrap.api.helpers;
 
 import java.util.Collection;
 import java.util.HashMap;
@@ -23,8 +23,8 @@
 import java.util.Set;
 import java.util.Map.Entry;
 
-import org.jboss.webbeans.bootstrap.api.Service;
-import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
+import org.jboss.weld.bootstrap.api.Service;
+import org.jboss.weld.bootstrap.api.ServiceRegistry;
 
 /**
  * A registry for services

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/TCCLSingletonProvider.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/TCCLSingletonProvider.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/TCCLSingletonProvider.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -21,15 +21,15 @@
  * limitations under the License.
  */
 
-package org.jboss.webbeans.bootstrap.api.helpers;
+package org.jboss.weld.bootstrap.api.helpers;
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Hashtable;
 import java.util.Map;
 
-import org.jboss.webbeans.bootstrap.api.Singleton;
-import org.jboss.webbeans.bootstrap.api.SingletonProvider;
+import org.jboss.weld.bootstrap.api.Singleton;
+import org.jboss.weld.bootstrap.api.SingletonProvider;
 
 /**
  * Singleton provider that uses the Thread Context ClassLoader to differentiate

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BeanDeploymentArchive.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,108 @@
+/*
+ * 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.weld.bootstrap.spi;
+
+import java.net.URL;
+import java.util.Collection;
+
+import org.jboss.weld.bootstrap.api.ServiceRegistry;
+import org.jboss.weld.ejb.spi.EjbDescriptor;
+
+/**
+ * Represents a CDI bean deployment archive.
+ * 
+ * A deployment archive is any library jar, library directory, EJB jar, rar
+ * archive or any war WEB-INF/classes directory contained in the Java EE
+ * deployment (as defined in the Java Platform, Enterprise Edition (Java EE)
+ * Specification, v6, Section 8.1.2).
+ * 
+ * TODO Java SE definition of a deployment archive
+ * 
+ * A bean deployment archive is any deployment archive with a META-INF/beans.xml
+ * file, or for a war, with a WEB-INF/beans.xml.
+ * 
+ * The container is allowed to specify a deployment archive as
+ * {@link BeanDeploymentArchive} even if no beans.xml is present (for example, a
+ * container could define a deployment archive with container specific metadata
+ * to be a bean deployment archive).
+ * 
+ * @see Deployment
+ * 
+ * @author Pete Muir
+ * 
+ */
+public interface BeanDeploymentArchive
+{
+
+   /**
+    * Get the bean deployment archives which are accessible to this bean
+    * deployment archive and adjacent to it in the deployment archive graph.
+    * 
+    * Cycles in the accessible BeanDeploymentArchive graph are allowed. If a 
+    * cycle is detected by Web Beans, it will be automatically removed by Web
+    * Beans. This means any implementor of this interface don't need to worry
+    * about circularities.
+    * 
+    * @return the accessible bean deployment archives
+    */
+   public Collection<BeanDeploymentArchive> getBeanDeploymentArchives();
+
+   /**
+    * Gets all classes in the bean deployment archive
+    * 
+    * @return the classes, empty if no classes are present
+    */
+   public Collection<Class<?>> getBeanClasses();
+
+   /**
+    * Get any deployment descriptors in the bean deployment archive.
+    * 
+    * The container will normally return a single deployment descriptor per bean
+    * deployment archive (the physical META-INF/beans.xml or WEB-INF/beans.xml),
+    * however it is permitted to return other deployment descriptors defined
+    * using other methods.
+    * 
+    * @return the URLs pointing to the deployment descriptor,
+    *         or an empty set if none are present
+    */
+   public Collection<URL> getBeansXml();
+
+   /**
+    * Get all the EJBs in the deployment archive
+    * 
+    * @return the EJBs, or empty if no EJBs are present or if
+    *         this is not an EJB archive
+    */
+   public Collection<EjbDescriptor<?>> getEjbs();
+   
+   /**
+    * Get the Bean Deployment Archive scoped services
+    * 
+    * @return
+    */
+   public ServiceRegistry getServices();
+   
+   /**
+    * Get a string which uniquely identifies the {@link BeanDeploymentArchive} within
+    * the {@link Deployment}. The identifier must be consistent between multiple
+    * occurrences of this deployment.
+    * 
+    * @return
+    */
+   public String getId();
+
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/Deployment.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,154 @@
+/*
+ * 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.weld.bootstrap.spi;
+
+import java.util.Collection;
+
+import org.jboss.weld.bootstrap.api.ServiceRegistry;
+
+/**
+ * Represents a deployment of a CDI application.
+ * 
+ * <h3>Background</h3>
+ * 
+ * <p>
+ * Java EE defines a series of accessibility rules for classloading, which CDI
+ * extends to cover bean resolution. For example a bean in the war can inject a
+ * bean in an ejb-jar, but not vice-versa.
+ * </p>
+ * 
+ * <p>
+ * These rules are defined via the MANIFEST.MF <a
+ * href="http://java.sun.com/javase/6/docs/technotes/guides/extensions/"
+ * >Extension Mechanism Architecture</a> and <a
+ * href="http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html">JAR
+ * File Specification</a>.
+ * </p>
+ * 
+ * <h3>Deployment structure representation</h3>
+ * 
+ * <p>
+ * Web Beans will request the bean archive deployment structure during the bean
+ * discovery initialization step. After this step, CDI allows users to define
+ * bean's programmatically, possibly with bean classes from a deployment archive
+ * which is currently not a bean deployment archive. Web Beans will request the
+ * {@link BeanDeploymentArchive} for each programmatically using
+ * {@link #loadBeanDeploymentArchive(Class)}. If any unknown
+ * {@link BeanDeploymentArchive}s are loaded, before Web Beans proceeds to
+ * validating the deployment, the bean archive deployment structure will
+ * re-requested.
+ * </p>
+ * 
+ * <p>
+ * The BeanDeploymentArchive tree represents the "logical structure" of the
+ * deployment; Given two archives A and B, which have a transitive closure of
+ * accessible archives A' and B', it allowable for the the archives A & B to be
+ * represented as a single BeanDeploymentArchive, assuming that A' and B' are
+ * bi-directionally accessible.
+ * </p>
+ * 
+ * <p>
+ * For an application deployed as an ear to a Java EE container, all library
+ * jars, EJB jars, rars and war WEB-INF/classes directories should be searched,
+ * and the bean deployment archive structure built.
+ * </p>
+ * 
+ * <p>
+ * For an application deployed as a war to a Java EE or Servlet container, all
+ * library jars and the WEB-INF/classes directory should be searched, and the
+ * bean deployment archive structure built.
+ * </p>
+ * 
+ * <p>
+ * For an application deployed in the SE environment, all library jars and
+ * classpath directories should be searched, and the bean deployment archive
+ * structure built. A single, logical deployment archive will be built for all
+ * beans and beans.xml files found on the classpath.
+ * </p>
+ * 
+ * <h3>A Java EE example</h3>
+ * 
+ * <p>
+ * Given an ejb-module A (not as part of an ear), an ear B (containing an
+ * ejb-jar C which uses the standard mechanism to reference module A, libraries
+ * F bundled in /lib, and a war D which references module C), and a war E (which
+ * references module A and bundles libraries G in /WEB-INF/lib) all deployed.
+ * </p>
+ * 
+ * <p>
+ * War E would have be able to resolve beans from ejb module A, libraries G, as
+ * well as other app server libraries. Furthermore, any libraries in G will be
+ * able to resolve beans in other libraries G as well as in ejb module A and war
+ * E. Ejb module A will not be able to resolve beans in war E or libraries G. It
+ * would be legal to represent any libraries G as a single logical
+ * BeanDeploymentArchive, also incorportating classes in war E.
+ * </p>
+ * 
+ * <p>
+ * War D would be able to resolve beans from from ejb module C, module A
+ * (transitively via C), libraries F, as well as other app server libraries. Ejb
+ * module C can resolve beans in libraries F as well as module A, but not beans
+ * in War D. Ejb module A cannot resolve beans in libraries F, module A or war
+ * D. It would be legal to represent libraries F as a single logical
+ * BeanDeploymentArchive.
+ * </p>
+ * 
+ * @see BeanDeploymentArchive
+ * 
+ * @author Pete Muir
+ * 
+ */
+public interface Deployment
+{
+
+   /**
+    * Get the bean deployment archives which are part of this deployment
+    * and adjacent to it in the deployment archive graph. This should include
+    * all Java EE modules such as WARs, EJB jars and RARs.
+    * 
+    * Cycles in the accessible BeanDeploymentArchive graph are allowed. If a 
+    * cycle is detected by Web Beans, it will be automatically removed by Web
+    * Beans. This means any implementor of this interface don't need to worry
+    * about circularities.
+    * 
+    * @return the accessible bean deployment archives
+    * 
+    */
+   public Collection<BeanDeploymentArchive> getBeanDeploymentArchives();
+
+   /**
+    * Load the {@link BeanDeploymentArchive} containing the given class.
+    * 
+    * If the deployment archive containing the given class is not currently a
+    * bean deployment archive, it should be added to the bean deployment archive
+    * graph and returned. If the deployment archive is currently a bean
+    * deployment archive it should be returned.
+    * 
+    * @param beanClass the bean class to load
+    * @return the {@link BeanDeploymentArchive} containing the bean class
+    */
+   public BeanDeploymentArchive loadBeanDeploymentArchive(Class<?> beanClass);
+  
+
+   /**
+    * Get the services available to this deployment
+    * 
+    * @return the services available
+    */
+   public ServiceRegistry getServices();
+
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/helpers (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/helpers)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/helpers/ForwardingBeanDeploymentArchive.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/helpers/ForwardingBeanDeploymentArchive.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/helpers/ForwardingBeanDeploymentArchive.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -14,13 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.jboss.webbeans.bootstrap.spi.helpers;
+package org.jboss.weld.bootstrap.spi.helpers;
 
 import java.net.URL;
 import java.util.Collection;
 
-import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
-import org.jboss.webbeans.ejb.spi.EjbDescriptor;
+import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.weld.ejb.spi.EjbDescriptor;
 
 /**
  * @author pmuir

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/context/api/BeanStore.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/BeanStore.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/context/api/BeanStore.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/context/api/BeanStore.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,58 @@
+/*
+ * 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.weld.context.api;
+
+import java.util.Collection;
+
+
+/**
+ * Interface for different implementations of Contextual instance storage.
+ * 
+ * @author Nicklas Karlsson
+ * 
+ */
+public interface BeanStore
+{
+   /**
+    * Gets an instance of a contextual from the store
+    * 
+    * @param contextual The id of the contextual to return
+    * @return The instance. Null if not found
+    */
+   public abstract <T> ContextualInstance<T> get(String id);
+
+   /**
+    * Clears the store of contextual instances
+    */
+   public abstract void clear();
+
+   /**
+    * Returns the current contextual instances in the store
+    * 
+    * @return the instances
+    */
+   public abstract Collection<String> getContextualIds();
+
+   /**
+    * Adds a bean instance to the storage
+    * 
+    * @param contextualInstance the contextual instance
+    * @return the id for the instance
+    */
+   public abstract <T> void put(String id, ContextualInstance<T> contextualInstance);
+}
\ No newline at end of file

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/context/api/ContextualInstance.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/ContextualInstance.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/context/api/ContextualInstance.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/context/api/ContextualInstance.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,14 @@
+package org.jboss.weld.context.api;
+
+import javax.enterprise.context.spi.Contextual;
+import javax.enterprise.context.spi.CreationalContext;
+
+public interface ContextualInstance<T>
+{
+   
+   public T getInstance();
+   
+   public CreationalContext<T> getCreationalContext();
+   
+   public Contextual<T> getContextual();
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/context/api/helpers (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/context/api/helpers/AbstractMapBackedBeanStore.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/AbstractMapBackedBeanStore.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/context/api/helpers/AbstractMapBackedBeanStore.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,12 +1,12 @@
-package org.jboss.webbeans.context.api.helpers;
+package org.jboss.weld.context.api.helpers;
 
 import java.util.Map;
 import java.util.Set;
 
 import javax.enterprise.context.spi.Contextual;
 
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.context.api.ContextualInstance;
+import org.jboss.weld.context.api.BeanStore;
+import org.jboss.weld.context.api.ContextualInstance;
 
 public abstract class AbstractMapBackedBeanStore implements BeanStore
 {
@@ -24,7 +24,7 @@
     * @param The bean to look for
     * @return An instance, if found
     * 
-    * @see org.jboss.webbeans.context.api.BeanStore#get(BaseBean)
+    * @see org.jboss.weld.context.api.BeanStore#get(BaseBean)
     */
    public <T extends Object> ContextualInstance<T> get(String id)
    {
@@ -36,7 +36,7 @@
    /**
     * Clears the store
     * 
-    * @see org.jboss.webbeans.context.api.BeanStore#clear()
+    * @see org.jboss.weld.context.api.BeanStore#clear()
     */
    public void clear()
    {
@@ -48,7 +48,7 @@
     * 
     * @return The beans present
     * 
-    * @see org.jboss.webbeans.context.api.BeanStore#getContextuals()
+    * @see org.jboss.weld.context.api.BeanStore#getContextuals()
     */
    public Set<String> getContextualIds()
    {
@@ -61,7 +61,7 @@
     * @param bean The bean
     * @param instance the instance
     * 
-    * @see org.jboss.webbeans.context.api.BeanStore#put(Contextual, Object)
+    * @see org.jboss.weld.context.api.BeanStore#put(Contextual, Object)
     */
    public <T> void put(String id, ContextualInstance<T> beanInstance)
    {

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/context/api/helpers/ConcurrentHashMapBeanStore.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ConcurrentHashMapBeanStore.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/context/api/helpers/ConcurrentHashMapBeanStore.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.jboss.webbeans.context.api.helpers;
+package org.jboss.weld.context.api.helpers;
 
 import java.io.Serializable;
 import java.util.Map;
@@ -23,7 +23,7 @@
 
 import javax.enterprise.context.spi.Contextual;
 
-import org.jboss.webbeans.context.api.ContextualInstance;
+import org.jboss.weld.context.api.ContextualInstance;
 
 /**
  * A BeanStore that uses a HashMap as backing storage

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/context/api/helpers/ForwardingBeanStore.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/context/api/helpers/ForwardingBeanStore.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/context/api/helpers/ForwardingBeanStore.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,9 +1,9 @@
-package org.jboss.webbeans.context.api.helpers;
+package org.jboss.weld.context.api.helpers;
 
 import java.util.Collection;
 
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.context.api.ContextualInstance;
+import org.jboss.weld.context.api.BeanStore;
+import org.jboss.weld.context.api.ContextualInstance;
 
 public abstract class ForwardingBeanStore implements BeanStore
 {

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/ejb/api (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/api)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/ejb/api/SessionObjectReference.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/api/SessionObjectReference.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/ejb/api/SessionObjectReference.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.jboss.webbeans.ejb.api;
+package org.jboss.weld.ejb.api;
 
 import java.io.Serializable;
 

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/BusinessInterfaceDescriptor.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/BusinessInterfaceDescriptor.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/BusinessInterfaceDescriptor.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/BusinessInterfaceDescriptor.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.weld.ejb.spi;
+
+/**
+ * Represents the business interface of an EJB
+ * 
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public interface BusinessInterfaceDescriptor<T>
+{
+
+   /**
+    * Gets the business interface class
+    */
+   public Class<T> getInterface();
+   
+}
\ No newline at end of file

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbDescriptor.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbDescriptor.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbDescriptor.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbDescriptor.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,90 @@
+/*
+ * 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.weld.ejb.spi;
+
+import java.lang.reflect.Method;
+import java.util.Collection;
+
+
+/**
+ * EJB metadata from the EJB descriptor
+ * 
+ * @author Pete Muir
+ *
+ * @param <T> the bean type
+ */
+public interface EjbDescriptor<T>
+{
+   
+   /**
+    * Gets the EJB type
+    * 
+    * @return The EJB Bean class
+    */
+   public Class<T> getBeanClass();
+
+   /**
+    * Gets the local business interfaces of the EJB
+    * 
+    * @return An iterator over the local business interfaces
+    */
+   public Collection<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces();
+   
+   /**
+    * Get the EJB name
+    * 
+    * @return
+    */
+   public String getEjbName();
+   
+   /**
+    * Get the remove methods of the EJB
+    * 
+    * @return An iterator over the remove methods
+    */
+   public Collection<Method> getRemoveMethods();
+
+   /**
+    * Indicates if the bean is a stateless session bean 
+    * 
+    * @return True if stateless, false otherwise
+    */
+   public boolean isStateless();
+
+   /**
+    * Indicates if the bean is a EJB 3.1 Singleton session bean
+    * 
+    * @return True if the bean is a singleton, false otherwise
+    */
+   public boolean isSingleton();
+
+   /**
+    * Indicates if the EJB is a stateful session bean
+    * 
+    * @return True if the bean is stateful, false otherwise
+    */
+   public boolean isStateful();
+
+   /**
+    * Indicates if the EJB is an MDB
+    * 
+    * @return True if the bean is an MDB, false otherwise
+    */
+   public boolean isMessageDriven();
+   
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbServices.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbServices.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbServices.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,55 @@
+/*
+ * 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.weld.ejb.spi;
+
+import org.jboss.weld.bootstrap.api.Service;
+import org.jboss.weld.ejb.api.SessionObjectReference;
+
+/**
+ * A container should implement this interface to allow Web Beans to
+ * resolve EJB and discover EJBs
+ *
+ * {@link EjbServices} is a per-deployment service.
+ *
+ * @author Pete Muir
+ * @author Marius Bogoevici
+ *
+ */
+public interface EjbServices extends Service
+{
+
+   /**
+    * Request a reference to an EJB session object from the container. If the
+    * EJB being resolved is a stateful session bean, the container should ensure
+    * the session bean is created before this method returns.
+    *
+    * @param ejbDescriptor the ejb to resolve
+    * @return a reference to the session object
+    */
+   public SessionObjectReference resolveEjb(EjbDescriptor<?> ejbDescriptor);
+
+   /**
+    * Provides interceptor binding metadata to the container. This method should be
+    * called before any EJB object is created.
+    *
+    * @param ejbDescriptor the ejb to bound interceptors to
+    * @param interceptorBindings the interceptor bindings descriptor
+    */
+   public void registerInterceptors(EjbDescriptor<?> ejbDescriptor, InterceptorBindings interceptorBindings);
+
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/InterceptorBindings.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/InterceptorBindings.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/InterceptorBindings.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/InterceptorBindings.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.ejb.spi;
+
+import java.util.List;
+import java.util.Collection;
+import java.lang.reflect.Method;
+
+import javax.enterprise.inject.spi.Interceptor;
+import javax.enterprise.inject.spi.InterceptionType;
+import javax.interceptor.InterceptorBinding;
+
+/**
+ * @author Marius Bogoevici
+ */
+public interface InterceptorBindings
+{
+   /**
+    * Returns all interceptors that are bound to an EJB object through
+    * the {@link InterceptorBinding} mechanism and are
+    * enabled through the beans.xml file.
+    *
+    * This includes class and method-bound interceptors.The purpose of this
+    * method is to indicate what interceptors does the container need to
+    * interact with, for a given EJB.
+    *
+    * Note: in the case of an EJB, the expectation is that the interpretation
+    * of {link @javax.interceptor.Interceptors} is left to the container, and
+    * the interceptors provided by the binding are complementary
+    */
+   Collection<Interceptor<?>> getAllInterceptors();
+
+
+   /**
+    * Returns the interceptors that are applicable to a given {@link InterceptionType}
+    * and method (bound by {@link InterceptorBinding}).
+    * This includes class and method-bound interceptors, but no interceptors
+    * bound by EJB-specific mechanisms.
+    *
+    * @param interceptionType - the interception type (non-lifecycle)
+    * @param method - the method that is to be intercepted
+    * @return - an immutable list of interceptors applicable to the method (empty if no such
+    *          interceptors exist)
+    * @throw IllegalArgumentException if interceptionType is not {@link InterceptionType.AROUND_INVOKE}
+    *        or {@link InterceptionType.AROUND_TIMEOUT}
+    */
+   List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method);
+
+
+    /**
+    * Returns the lifecycle interceptors that are applicable to a given {@link InterceptionType}
+    * (bound by {@link InterceptorBinding}).
+    *
+    * This includes class and method-bound interceptors, but no interceptors
+    * bound by EJB-specific mechanisms.
+    *
+    * @param interceptionType - the interception type (lifecycle)
+    * @param method - the method that is to be intercepted
+    * @return - an immutable list of interceptors applicable to the method (empty if no such
+    *          interceptors exist)
+    * @throw IllegalArgumentException if interceptionType not {@link InterceptionType.AROUND_INVOKE}
+    *        or {@link InterceptionType.AROUND_TIMEOUT}
+    */
+   List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType);
+
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/helpers (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/helpers/ForwadingBusinessInterfaceDescriptor.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwadingBusinessInterfaceDescriptor.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/helpers/ForwadingBusinessInterfaceDescriptor.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,6 +1,6 @@
-package org.jboss.webbeans.ejb.spi.helpers;
+package org.jboss.weld.ejb.spi.helpers;
 
-import org.jboss.webbeans.ejb.spi.BusinessInterfaceDescriptor;
+import org.jboss.weld.ejb.spi.BusinessInterfaceDescriptor;
 
 
 /**

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/helpers/ForwardingEjbDescriptor.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwardingEjbDescriptor.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/helpers/ForwardingEjbDescriptor.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,10 +1,10 @@
-package org.jboss.webbeans.ejb.spi.helpers;
+package org.jboss.weld.ejb.spi.helpers;
 
 import java.lang.reflect.Method;
 import java.util.Collection;
 
-import org.jboss.webbeans.ejb.spi.BusinessInterfaceDescriptor;
-import org.jboss.webbeans.ejb.spi.EjbDescriptor;
+import org.jboss.weld.ejb.spi.BusinessInterfaceDescriptor;
+import org.jboss.weld.ejb.spi.EjbDescriptor;
 
 
 /**

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/helpers/ForwardingEjbServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/ejb/spi/helpers/ForwardingEjbServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/helpers/ForwardingEjbServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -14,12 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.jboss.webbeans.ejb.spi.helpers;
+package org.jboss.weld.ejb.spi.helpers;
 
-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.ejb.spi.InterceptorBindings;
+import org.jboss.weld.ejb.api.SessionObjectReference;
+import org.jboss.weld.ejb.spi.EjbDescriptor;
+import org.jboss.weld.ejb.spi.EjbServices;
+import org.jboss.weld.ejb.spi.InterceptorBindings;
 
 /**
  * An implementation of {@link EjbServices} which forwards all its method calls

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/EjbInjectionServices.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/EjbInjectionServices.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/EjbInjectionServices.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/EjbInjectionServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,50 @@
+/*
+ * 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.weld.injection.spi;
+
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.jboss.weld.bootstrap.api.Service;
+
+/**
+ * A container should implement this interface to allow Web Beans to
+ * resolve EJB.
+ * 
+ * {@link EjbInjectionServices} is a per-module service.
+ * 
+ * @author Pete Muir
+ * 
+ */
+public interface EjbInjectionServices extends Service
+{
+   
+   /**
+    * Resolve the value for the given @EJB injection point
+    * 
+    * @param injectionPoint
+    *           the injection point metadata
+    * @return an instance of the EJB
+    * @throws IllegalArgumentException
+    *            if the injection point is not annotated with @EJB, or, if the
+    *            injection point is a method that doesn't follow JavaBean
+    *            conventions
+   
+    */
+   public Object resolveEjb(InjectionPoint injectionPoint);
+   
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionContext.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionContext.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionContext.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionContext.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,34 @@
+/*
+ * 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.weld.injection.spi;
+
+import javax.enterprise.inject.spi.InjectionTarget;
+
+/**
+ * @author pmuir
+ *
+ */
+public interface InjectionContext<T>
+{
+   
+   public void proceed();
+   
+   public T getTarget();
+   
+   public InjectionTarget<T> getInjectionTarget();
+
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/InjectionServices.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,45 @@
+/*
+ * 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.weld.injection.spi;
+
+import org.jboss.weld.bootstrap.api.Service;
+
+/**
+ * Provides callbacks to the container when Web Beans performs injection on an
+ * InjectionTarget, managed bean or session bean
+ * 
+ * This service may be used to provide EE-style injection.
+ * 
+ * {@link InjectionServices} is a per-BeanDeploymentArchive service.
+ * 
+ * @author pmuir
+ *
+ */
+public interface InjectionServices extends Service
+{
+   
+   /**
+    * Callback for injection.
+    * 
+    * Call {@link InjectionContext#proceed()} to cause CDI-style injection to
+    * occur.
+    * 
+    * @param injectionContext
+    */
+   public <T> void aroundInject(InjectionContext<T> injectionContext);
+
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/JpaInjectionServices.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,67 @@
+/*
+ * 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.weld.injection.spi;
+
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+
+import org.jboss.weld.bootstrap.api.Service;
+
+/**
+ * A container should implement this interface to allow the Web Beans RI to
+ * resolve JPA persistence units and discover entities
+ * 
+ * {@link JpaInjectionServices} is a per-module service.
+ * 
+ * @author Pete Muir
+ * 
+ */
+public interface JpaInjectionServices extends Service
+{
+	
+   /**
+    * Resolve the value for the given @PersistenceContext injection point
+    * 
+    * @param injectionPoint
+    *           the injection point metadata
+    * @return an instance of the entity manager
+    * @throws IllegalArgumentException
+    *            if the injection point is not annotated with 
+    *            @PersistenceContext, or, if the injection point is a method 
+    *            that doesn't follow JavaBean conventions
+    * @throws IllegalStateException
+    *            if no suitable persistence units can be resolved for injection
+    */
+   public EntityManager resolvePersistenceContext(InjectionPoint injectionPoint);
+   
+   /**
+    * Resolve the value for the given @PersistenceUnit injection point
+    * 
+    * @param injectionPoint
+    *           the injection point metadata
+    * @return an instance of the entity manager
+    * @throws IllegalArgumentException
+    *            if the injection point is not annotated with 
+    *            @PersistenceUnit, or, if the injection point is a method 
+    *            that doesn't follow JavaBean conventions
+    * @throws IllegalStateException
+    *            if no suitable persistence units can be resolved for injection
+    */
+   public EntityManagerFactory resolvePersistenceUnit(InjectionPoint injectionPoint);
+   
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/ResourceInjectionServices.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/ResourceInjectionServices.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/ResourceInjectionServices.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/ResourceInjectionServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,63 @@
+/*
+ * 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.weld.injection.spi;
+
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.jboss.weld.bootstrap.api.Service;
+
+/**
+ * A container should implement this interface to allow the Web Beans RI to
+ * resolve Resources
+ * 
+ * {@link ResourceInjectionServices} is per-module service.
+ * 
+ * @author Pete Muir
+ * 
+ */
+public interface ResourceInjectionServices extends Service
+{
+   
+   /**
+    * Resolve the value for the given @Resource injection point
+    * 
+    * @param injectionPoint
+    *           the injection point metadata
+    * @return an instance of the resource
+    * @throws IllegalArgumentException
+    *            if the injection point is not annotated with @Resource, or, if
+    *            the injection point is a method that doesn't follow JavaBean
+    *            conventions
+    * @throws IllegalStateException
+    *            if no resource can be resolved for injection
+    */
+   public Object resolveResource(InjectionPoint injectionPoint);
+   
+   /**
+    * Resolve the value for the given JNDI name and mapped name
+    * 
+    * @param injectionPoint
+    *           the injection point metadata
+    * @return an instance of the resource
+    * @throws IllegalStateException
+    *            if no resource can be resolved for injection
+    * @throws IllegalArgumentException
+    *            if both jndiName and mappedName are null
+    */
+   public Object resolveResource(String jndiName, String mappedName);
+   
+}
\ No newline at end of file

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/helpers)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/AbstractResourceServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/helpers/AbstractResourceServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/AbstractResourceServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.injection.spi.helpers;
+package org.jboss.weld.injection.spi.helpers;
 
 import java.beans.Introspector;
 import java.lang.reflect.Field;
@@ -9,7 +9,7 @@
 import javax.naming.Context;
 import javax.naming.NamingException;
 
-import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.weld.bootstrap.api.Service;
 
 public abstract class AbstractResourceServices implements Service
 {

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/ForwardingJpaInjectionServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/helpers/ForwardingJpaInjectionServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/ForwardingJpaInjectionServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -14,13 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.jboss.webbeans.injection.spi.helpers;
+package org.jboss.weld.injection.spi.helpers;
 
 import javax.enterprise.inject.spi.InjectionPoint;
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
 
-import org.jboss.webbeans.injection.spi.JpaInjectionServices;
+import org.jboss.weld.injection.spi.JpaInjectionServices;
 
 /**
  * An implementation of {@link JpaInjectionServices} which forwards all its method calls

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/ForwardingResourceInjectionServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/injection/spi/helpers/ForwardingResourceInjectionServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/ForwardingResourceInjectionServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,8 +1,8 @@
-package org.jboss.webbeans.injection.spi.helpers;
+package org.jboss.weld.injection.spi.helpers;
 
 import javax.enterprise.inject.spi.InjectionPoint;
 
-import org.jboss.webbeans.injection.spi.ResourceInjectionServices;
+import org.jboss.weld.injection.spi.ResourceInjectionServices;
 
 public abstract class ForwardingResourceInjectionServices implements ResourceInjectionServices
 {

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/manager/api (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/ExecutorServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/ExecutorServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/ExecutorServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -14,12 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.jboss.webbeans.manager.api;
+package org.jboss.weld.manager.api;
 
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
-import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.weld.bootstrap.api.Service;
 
 /**
  * Allows a custom TaskExecutor to be provided by the container. By default,

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WebBeansManager.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WebBeansManager.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.jboss.webbeans.manager.api;
+package org.jboss.weld.manager.api;
 
 import java.io.Serializable;
 import java.lang.annotation.Annotation;
@@ -25,7 +25,7 @@
 import javax.enterprise.inject.spi.BeanManager;
 import javax.enterprise.inject.spi.InjectionTarget;
 
-import org.jboss.webbeans.ejb.spi.EjbDescriptor;
+import org.jboss.weld.ejb.spi.EjbDescriptor;
 
 /**
  * Functionality provided by the Web Beans Manager over and above the JSR-299

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/messaging (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/messaging)

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/persistence/spi (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/persistence/spi)

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoader.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoader.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoader.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,64 @@
+/*
+ * 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.weld.resources.spi;
+
+import java.net.URL;
+import java.util.Collection;
+
+import org.jboss.weld.bootstrap.api.Service;
+
+/**
+ * Resource loading/class creation services for Web Beans. By default an
+ * implementation which uses the Thread Context ClassLoader if available, 
+ * otherwise the classloading of the implementation is used.
+ * 
+ * The {@link ResourceLoader} is a per-deployment service.
+ * 
+ * @author Pete Muir
+ *
+ */
+public interface ResourceLoader extends Service
+{
+   // Name of the resource loader
+   public static final String PROPERTY_NAME = ResourceLoader.class.getName();
+   
+   /**
+    * Creates a class from a given FQCN
+    * 
+    * @param name The name of the clsas
+    * @return The class
+    */
+   public Class<?> classForName(String name);
+   
+   /**
+    * Gets a resource as a URL by name
+    * 
+    * @param name The name of the resource
+    * @return An URL to the resource
+    */
+   public URL getResource(String name);
+   
+   /**
+    * Gets resources as URLs by name
+    * 
+    * @param name The name of the resource
+    * @return references to the URLS
+    */
+   public Collection<URL> getResources(String name);
+   
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoadingException.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoadingException.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoadingException.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,57 @@
+/**
+ * 
+ */
+package org.jboss.weld.resources.spi;
+
+
+
+/**
+ * Exception thrown when errors occur while loading resource
+ * 
+ * @author Pete Muir
+ *
+ */
+public class ResourceLoadingException extends RuntimeException
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * Constructor
+    */
+   public ResourceLoadingException()
+   {
+      super();
+   }
+
+   /**
+    * Constructor
+    * 
+    * @param message The message
+    * @param throwable The exception
+    */
+   public ResourceLoadingException(String message, Throwable throwable)
+   {
+      super(message, throwable);
+   }
+
+   /**
+    * Constructor
+    * 
+    * @param message The message
+    */
+   public ResourceLoadingException(String message)
+   {
+      super(message);
+   }
+
+   /**
+    * Constructor
+    * 
+    * @param throwable The exception
+    */
+   public ResourceLoadingException(Throwable throwable)
+   {
+      super(throwable);
+   }
+   
+}
\ No newline at end of file

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/helpers (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/helpers)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/helpers/ForwardingResourceLoader.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/resources/spi/helpers/ForwardingResourceLoader.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/helpers/ForwardingResourceLoader.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,9 +1,9 @@
-package org.jboss.webbeans.resources.spi.helpers;
+package org.jboss.weld.resources.spi.helpers;
 
 import java.net.URL;
 import java.util.Collection;
 
-import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.weld.resources.spi.ResourceLoader;
 
 /**
  * An implementation of {@link ResourceLoader} which forwards all its method calls

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/security/spi (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/security/spi)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/security/spi/SecurityServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/security/spi/SecurityServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/security/spi/SecurityServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -14,11 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.jboss.webbeans.security.spi;
+package org.jboss.weld.security.spi;
 
 import java.security.Principal;
 
-import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.weld.bootstrap.api.Service;
 
 /**
  * Responsible for accessing security related functionality the environment can 

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletListener.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletListener.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletListener.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletListener.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,12 @@
+package org.jboss.weld.servlet.api;
+
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletRequestListener;
+import javax.servlet.http.HttpSessionListener;
+
+public interface ServletListener extends ServletContextListener, ServletRequestListener, HttpSessionListener
+{
+   
+   
+   
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletServices.java (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/ServletServices.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletServices.java	                        (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -0,0 +1,46 @@
+/*
+ * 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.weld.servlet.api;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.weld.bootstrap.api.Service;
+import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
+
+/**
+ * Allows the container to identify BDA in use for a request. This method will
+ * be called, in the same thread as the request, every time Web Beans needs to
+ * identify a request.
+ * 
+ * {@link ServletServices} is a per-deployment service.
+ * 
+ * @author pmuir
+ *
+ */
+public interface ServletServices extends Service
+{
+   
+   /**
+    * Get the BDA for the current request. The ServletContext is provided for
+    * context.
+    * 
+    * @param ctx
+    * @return
+    */
+   public BeanDeploymentArchive getBeanDeploymentArchive(ServletContext ctx);
+
+}

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/helpers (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/helpers/AbstractServletListener.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/AbstractServletListener.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/helpers/AbstractServletListener.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,10 +1,10 @@
-package org.jboss.webbeans.servlet.api.helpers;
+package org.jboss.weld.servlet.api.helpers;
 
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletRequestEvent;
 import javax.servlet.http.HttpSessionEvent;
 
-import org.jboss.webbeans.servlet.api.ServletListener;
+import org.jboss.weld.servlet.api.ServletListener;
 
 /**
  * No-op implementation of ServletListener

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/helpers/ForwardingServletListener.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/servlet/api/helpers/ForwardingServletListener.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/helpers/ForwardingServletListener.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,10 +1,10 @@
-package org.jboss.webbeans.servlet.api.helpers;
+package org.jboss.weld.servlet.api.helpers;
 
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletRequestEvent;
 import javax.servlet.http.HttpSessionEvent;
 
-import org.jboss.webbeans.servlet.api.ServletListener;
+import org.jboss.weld.servlet.api.ServletListener;
 
 public abstract class ForwardingServletListener implements ServletListener
 {

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/transaction/spi (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/transaction/spi)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/transaction/spi/TransactionServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/transaction/spi/TransactionServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/transaction/spi/TransactionServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -1,9 +1,9 @@
-package org.jboss.webbeans.transaction.spi;
+package org.jboss.weld.transaction.spi;
 
 import javax.transaction.Synchronization;
 import javax.transaction.UserTransaction;
 
-import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.weld.bootstrap.api.Service;
 
 /**
  * <p>

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/validation/spi (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/validation/spi)

Modified: ri/trunk/spi/src/main/java/org/jboss/weld/validation/spi/ValidationServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/validation/spi/ValidationServices.java	2009-10-08 02:48:09 UTC (rev 3874)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/validation/spi/ValidationServices.java	2009-10-08 03:07:40 UTC (rev 3875)
@@ -14,11 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.jboss.webbeans.validation.spi;
+package org.jboss.weld.validation.spi;
 
 import javax.validation.ValidatorFactory;
 
-import org.jboss.webbeans.bootstrap.api.Service;
+import org.jboss.weld.bootstrap.api.Service;
 
 /**
  * <p>

Copied: ri/trunk/spi/src/main/java/org/jboss/weld/ws (from rev 3874, ri/trunk/spi/src/main/java/org/jboss/webbeans/ws)



More information about the weld-commits mailing list