tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1130358 - in /openejb/trunk/openejb3: container/openejb-core/src/main/java/org/apache/openejb/ container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ container/openejb-core/src/main/java/org/apache/openejb/cdi/ containe...
Date Wed, 01 Jun 2011 23:56:34 GMT
Author: dblevins
Date: Wed Jun  1 23:56:32 2011
New Revision: 1130358

URL: http://svn.apache.org/viewvc?rev=1130358&view=rev
Log:
Big jump forward in EJB/CDI integration OPENEJB-1197 OPENEJB-1337

Added:
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/cdi/InjectionTest.java
    openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/Archive.java   (contents, props changed)
      - copied, changed from r1124537, geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/archive/Archives.java
    openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/ContainersImpl.java
    openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/Report.java
Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/AppContext.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/OpenEJB.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/OpenEjbContainer.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiBuilder.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/OWBContextThreadListener.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ReadDescriptors.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/spi/ContainerSystem.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulTest.java
    openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/BeansImpl.java
    openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/StandaloneContainersImpl.java
    openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/META-INF/jboss-test-harness.properties
    openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/failing.xml
    openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/passing.xml

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/AppContext.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/AppContext.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/AppContext.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/AppContext.java Wed Jun  1 23:56:32 2011
@@ -35,6 +35,7 @@ import java.util.concurrent.TimeUnit;
  * @version $Rev$ $Date$
 */
 public class AppContext extends DeploymentContext {
+
     private final SystemInstance systemInstance;
     private final ClassLoader classLoader;
     private final Context globalJndiContext;

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/OpenEJB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/OpenEJB.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/OpenEJB.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/OpenEJB.java Wed Jun  1 23:56:32 2011
@@ -70,7 +70,7 @@ public final class OpenEJB {
             if (appServer == null) {
                 throw new IllegalArgumentException("appServer must not be null");
             }
-            initialized = new Exception("Initialized at "+new Date()).fillInStackTrace();
+            initialized = new InitializationException("Initialized at "+new Date()).fillInStackTrace();
 
             Logger.configure();
             Logger logger = Logger.getInstance(LogCategory.OPENEJB_STARTUP, "org.apache.openejb.util.resources");
@@ -242,7 +242,7 @@ public final class OpenEJB {
 
     public static void destroy() {
         Assembler assembler = SystemInstance.get().getComponent(Assembler.class);
-        assembler.destroy();
+        if (assembler != null) assembler.destroy();
         SystemInstance.reset();
         instance = null;
     }
@@ -283,4 +283,11 @@ public final class OpenEJB {
     public static boolean isInitialized() {
         return instance != null || SystemInstance.get().getComponent(ContainerSystem.class) != null;
     }
+
+    public static class InitializationException extends Exception {
+        public InitializationException(String message)
+        {
+            super(message);
+        }
+    }
 }

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/OpenEjbContainer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/OpenEjbContainer.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/OpenEjbContainer.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/OpenEjbContainer.java Wed Jun  1 23:56:32 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.openejb;
 
-import bsh.Modifiers;
 import org.apache.openejb.assembler.classic.AppInfo;
 import org.apache.openejb.assembler.classic.Assembler;
 import org.apache.openejb.config.AppModule;
@@ -77,13 +76,15 @@ public class OpenEjbContainer extends EJ
 
     private static OpenEjbContainer instance;
 
-    private final Context context;
+    private final AppContext appContext;
 
     private ServiceManagerProxy serviceManager;
     private Options options;
+    private OpenEjbContainer.GlobalContext globalJndiContext;
 
-    private OpenEjbContainer(Map<?, ?> map, Context context) {
-        this.context = new GlobalContext(context);
+    private OpenEjbContainer(Map<?, ?> map, AppContext appContext) {
+        this.appContext = appContext;
+        this.globalJndiContext = new GlobalContext(appContext.getGlobalJndiContext());
 
         final Properties properties = new Properties();
         properties.putAll(map);
@@ -99,7 +100,7 @@ public class OpenEjbContainer extends EJ
             serviceManager.stop();
         }
         try {
-            context.close();
+            globalJndiContext.close();
         } catch (NamingException e) {
             throw new IllegalStateException(e);
         }
@@ -109,7 +110,7 @@ public class OpenEjbContainer extends EJ
 
     @Override
     public Context getContext() {
-        return context;
+        return globalJndiContext;
     }
 
     public <T> T inject(T object) {
@@ -188,7 +189,7 @@ public class OpenEjbContainer extends EJ
         public EJBContainer createEJBContainer(Map<?, ?> map) {
             if (isOtherProvider(map)) return null;
 
-            if (instance != null) {
+            if (instance != null || OpenEJB.isInitialized()) {
                 logger.info("EJBContainer already initialized.  Call ejbContainer.close() to allow reinitialization");
                 return instance;
             }
@@ -265,7 +266,7 @@ public class OpenEjbContainer extends EJ
                 }
 
 
-                return instance = new OpenEjbContainer(map, appContext.getGlobalJndiContext());
+                return instance = new OpenEjbContainer(map, appContext);
 
             } catch (OpenEJBException e) {
 
@@ -283,6 +284,13 @@ public class OpenEjbContainer extends EJ
                 }
 
                 throw new InitializationException(e);
+            } finally {
+                if (instance == null && OpenEJB.isInitialized()) {
+                    try {
+                        OpenEJB.destroy();
+                    } catch (Exception e) {
+                    }
+                }
             }
         }
 

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java Wed Jun  1 23:56:32 2011
@@ -507,6 +507,7 @@ public class Assembler extends Assembler
             }
 
             AppContext appContext = new AppContext(appInfo.appId, SystemInstance.get(), classLoader, globalJndiContext, appJndiContext, appInfo.standaloneModule);
+            containerSystem.addAppContext(appContext);
 
             Context containerSystemContext = containerSystem.getJNDIContext();
             

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiBuilder.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiBuilder.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiBuilder.java Wed Jun  1 23:56:32 2011
@@ -21,6 +21,7 @@ import java.util.List;
 import org.apache.openejb.AppContext;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.assembler.classic.AppInfo;
+import org.apache.openejb.assembler.classic.EjbJarInfo;
 import org.apache.openejb.core.ThreadContext;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.webbeans.config.WebBeansFinder;
@@ -36,6 +37,8 @@ public class CdiBuilder {
     }
 
     public void build(AppInfo appInfo, AppContext appContext, List<BeanContext> allDeployments) {
+        if (!hasBeans(appInfo)) return;
+
         ThreadSingletonService singletonService = SystemInstance.get().getComponent(ThreadSingletonService.class);
         logger.info("existing thread singleton service in SystemInstance() " + singletonService);
         //TODO hack for tests.  Currently initialized in OpenEJB line 90.  cf alternative in AccessTimeoutTest which would
@@ -46,6 +49,14 @@ public class CdiBuilder {
         singletonService.initialize(new StartupObject(appContext, appInfo, allDeployments));
     }
 
+    private boolean hasBeans(AppInfo appInfo) {
+        for (EjbJarInfo ejbJar : appInfo.ejbJars) {
+            if (ejbJar.beans != null) return true;
+        }
+
+        return false;
+    }
+
     public static ThreadSingletonService initializeOWB(ClassLoader classLoader) {
         ThreadSingletonService singletonService = new ThreadSingletonServiceImpl();
         logger.info("Created new singletonService " + singletonService);

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java Wed Jun  1 23:56:32 2011
@@ -26,8 +26,10 @@ import javax.ejb.Remove;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.SessionBeanType;
 import java.lang.reflect.Method;
+import java.lang.reflect.Type;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Set;
 
 public class CdiEjbBean<T> extends BaseEjbBean<T> {
     private final BeanContext beanContext;
@@ -35,6 +37,23 @@ public class CdiEjbBean<T> extends BaseE
     public CdiEjbBean(BeanContext beanContext, WebBeansContext webBeansContext) {
         super(beanContext.getBeanClass(), toSessionType(beanContext.getComponentType()), webBeansContext);
         this.beanContext = beanContext;
+
+
+        if (beanContext.isLocalbean()) addApiType(beanContext.getBeanClass());
+
+        addApiType(beanContext.getHomeInterface());
+        addApiType(beanContext.getLocalHomeInterface());
+
+        for (Class clazz : beanContext.getBusinessLocalInterfaces()) addApiType(clazz);
+        for (Class clazz : beanContext.getBusinessRemoteInterfaces()) addApiType(clazz);
+
+    }
+
+    @Override
+    public void addApiType(Class<?> apiType) {
+        if (apiType == null) return;
+
+        super.addApiType(apiType);
     }
 
     public BeanContext getBeanContext() {

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java Wed Jun  1 23:56:32 2011
@@ -145,7 +145,7 @@ public class CdiScanner implements Scann
         try {
             return classLoader.loadClass(className);
         } catch (ClassNotFoundException e) {
-            throw new RuntimeException("Unable to load " + type + " class", e);
+            throw new RuntimeException("Unable to load class: "+className, e);
         }
     }
 

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/OWBContextThreadListener.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/OWBContextThreadListener.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/OWBContextThreadListener.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/OWBContextThreadListener.java Wed Jun  1 23:56:32 2011
@@ -45,7 +45,8 @@ public class OWBContextThreadListener im
         AppContext appContext = moduleContext.getAppContext();
         WebBeansContext owbContext = appContext.get(WebBeansContext.class);
         if (owbContext == null) {
-            throw new IllegalStateException("WebBeansContext not initialized in appContext " + appContext);
+//            throw new IllegalStateException("WebBeansContext not initialized in appContext " + appContext);
+            return;
         }
         Object oldOWBContext = singletonService.contextEntered(owbContext);
         OWBContextHolder holder = new OWBContextHolder(oldOWBContext);

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java Wed Jun  1 23:56:32 2011
@@ -20,6 +20,9 @@
 
 package org.apache.openejb.cdi;
 
+import org.apache.openejb.AppContext;
+import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.spi.ContainerSystem;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
 import org.apache.webbeans.config.OpenWebBeansConfiguration;
@@ -27,6 +30,8 @@ import org.apache.webbeans.config.WebBea
 import org.apache.webbeans.spi.ContainerLifecycle;
 import org.apache.webbeans.spi.ResourceInjectionService;
 
+import java.util.List;
+
 /**
  * @version $Rev:$ $Date:$
  */
@@ -100,8 +105,21 @@ public class ThreadSingletonServiceImpl 
     }
 
     private WebBeansContext getContext() {
+        return get();
+    }
+
+    public static WebBeansContext get()
+    {
         WebBeansContext context = contexts.get();
         if (context == null) {
+            // Fallback strategy is to just grab the first AppContext and assume it is the right one
+            // This kind of algorithm could be greatly improved
+            final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
+
+            final List<AppContext> appContexts = containerSystem.getAppContexts();
+
+            if (appContexts.size() > 0) return appContexts.get(0).getWebBeansContext();
+
             throw new IllegalStateException("On a thread without an initialized context");
         }
         return context;

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java Wed Jun  1 23:56:32 2011
@@ -21,6 +21,7 @@ import static java.util.Arrays.asList;
 import static org.apache.openejb.util.Join.join;
 
 import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
@@ -84,6 +85,7 @@ import javax.ejb.TransactionAttribute;
 import javax.ejb.TransactionAttributeType;
 import javax.ejb.TransactionManagement;
 import javax.ejb.TransactionManagementType;
+import javax.inject.Inject;
 import javax.interceptor.ExcludeClassInterceptors;
 import javax.interceptor.ExcludeDefaultInterceptors;
 import javax.interceptor.Interceptors;
@@ -112,6 +114,7 @@ import org.apache.openejb.jee.AroundInvo
 import org.apache.openejb.jee.AroundTimeout;
 import org.apache.openejb.jee.AssemblyDescriptor;
 import org.apache.openejb.jee.AsyncMethod;
+import org.apache.openejb.jee.Beans;
 import org.apache.openejb.jee.ConcurrencyManagementType;
 import org.apache.openejb.jee.ConcurrentLockType;
 import org.apache.openejb.jee.ConcurrentMethod;
@@ -591,6 +594,15 @@ public class AnnotationDeployer implemen
                 }
             }
 
+            {
+                final Beans beans = ejbModule.getBeans();
+
+                if (beans != null) {
+                    beans.getManagedClasses().addAll(finder.getAnnotatedClassNames());
+                }
+            }
+
+
             return ejbModule;
         }
 

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java Wed Jun  1 23:56:32 2011
@@ -56,6 +56,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.URLClassLoader;
 import java.net.URLDecoder;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -1086,13 +1087,31 @@ public class DeploymentLoader implements
     private static Map<String, URL> getDescriptors(ResourceFinder finder, boolean log) throws OpenEJBException {
         try {
 
-            return altDDSources(finder.getResourcesMap(ddDir), log);
+            return altDDSources(mapDescriptors(finder), log);
 
         } catch (IOException e) {
             throw new OpenEJBException("Unable to determine descriptors in jar.", e);
         }
     }
 
+    private static Map<String, URL> mapDescriptors(ResourceFinder finder)
+        throws IOException
+    {
+        final Map<String, URL> map = finder.getResourcesMap(ddDir);
+
+        if (map.size() == 0) {
+
+            String[] known = {"web.xml", "ejb-jar.xml", "openejb-jar.xml", "env-entries.properties", "beans.xml", "ra.xml", "application.xml", "application-client.xml", "persistence.xml"};
+            for (String descriptor : known) {
+
+                final URL url = finder.getResource(ddDir + descriptor);
+                if (url != null) map.put(descriptor, url);
+            }
+
+        }
+        return map;
+    }
+
     /**
      * Modifies the map passed in with all the alt dd URLs found
      *
@@ -1249,9 +1268,8 @@ public class DeploymentLoader implements
             pathToScanDescriptors=new URL(baseURLString.substring(0,baseURLString.lastIndexOf("WEB-INF/classes/")));
 
         }
-        ResourceFinder finder = new ResourceFinder("", classLoader, pathToScanDescriptors);
 
-        Map<String, URL> descriptors = altDDSources(finder.getResourcesMap(ddDir), false);
+        Map<String, URL> descriptors = getDescriptors(classLoader, pathToScanDescriptors);
 
         String path = baseUrl.getPath();
         if (path.endsWith("/")) path = path.substring(0, path.length() - 1);
@@ -1273,7 +1291,7 @@ public class DeploymentLoader implements
             return WebModule.class;
         }
 
-        if (descriptors.containsKey("ejb-jar.xml")) {
+        if (descriptors.containsKey("ejb-jar.xml") || descriptors.containsKey("beans.xml")) {
             return EjbModule.class;
         }
 
@@ -1298,6 +1316,14 @@ public class DeploymentLoader implements
         throw new UnknownModuleTypeException("Unknown module type: url=" + baseUrl.toExternalForm());
     }
 
+    private Map<String, URL> getDescriptors(ClassLoader classLoader, URL pathToScanDescriptors)
+        throws IOException
+    {
+        ResourceFinder finder = new ResourceFinder("", classLoader, pathToScanDescriptors);
+
+        return altDDSources(mapDescriptors(finder), false);
+    }
+
     private Class<? extends DeploymentModule> checkAnnotations(URL urls, ClassLoader classLoader, final boolean scanPotentialEjbModules, final boolean scanPotentialClientModules) {
         Class<? extends DeploymentModule> cls = null;
         if (scanPotentialEjbModules || scanPotentialClientModules) {

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java Wed Jun  1 23:56:32 2011
@@ -158,11 +158,15 @@ public class NewLoaderLogic {
                 "axis2-",
                 "bcprov-",
                 "bsh-",
+                "bval-core",
+                "bval-jsr",
                 "catalina-",
                 "cglib-",
+                "commons-beanutils",
                 "commons-cli-",
                 "commons-codec-",
                 "commons-collections-",
+                "commons-dbcp",
                 "commons-dbcp-all-1.3-",
                 "commons-discovery-",
                 "commons-httpclient-",
@@ -178,16 +182,18 @@ public class NewLoaderLogic {
                 "derby-",
                 "dom4j-",
                 "geronimo-",
+                "gragent.jar",
                 "guice-",
+                "hibernate-",
                 "howl-",
                 "hsqldb-",
                 "htmlunit-",
-                "hibernate-",
                 "icu4j-",
                 "idb-",
                 "idea_rt.jar",
                 "jasypt-",
                 "javaee-",
+                "javaee-api",
                 "javassist-",
                 "javaws.jar",
                 "javax.",
@@ -212,6 +218,10 @@ public class NewLoaderLogic {
                 "myfaces-",
                 "neethi-",
                 "nekohtml-",
+                "openejb-api",
+                "openejb-javaagent",
+                "openejb-jee",
+                "openejb-loader",
                 "openjpa-",
                 "opensaml-",
                 "openwebbeans-",
@@ -231,6 +241,10 @@ public class NewLoaderLogic {
                 "stax-api-",
                 "swizzle-",
                 "testng-",
+                "webbeans-ee",
+                "webbeans-ejb",
+                "webbeans-impl",
+                "webbeans-spi",
                 "wsdl4j-",
                 "wss4j-",
                 "wstx-asl-",
@@ -250,7 +264,8 @@ public class NewLoaderLogic {
         while (iterator.hasNext()) {
             URL url = iterator.next();
             File file = URLs.toFile(url);
-            String name = file.getName();
+
+            String name = filter(file).getName();
 //            System.out.println("JAR "+name);
             if (filter.accept(name)) iterator.remove();
         }
@@ -260,6 +275,22 @@ public class NewLoaderLogic {
         return new UrlSet(urls);
     }
 
+    private static File filter(File location) {
+        List<String> invalid = new ArrayList<String>();
+        invalid.add("classes");
+        invalid.add("test-classes");
+        invalid.add("target");
+        invalid.add("build");
+        invalid.add("dist");
+        invalid.add("bin");
+
+        while (invalid.contains(location.getName())) {
+            location = location.getParentFile();
+        }
+        return location;
+    }
+
+
     public static void _loadFromClasspath(FileUtils base, List<URL> jarList, ClassLoader classLoader) {
 
         PerformanceTimer timer = new PerformanceTimer();

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ReadDescriptors.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ReadDescriptors.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ReadDescriptors.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ReadDescriptors.java Wed Jun  1 23:56:32 2011
@@ -293,8 +293,8 @@ public class ReadDescriptors implements 
             Beans beans = readBeans(url);
             ejbModule.setBeans(beans);
         } else {
-            DeploymentLoader.logger.debug("No beans.xml found assuming annotated beans present: " + appModule.getJarLocation() + ", module: " + ejbModule.getModuleId());
-            ejbModule.setBeans(new Beans());
+//            DeploymentLoader.logger.debug("No beans.xml found assuming annotated beans present: " + appModule.getJarLocation() + ", module: " + ejbModule.getModuleId());
+//            ejbModule.setBeans(new Beans());
         }
     }
 

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java Wed Jun  1 23:56:32 2011
@@ -16,10 +16,13 @@
  */
 package org.apache.openejb.core;
 
+import org.apache.openejb.AppContext;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.Container;
 import org.apache.openejb.loader.SystemInstance;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -29,12 +32,12 @@ import javax.naming.Context;
  * @org.apache.xbean.XBean element="containerSystem"
  */
 public class CoreContainerSystem implements org.apache.openejb.spi.ContainerSystem {
-    Map<Object, BeanContext> deployments = new ConcurrentHashMap<Object, BeanContext>();
-    Map<Object, Container> containers = new ConcurrentHashMap<Object, Container>();
-    Map<String, WebContext> webDeployments = new ConcurrentHashMap<String, WebContext>();
+    private final Map<Object, AppContext> apps = new ConcurrentHashMap<Object, AppContext>();
+    private final Map<Object, BeanContext> deployments = new ConcurrentHashMap<Object, BeanContext>();
+    private final Map<Object, Container> containers = new ConcurrentHashMap<Object, Container>();
+    private final Map<String, WebContext> webDeployments = new ConcurrentHashMap<String, WebContext>();
     private final Context jndiContext;
 
-
     /**
      * Constructs a CoreContainerSystem and initializes the root JNDI context.
      * It also creates three sub contexts, namely
@@ -122,4 +125,14 @@ public class CoreContainerSystem impleme
     public Context getJNDIContext() {
         return jndiContext;
     }
+
+    @Override
+    public List<AppContext> getAppContexts() {
+        return new ArrayList<AppContext>(apps.values());
+    }
+
+    @Override
+    public void addAppContext(AppContext appContext) {
+        apps.put(appContext.getId(), appContext);
+    }
 }

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/spi/ContainerSystem.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/spi/ContainerSystem.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/spi/ContainerSystem.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/spi/ContainerSystem.java Wed Jun  1 23:56:32 2011
@@ -16,11 +16,13 @@
  */
 package org.apache.openejb.spi;
 
+import org.apache.openejb.AppContext;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.Container;
 import org.apache.openejb.core.WebContext;
 
 import javax.naming.Context;
+import java.util.List;
 
 public interface ContainerSystem {
 
@@ -35,4 +37,8 @@ public interface ContainerSystem {
     WebContext getWebContext(String id);
 
     Context getJNDIContext();
+
+    List<AppContext> getAppContexts();
+
+    void addAppContext(AppContext appContext);
 }
\ No newline at end of file

Added: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/cdi/InjectionTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/cdi/InjectionTest.java?rev=1130358&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/cdi/InjectionTest.java (added)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/cdi/InjectionTest.java Wed Jun  1 23:56:32 2011
@@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.openejb.cdi;
+
+import junit.framework.TestCase;
+import org.apache.openejb.jee.Beans;
+import org.apache.openejb.jee.SessionBean;
+import org.apache.openejb.jee.SingletonBean;
+import org.apache.openejb.junit.ApplicationComposer;
+import org.apache.openejb.junit.Module;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import javax.ejb.EJB;
+import javax.ejb.Singleton;
+import javax.inject.Inject;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@RunWith(ApplicationComposer.class)
+public class InjectionTest extends TestCase {
+
+    @EJB
+    private Orange orange;
+
+    @Test
+    public void test() throws Exception {
+
+        assertNotNull(orange);
+        assertNotNull(orange.getBlue());
+
+    }
+
+    @Module
+    public SessionBean getEjbs() {
+        return new SingletonBean(Orange.class);
+    }
+
+    @Module
+    public Beans getBeans() {
+        final Beans beans = new Beans();
+        beans.addManagedClass(Blue.class);
+        beans.addManagedClass(Green.class);
+        return beans;
+    }
+
+    @Singleton
+    public static class Orange {
+
+        private Blue blue;
+
+        @Inject
+        public void setBlue(Blue blue) {
+            this.blue = blue;
+        }
+
+        public Blue getBlue() {
+            return blue;
+        }
+    }
+
+    public static class Blue {
+
+        private Green green;
+
+        public Blue()
+        {
+            "".length();
+        }
+
+        public Green getGreen() {
+            return green;
+        }
+
+        @Inject
+        public void setGreen(Green green) {
+            this.green = green;
+        }
+    }
+
+    public static class Green {
+
+        public Green()
+        {
+            "".length();
+        }
+    }
+}

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulTest.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulTest.java Wed Jun  1 23:56:32 2011
@@ -16,24 +16,19 @@
  */
 package org.apache.openejb.core.stateful;
 
+import javax.ejb.LocalBean;
+import javax.ejb.Stateful;
+import javax.naming.InitialContext;
+
 import junit.framework.TestCase;
 import org.apache.openejb.assembler.classic.Assembler;
 import org.apache.openejb.assembler.classic.SecurityServiceInfo;
 import org.apache.openejb.assembler.classic.TransactionServiceInfo;
+import org.apache.openejb.client.LocalInitialContextFactory;
 import org.apache.openejb.config.ConfigurationFactory;
-import org.apache.openejb.core.ivm.naming.InitContextFactory;
 import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.jee.StatefulBean;
 
-import javax.ejb.Stateful;
-import javax.ejb.SessionBean;
-import javax.ejb.EJBException;
-import javax.ejb.SessionContext;
-import javax.ejb.LocalBean;
-import javax.naming.InitialContext;
-import javax.annotation.Resource;
-import java.rmi.RemoteException;
-
 /**
  * This test case serves as a nice tiny template for other test cases
  * and purposely doesn't do anything very complicated.
@@ -45,7 +40,7 @@ public class StatefulTest extends TestCa
     @Override
     protected void setUp() throws Exception {
 
-        System.setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY, InitContextFactory.class.getName());
+        System.setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY, LocalInitialContextFactory.class.getName());
 
         ConfigurationFactory config = new ConfigurationFactory();
         Assembler assembler = new Assembler();
@@ -69,29 +64,11 @@ public class StatefulTest extends TestCa
 
     @Stateful
     @LocalBean
-    public static class MyBean implements SessionBean {
+    public static class MyBean {
 
         public String echo(String string) {
             StringBuilder sb = new StringBuilder(string);
             return sb.reverse().toString();
         }
-
-        public void ejbActivate() throws EJBException, RemoteException {
-        }
-
-        public void ejbPassivate() throws EJBException, RemoteException {
-        }
-
-        public void ejbRemove() throws EJBException, RemoteException {
-        }
-
-        @Resource
-        public void setStatefulContext(SessionContext statefulContext) {
-            System.out.println("StatefulTest$MyBean.setStatefulContext");
-        }
-        
-        public void setSessionContext(SessionContext sessionContext) throws EJBException, RemoteException {
-            System.out.println("StatefulTest$MyBean.setSessionContext");
-        }
     }
 }

Copied: openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/Archive.java (from r1124537, geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/archive/Archives.java)
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/Archive.java?p2=openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/Archive.java&p1=geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/archive/Archives.java&r1=1124537&r2=1130358&rev=1130358&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/archive/Archives.java (original)
+++ openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/Archive.java Wed Jun  1 23:56:32 2011
@@ -14,127 +14,119 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.xbean.finder.archive;
+package org.apache.openejb.tck.cdi.embedded;
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 
 import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertTrue;
 
 /**
-* @version $Rev$ $Date$
-*/
-public class Archives {
+ * @version $Rev$ $Date$
+ */
+public class Archive
+{
 
-    public static File fileArchive(Class[] classes) throws IOException {
-        return fileArchive(new HashMap<String, String>(), classes);
-    }
+    private final String name;
 
-    public static File fileArchive(Map<String, String> entries, Class... classes) throws IOException {
+    private final InputStream in;
 
-        ClassLoader loader = Archives.class.getClassLoader();
 
-        File classpath = File.createTempFile("path with spaces", "classes");
+    public Archive(Iterable<URL> urls, Iterable<Class<?>> classes)
+    {
 
-        assertTrue(classpath.delete());
-        assertTrue(classpath.mkdirs());
+        try
+        {
+            ClassLoader loader = Archive.class.getClassLoader();
 
+            // Create the ZIP file
+            final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
 
-        for (Class clazz : classes) {
-            String name = clazz.getName().replace('.', File.separatorChar) + ".class";
-            File file = new File(classpath, name);
+            final ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(byteArrayOutputStream));
 
-            File d = file.getParentFile();
+            this.name = name(classes);
 
-            if (!d.exists()) assertTrue(d.getAbsolutePath(), d.mkdirs());
+            for (Class clazz : classes)
+            {
 
-            URL resource = loader.getResource(name);
-            assertNotNull(resource);
+                String name = clazz.getName().replace('.', File.separatorChar) + ".class";
 
-            InputStream in = new BufferedInputStream(resource.openStream());
-            BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));
+                URL resource = loader.getResource(name);
+                assertNotNull(resource);
 
-            int i = -1;
-            while ((i = in.read()) != -1) {
-                out.write(i);
-            }
+                // Add ZIP entry to output stream.
+                out.putNextEntry(new ZipEntry(name));
 
-            out.close();
-            in.close();
-        }
+                InputStream in = new BufferedInputStream(resource.openStream());
+
+                int i = -1;
+                while ((i = in.read()) != -1)
+                {
+                    out.write(i);
+                }
 
-        for (Map.Entry<String, String> entry : entries.entrySet()) {
+                // Complete the entry
+                out.closeEntry();
+            }
 
-            final String key = entry.getKey().replace('/', File.separatorChar);
+            for (final URL url : urls)
+            {
 
-            final File file = new File(classpath, key);
+                final String name = "META-INF/" + new File(url.getFile()).getName();
 
-            File d = file.getParentFile();
+                out.putNextEntry(new ZipEntry(name));
 
-            if (!d.exists()) assertTrue(d.getAbsolutePath(), d.mkdirs());
+                final InputStream in = new BufferedInputStream(url.openStream());
 
-            BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));
+                int i = -1;
+                while ((i = in.read()) != -1)
+                {
+                    out.write(i);
+                }
 
-            out.write(entry.getValue().getBytes());
+                in.close();
+            }
 
+            // Complete the ZIP file
             out.close();
-        }
 
-        return classpath;
+            this.in = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
+        }
+        catch (IOException e)
+        {
+            throw new RuntimeException(e);
+        }
     }
 
-    public static File jarArchive(Class[] classes) throws IOException {
-        return jarArchive(new HashMap<String, String>(), classes);
+    public String getName()
+    {
+        return name;
     }
 
-    public static File jarArchive(Map<String, String> entries, Class... classes) throws IOException {
-
-        ClassLoader loader = Archives.class.getClassLoader();
-
-        File classpath = File.createTempFile("path with spaces", ".jar");
-
-        // Create the ZIP file
-        ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(classpath)));
-
-        for (Class clazz : classes) {
-            String name = clazz.getName().replace('.', File.separatorChar) + ".class";
-
-            URL resource = loader.getResource(name);
-            assertNotNull(resource);
-
-            // Add ZIP entry to output stream.
-            out.putNextEntry(new ZipEntry(name));
-
-            InputStream in = new BufferedInputStream(resource.openStream());
+    public InputStream getIn()
+    {
+        return in;
+    }
 
-            int i = -1;
-            while ((i = in.read()) != -1) {
-                out.write(i);
+    private String name(Iterable<Class<?>> classes)
+    {
+        for (Class<?> clazz : classes)
+        {
+            if (clazz.getName().endsWith("AbstractJSR299Test")) continue;
+            if (clazz.getName().endsWith("Test"))
+            {
+                return clazz.getName()+".jar";
             }
-
-            // Complete the entry
-            out.closeEntry();
-        }
-
-        for (Map.Entry<String, String> entry : entries.entrySet()) {
-
-            out.putNextEntry(new ZipEntry(entry.getKey()));
-
-            out.write(entry.getValue().getBytes());
         }
 
-        // Complete the ZIP file
-        out.close();
-        return classpath;
+        return "test-archive.jar";
     }
 }

Propchange: openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/Archive.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/BeansImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/BeansImpl.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/BeansImpl.java (original)
+++ openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/BeansImpl.java Wed Jun  1 23:56:32 2011
@@ -16,7 +16,11 @@
  */
 package org.apache.openejb.tck.cdi.embedded;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
 
 /**
 * @version $Rev$ $Date$
@@ -24,16 +28,23 @@ import java.io.IOException;
 public class BeansImpl implements org.jboss.jsr299.tck.spi.Beans {
 
     public boolean isProxy(Object instance) {
+        System.out.println("isProxy: " + instance);
         return instance.getClass().getName().contains("$$");
     }
 
     @Override
     public byte[] serialize(Object instance) throws IOException {
-        return new byte[0];
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream os = new ObjectOutputStream(baos);
+        os.writeObject(instance);
+        os.flush();
+        return baos.toByteArray();
     }
 
     @Override
     public Object deserialize(byte[] bytes) throws IOException, ClassNotFoundException {
-        return null;
+        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+        ObjectInputStream is = new ObjectInputStream(bais);
+        return is.readObject();
     }
 }

Added: openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/ContainersImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/ContainersImpl.java?rev=1130358&view=auto
==============================================================================
--- openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/ContainersImpl.java (added)
+++ openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/ContainersImpl.java Wed Jun  1 23:56:32 2011
@@ -0,0 +1,138 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.openejb.tck.cdi.embedded;
+
+import org.apache.openejb.OpenEJB;
+import org.apache.openejb.assembler.classic.Assembler;
+import org.apache.openejb.cdi.ThreadSingletonService;
+import org.apache.openejb.cdi.ThreadSingletonServiceImpl;
+import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.util.SetAccessible;
+import org.apache.webbeans.config.WebBeansContext;
+import org.apache.webbeans.container.BeanManagerImpl;
+import org.jboss.testharness.api.DeploymentException;
+import org.jboss.testharness.spi.Containers;
+
+import javax.ejb.embeddable.EJBContainer;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Field;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ContainersImpl implements Containers {
+
+    private static String stuck;
+
+    private Exception exception;
+    private EJBContainer container;
+
+    @Override
+    public boolean deploy(InputStream archive, String name) {
+        if (!OpenEJB.isInitialized()) stuck = name;
+        else System.out.println("STUCK " + stuck);
+
+        exception = null;
+
+        final Assembler assembler = SystemInstance.get().getComponent(Assembler.class);
+
+        ThreadSingletonServiceImpl.exit(null);
+        if (assembler != null) {
+            assembler.destroy();
+        }
+        try {
+            final Map<String, Object> map = new HashMap<String, Object>();
+            map.put(EJBContainer.MODULES, writeToFile(archive, name));
+            map.put(EJBContainer.APP_NAME, name);
+
+            container = EJBContainer.createEJBContainer(map);
+
+            final WebBeansContext webBeansContext = ThreadSingletonServiceImpl.get();
+            dump(webBeansContext.getBeanManagerImpl());
+
+        } catch (Exception e) {
+            exception = e;
+            return false;
+        }
+
+        return true;
+    }
+
+    private void dump(Object o)
+    {
+        try
+        {
+            final Class<? extends Object> clazz = o.getClass();
+
+            for (Field field : clazz.getDeclaredFields())
+            {
+                SetAccessible.on(field);
+
+                if (Collection.class.isAssignableFrom(field.getType())) {
+                    final Collection collection = (Collection) field.get(o);
+                    System.out.println(field.getName() + "\t= " + collection.size());
+                }
+            }
+        }
+        catch (Exception e)
+        {
+
+        }
+    }
+
+    private File writeToFile(InputStream archive, String name) throws IOException {
+        final File file = File.createTempFile("deploy", "-" + name);
+        file.deleteOnExit();
+
+        final BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));
+
+        try {
+            int i = -1;
+            while ((i = archive.read()) != -1) out.write(i);
+        } finally {
+            out.close();
+        }
+
+        return file;
+    }
+
+    @Override
+    public DeploymentException getDeploymentException() {
+        return new DeploymentException(exception.getLocalizedMessage(), exception);
+    }
+
+    @Override
+    public void undeploy(String name) {
+        if (container != null) container.close();
+    }
+
+    @Override
+    public void setup() throws IOException {
+    }
+
+    @Override
+    public void cleanup() throws IOException {
+    }
+}

Added: openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/Report.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/Report.java?rev=1130358&view=auto
==============================================================================
--- openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/Report.java (added)
+++ openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/Report.java Wed Jun  1 23:56:32 2011
@@ -0,0 +1,97 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.openejb.tck.cdi.embedded;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import java.io.File;
+import java.util.Collections;
+import java.util.LinkedList;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Report {
+
+    public static void main(String[] args) throws Exception {
+        new Report().main();
+    }
+
+    private final LinkedList<TestClass> classes = new LinkedList<TestClass>();
+
+    private void main() throws Exception {
+        final File file = new File("/Users/dblevins/work/uber/openejb/tck/cdi-embedded/target/surefire-reports/testng-results.xml");
+
+        final SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
+
+        parser.parse(file, new DefaultHandler() {
+            @Override
+            public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+                final String name = qName;
+                if ("class".equals(name)) {
+                    classes.add(new TestClass(attributes.getValue("name")));
+                }
+
+                if ("test-method".equals(name)) {
+                    classes.getLast().addStatus(attributes.getValue("status"));
+                }
+            }
+        });
+
+        Collections.sort(classes);
+
+        int i = 0;
+        for (TestClass testClass : classes) {
+            if (!testClass.hasFailures()) continue;
+            System.out.printf("<class name=\"%s\"/>\n", testClass.name);
+            i++;
+        }
+
+        System.out.println(i);
+    }
+
+    public static class TestClass implements Comparable<TestClass>{
+
+        private final String name;
+        private int failed;
+        private int passed;
+        private int error;
+
+        public TestClass(String name) {
+            this.name = name;
+        }
+
+        public void addStatus(String status) {
+            if ("PASS".equals(status)) passed++;
+            if ("FAIL".equals(status)) failed++;
+            if ("ERROR".equals(status)) error++;
+        }
+
+        public boolean hasFailures() {
+            return failed > 0 || error > 0;
+        }
+
+        @Override
+        public int compareTo(TestClass o) {
+            return this.name.compareTo(o.name);
+        }
+    }
+}

Modified: openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/StandaloneContainersImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/StandaloneContainersImpl.java?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/StandaloneContainersImpl.java (original)
+++ openejb/trunk/openejb3/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/StandaloneContainersImpl.java Wed Jun  1 23:56:32 2011
@@ -16,128 +16,54 @@
  */
 package org.apache.openejb.tck.cdi.embedded;
 
-import org.apache.openejb.AppContext;
-import org.apache.openejb.assembler.classic.AppInfo;
-import org.apache.openejb.assembler.classic.Assembler;
-import org.apache.openejb.assembler.classic.EjbJarInfo;
-import org.apache.openejb.assembler.classic.SecurityServiceInfo;
-import org.apache.openejb.assembler.classic.TransactionServiceInfo;
-import org.apache.openejb.cdi.ThreadSingletonServiceImpl;
-import org.apache.openejb.config.AppModule;
-import org.apache.openejb.config.ConfigurationFactory;
-import org.apache.openejb.config.EjbModule;
-import org.apache.openejb.jee.EjbJar;
-import org.apache.openejb.util.LogCategory;
-import org.apache.openejb.util.Logger;
-import org.apache.webbeans.container.BeanManagerImpl;
-import org.apache.xbean.finder.AnnotationFinder;
-import org.apache.xbean.finder.ClassFinder;
-import org.apache.xbean.finder.archive.ClassesArchive;
-import org.jboss.testharness.api.DeploymentException;
-
-import javax.enterprise.inject.spi.BeanManager;
-import java.io.File;
 import java.net.URL;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.List;
-import java.util.Map;
+
+import org.jboss.testharness.api.DeploymentException;
 
 /**
  * @version $Rev$ $Date$
  */
-public class StandaloneContainersImpl implements org.jboss.testharness.spi.StandaloneContainers {
-
-    private static final Logger logger = Logger.getInstance(LogCategory.OPENEJB.createChild("tck"), StandaloneContainersImpl.class);
-
-    private AppContext appContext;
+public class StandaloneContainersImpl
+    implements org.jboss.testharness.spi.StandaloneContainers
+{
 
-    private DeploymentException deploymentException;
+    private final ContainersImpl containers = new ContainersImpl();
 
-    public void deploy(Collection<Class<?>> classes) throws DeploymentException {
-        deploy(classes, Collections.<URL>emptyList());
+    @Override
+    public void deploy(Collection<Class<?>> classes)
+        throws DeploymentException
+    {
+        deploy(classes, Collections.EMPTY_LIST);
     }
 
-    public boolean deploy(Collection<Class<?>> classes, Collection<URL> urls) {
-        logger.debug("StandaloneContainersImpl.deploy");
-
-        List<String> classNames = new ArrayList<String>();
-
-        for (Class<?> clazz : classes) classNames.add(clazz.getName());
-
-        if (logger.isDebugEnabled()) {
-            Collections.sort(classNames);
-
-            for (String clazz : classNames) {
-                logger.debug("clazz = " + clazz);
-            }
-
-            for (URL url : urls) {
-                logger.debug("url = " + url);
-            }
-        }
-
-        try {
-            EjbModule ejbModule = new EjbModule(new EjbJar("beans"));
-            ejbModule.setFinder(new AnnotationFinder(new ClassesArchive(classes)));
-
-            Map<String, Object> dds = ejbModule.getAltDDs();
-
-            for (URL url : urls) {
-                final File file = new File(url.getFile());
-                dds.put(file.getName(), url);
-            }
-
-            Assembler assembler = new Assembler();
-            ConfigurationFactory config = new ConfigurationFactory();
-            assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
-            assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
-
-            final AppInfo appInfo = config.configureApplication(new AppModule(ejbModule));
-
-            for (EjbJarInfo ejbJar : appInfo.ejbJars) {
-                // TODO We need to improve our scanning so this isn't necessary
-                ejbJar.beans.managedClasses.addAll(classNames);
-            }
-
-            appContext = assembler.createApplication(appInfo);
-
-            // This must be set or the OWB static lookup code won't work and everything will fall apart
-            Thread.currentThread().setContextClassLoader(appContext.getClassLoader());
-        } catch (Exception e) {
-            logger.debug("Deploy failed", e);
-            deploymentException = new DeploymentException("Deploy failed", e);
-            return false;
-        }
-        //            logger.debug("StandaloneContainersImpl.deploy(classes, urls)");
-        //            for (Class<?> clazz : classes) {
-        //                logger.debug("clazz = " + clazz);
-        //            }
-        //            for (URL url : urls) {
-        //                logger.debug("url = " + url);
-        //            }
-
-
-        ThreadSingletonServiceImpl.enter(appContext.getWebBeansContext());
-
-        return true;
+    @Override
+    public boolean deploy(Collection<Class<?>> classes, Collection<URL> beansXmls)
+    {
+        final Archive archive = new Archive(beansXmls, classes);
+        return containers.deploy(archive.getIn(), archive.getName());
     }
 
-    public DeploymentException getDeploymentException() {
-        logger.debug("StandaloneContainersImpl.getDeploymentException");
-        return deploymentException;
+    @Override
+    public DeploymentException getDeploymentException()
+    {
+        return containers.getDeploymentException();
     }
 
-    public void undeploy() {
-        logger.debug("StandaloneContainersImpl.undeploy");
+    @Override
+    public void undeploy()
+    {
+        containers.undeploy(null);
     }
 
-    public void setup() {
-        logger.debug("StandaloneContainersImpl.setup");
+    @Override
+    public void setup()
+    {
     }
 
-    public void cleanup() {
-        logger.debug("StandaloneContainersImpl.cleanup");
+    @Override
+    public void cleanup()
+    {
     }
 }

Modified: openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/META-INF/jboss-test-harness.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/META-INF/jboss-test-harness.properties?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/META-INF/jboss-test-harness.properties (original)
+++ openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/META-INF/jboss-test-harness.properties Wed Jun  1 23:56:32 2011
@@ -20,6 +20,8 @@ org.jboss.jsr299.tck.spi.Beans=org.apach
 org.jboss.jsr299.tck.spi.Contexts=org.apache.openejb.tck.cdi.embedded.ContextsImpl
 org.jboss.jsr299.tck.spi.EL=org.apache.openejb.tck.cdi.embedded.ELImpl
 org.jboss.testharness.spi.StandaloneContainers=org.apache.openejb.tck.cdi.embedded.StandaloneContainersImpl
+org.jboss.testharness.spi.Containers=org.apache.openejb.tck.cdi.embedded.ContainersImpl
 
-
-org.jboss.testharness.api.TestLauncher=org.jboss.testharness.impl.runner.local.LocalTestLauncher
\ No newline at end of file
+org.jboss.testharness.standalone=true
+org.jboss.testharness.api.TestLauncher=org.jboss.testharness.impl.runner.local.LocalTestLauncher
+org.jboss.testharness.runIntegrationTests=true
\ No newline at end of file

Modified: openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/failing.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/failing.xml?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/failing.xml (original)
+++ openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/failing.xml Wed Jun  1 23:56:32 2011
@@ -1,8 +1,5 @@
 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
 
-<!-- CDI TCK Excludes for latest released TCK (currently 1.0.1 Final)
--->
-
 <suite name="CDI TCK" verbose="0">
   <test name="CDI TCK">
     <!--<packages>-->
@@ -11,46 +8,18 @@
     <!--</packages>-->
 
     <classes>
-
       <class name="org.jboss.jsr299.tck.tests.context.application.ejb.ApplicationContextSharedTest"/>
       <class name="org.jboss.jsr299.tck.tests.context.dependent.ejb.DependentContextEjbTest"/>
       <class name="org.jboss.jsr299.tck.tests.context.passivating.PassivatingContextTest"/>
       <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.dependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoStatefulSessionBean.EnterpriseBeanWithIllegalDependencyTest"/>
       <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.dependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBean.EnterpriseBeanWithIllegalDependencyTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.enterpriseBeanWithNonPassivatingBeanConstructorParameterInInterceptor.EnterpriseBeanWithNonPassivatingBeanConstructorParameterInInterceptorTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.enterpriseBeanWithNonPassivatingConstructorFieldInDecorator.EnterpriseBeanWithNonPassivatingFieldInDecoratorTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.enterpriseBeanWithNonPassivatingDecorator.EnterpriseBeanWithNonPassivatingDecoratorTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.enterpriseBeanWithNonPassivatingInitializerInDecorator.EnterpriseBeanWithNonPassivatingInitializerInDecoratorTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.enterpriseBeanWithNonPassivatingInitializerParameterInInterceptor.EnterpriseBeanWithNonPassivatingInitializerParameterInInterceptorTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.enterpriseBeanWithNonPassivatingInjectedFieldInDecorator.EnterpriseBeanWithNonPassivatingInjectedFieldInDecoratorTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.enterpriseBeanWithNonPassivatingInjectedFieldInInterceptor.EnterpriseBeanWithNonPassivatingInjectedFieldInInterceptorTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.enterpriseBeanWithNonSerializableIntializerMethod.EnterpriseBeanWithNonSerializableIntializerMethodTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.finalProducerFieldNotPassivationCapable.NonPassivationCapableProducerFieldTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.managedBeanWithNonPassivatingDecorator.ManagedBeanWithNonPassivatingDecoratorTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.nonPassivationCapableProducerField.NonPassivationCapableProducerFieldTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.nonPassivationCapableProducerMethod.NonPassivationCapableProducerMethodTest"/>
-      <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.unserializableSimpleInjectedIntoPassivatingEnterpriseBean.UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest"/>
       <class name="org.jboss.jsr299.tck.tests.context.request.ejb.EJBRequestContextTest"/>
-      <class name="org.jboss.jsr299.tck.tests.decorators.invocation.EJBDecoratorInvocationTest"/>
-      <class name="org.jboss.jsr299.tck.tests.definition.qualifier.enterprise.EnterpriseQualifierDefinitionTest"/>
-      <class name="org.jboss.jsr299.tck.tests.definition.scope.enterprise.EnterpriseScopeDefinitionTest"/>
-      <class name="org.jboss.jsr299.tck.tests.definition.stereotype.enterprise.EnterpriseStereotypeDefinitionTest"/>
-      <class name="org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.failsDuringBeanDiscovery.DeploymentFailureTest"/>
       <class name="org.jboss.jsr299.tck.tests.deployment.packaging.bundledLibrary.LibraryInEarTest"/>
-      <class name="org.jboss.jsr299.tck.tests.event.broken.observer.notBusinessMethod.EJBObserverMethodNotBusinessMethodTest"/>
       <class name="org.jboss.jsr299.tck.tests.event.observer.enterprise.EnterpriseEventInheritenceTest"/>
       <class name="org.jboss.jsr299.tck.tests.extensions.container.event.ContainerEventTest"/>
       <class name="org.jboss.jsr299.tck.tests.extensions.processBean.ProcessSessionBeanTest"/>
       <class name="org.jboss.jsr299.tck.tests.extensions.producer.ProducerTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.builtin.BuiltInBeansTest"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.methodOnSessionBean.DisposalMethodOnSessionBean"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.broken.singletonWithConversationScope.SingletonWithConversationScopeTest"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.broken.singletonWithRequestScope.SingletonWithRequestScopeTest"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.broken.singletonWithSessionScope.SingletonWithSessionScopeTest"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.broken.statelessWithApplicationScope.StatelessWithApplicationScopeTest"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.broken.statelessWithConversationScope.StatelessWithConversationScopeTest"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.broken.statelessWithRequestScope.StatelessWithRequestScopeTest"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.broken.statelessWithSessionScope.StatelessWithSessionScopeTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.definition.EnterpriseBeanDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.definition.EnterpriseBeanViaXmlTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle.EnterpriseBeanLifecycleTest"/>
@@ -58,25 +27,19 @@
       <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.newBean.NewEnterpriseBeanTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.remove.EnterpriseBeanRemoveMethodTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.initializer.EjbInitializerMethodTest"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.initializer.InitializerMethodTest"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise.EnterpriseProducerFieldDefinitionTest"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.producer.method.broken.enterprise.nonbusiness.ProducerMethodNotBusinessMethodTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise.EnterpriseProducerMethodDefinitionTest"/>
-      <class name="org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb.EjbInjectionTest"/>
       <class name="org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationIntegrationTest"/>
       <class name="org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationTest"/>
       <class name="org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.broken.directlyExtendsNothing.DirectlyExtendsNothingTest"/>
       <class name="org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.broken.directlyExtendsSimpleBean.DirectlyExtendsSimpleBeanTest"/>
       <class name="org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.broken.implementInterfaceAndExtendsNothing.ImplementsInterfaceAndExtendsNothingTest"/>
       <class name="org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.broken.sameName.SameNameTest"/>
-      <class name="org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.extendejb.SpecializingBeanExtendsEnterpriseBeanTest"/>
       <class name="org.jboss.jsr299.tck.tests.interceptors.definition.enterprise.interceptorOrder.SessionBeanInterceptorOrderTest"/>
       <class name="org.jboss.jsr299.tck.tests.interceptors.definition.enterprise.nonContextualReference.SessionBeanInterceptorOnNonContextualEjbReferenceTest"/>
       <class name="org.jboss.jsr299.tck.tests.interceptors.definition.enterprise.simpleInterception.SessionBeanInterceptorDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.injection.enterprise.SessionBeanInjectionOrderingTest"/>
-      <class name="org.jboss.jsr299.tck.tests.lookup.injection.enterprise.SessionBeanInjectionTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.InjectionIntoWebServiceEndPointTest"/>
-      <class name="org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.EnterpriseResolutionByTypeTest"/>
+      <class name="org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized.AssignabilityOfRawAndParameterizedTypesTest"/>
     </classes>
   </test>
 </suite>

Modified: openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/passing.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/passing.xml?rev=1130358&r1=1130357&r2=1130358&view=diff
==============================================================================
--- openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/passing.xml (original)
+++ openejb/trunk/openejb3/tck/cdi-embedded/src/test/resources/passing.xml Wed Jun  1 23:56:32 2011
@@ -5,6 +5,11 @@
 
 <suite name="CDI TCK" verbose="0">
   <test name="CDI TCK">
+    <!--<packages>-->
+        <!--<package name="org.jboss.jsr299.tck.tests.*"/>-->
+        <!--<package name="org.jboss.jsr299.tck.interceptors.tests.*"/>-->
+    <!--</packages>-->
+
     <classes>
 
       <class name="org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.AroundInvokeInterceptorTest"/>
@@ -42,6 +47,7 @@
       <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.passivatingManagedBeanWithNonPassivatingInjcetedField.PassivatingManagedBeanWithNonPassivatingInjcetedFieldTest"/>
       <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.passivatingProducerMethodWithNonPassivatingParameter.PassivatingProducerMethodWithNonPassivatingParameterTest"/>
       <class name="org.jboss.jsr299.tck.tests.context.passivating.broken.unserializableSimpleInjectedIntoPassivatingEnterpriseBean.UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest"/>
+      <class name="org.jboss.jsr299.tck.tests.decorators.custom.broken.finalBeanClass.CustomDecoratorMatchingBeanWithFinalClassTest"/>
       <class name="org.jboss.jsr299.tck.tests.decorators.definition.DecoratorDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.decorators.definition.broken.decoratorListedTwiceInBeansXml.DecoratorListedTwiceInBeansXmlTest"/>
       <class name="org.jboss.jsr299.tck.tests.decorators.definition.broken.enabledDecoratorIsNotDecorator.EnabledDecoratorNotADecoratorTest"/>
@@ -66,15 +72,18 @@
       <class name="org.jboss.jsr299.tck.tests.definition.bean.genericbroken.GenericManagedBeanTest"/>
       <class name="org.jboss.jsr299.tck.tests.definition.name.NameDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.definition.qualifier.QualifierDefinitionTest"/>
+      <class name="org.jboss.jsr299.tck.tests.definition.qualifier.enterprise.EnterpriseQualifierDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.definition.scope.ScopeDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.definition.scope.broken.tooManyScopes.TooManyScopesTest"/>
       <class name="org.jboss.jsr299.tck.tests.definition.scope.enterprise.EnterpriseScopeDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.definition.stereotype.StereotypeDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.definition.stereotype.broken.scopeConflict.IncompatibleStereotypesTest"/>
       <class name="org.jboss.jsr299.tck.tests.definition.stereotype.defaultNamed.DefaultNamedTest"/>
+      <class name="org.jboss.jsr299.tck.tests.definition.stereotype.enterprise.EnterpriseStereotypeDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.definition.stereotype.inheritance.StereotypeInheritenceTest"/>
       <class name="org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.failsDuringBeanDiscovery.DeploymentFailureTest"/>
       <class name="org.jboss.jsr299.tck.tests.deployment.lifecycle.broken.failsDuringValidation.AfterBeanDiscoveryFailureTest"/>
+      <class name="org.jboss.jsr299.tck.tests.deployment.packaging.bundledLibrary.LibraryMissingBeansXmlTest"/>
       <class name="org.jboss.jsr299.tck.tests.event.EventTest"/>
       <class name="org.jboss.jsr299.tck.tests.event.bindingTypes.EventBindingTypesTest"/>
       <class name="org.jboss.jsr299.tck.tests.event.broken.inject.withoutType.EventInjectionWithoutTypeTest"/>
@@ -88,6 +97,7 @@
       <class name="org.jboss.jsr299.tck.tests.event.eventTypes.EventTypesTest"/>
       <class name="org.jboss.jsr299.tck.tests.event.fires.FireEventTest"/>
       <class name="org.jboss.jsr299.tck.tests.event.fires.nonbinding.NonBindingTypePassedToFireTest"/>
+      <class name="org.jboss.jsr299.tck.tests.event.implicit.ImplicitEventTest"/>
       <class name="org.jboss.jsr299.tck.tests.event.observer.ObserverTest"/>
       <class name="org.jboss.jsr299.tck.tests.event.observer.abortProcessing.ObserverExceptionAbortsProcessingTest"/>
       <class name="org.jboss.jsr299.tck.tests.event.observer.checkedException.CheckedExceptionWrappedTest"/>
@@ -107,6 +117,7 @@
       <class name="org.jboss.jsr299.tck.tests.extensions.beanManager.BeanManagerTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.DisposalMethodDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.initializerUnallowed.InitializerUnallowedDefinitionTest"/>
+      <class name="org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.methodOnSessionBean.DisposalMethodOnSessionBean"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.multiParams.MultipleDisposeParametersDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.observesUnallowed.ObserverParameterUnallowedDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken.producesUnallowed.ProducesUnallowedDefinitionTest"/>
@@ -124,6 +135,7 @@
       <class name="org.jboss.jsr299.tck.tests.implementation.initializer.broken.parameterAnnotatedObserves.ParameterAnnotatedObservesTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.producer.field.definition.ProducerFieldDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.producer.field.definition.broken.parameterizedReturnTypeWithWildcard.ParameterizedReturnTypeWithWildcardTest"/>
+      <class name="org.jboss.jsr299.tck.tests.implementation.producer.field.definition.enterprise.EnterpriseProducerFieldDefinitionTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle.ProducerFieldLifecycleTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.producer.method.broken.enterprise.nonbusiness.ProducerMethodNotBusinessMethodTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.producer.method.broken.parameterAnnotatedDisposes.ParameterAnnotatedDisposesTest"/>
@@ -137,6 +149,7 @@
       <class name="org.jboss.jsr299.tck.tests.implementation.simple.definition.dependentWithPublicField.DependentWithPublicFieldTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.simple.definition.tooManyInitializerAnnotatedConstructors.TooManyInitializerAnnotatedConstructorsTest"/>
       <class name="org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.unproxyable.UnproxyableManagedBeanTest"/>
+      <class name="org.jboss.jsr299.tck.tests.implementation.simple.resource.ejb.EjbInjectionTest"/>
       <class name="org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.ProducerMethodSpecializationTest"/>
       <class name="org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.broken.indirectOverride.IndirectOverrideTest"/>
       <class name="org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.broken.specializesStaticMethod.SpecializesStaticMethodTest"/>
@@ -164,6 +177,7 @@
       <class name="org.jboss.jsr299.tck.tests.lookup.byname.ResolutionByNameTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.byname.duplicateNameResolution.DuplicateNameResolutionTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.byname.duplicatePrefixResolution.DuplicateNamePrefixResolutionTest"/>
+      <class name="org.jboss.jsr299.tck.tests.lookup.clientProxy.ClientProxyTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.array.ArrayTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalClass.FinalClassTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalMethod.FinalMethodTest"/>
@@ -172,11 +186,13 @@
       <class name="org.jboss.jsr299.tck.tests.lookup.dependency.resolution.broken.ambiguous.AmbiguousDependencyTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.dependency.resolution.broken.unsatisfied.UnsatisfiedDependencyTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.dynamic.DynamicLookupTest"/>
+      <class name="org.jboss.jsr299.tck.tests.lookup.dynamic.builtin.BuiltinInstanceTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.injection.InjectionTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.injection.any.AnyInjectionTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.CreationalContextForNonContextualTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.injection.nullableBean.NullableBeanTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.injectionpoint.InjectableReferenceTest"/>
+      <class name="org.jboss.jsr299.tck.tests.lookup.injectionpoint.InjectionPointTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.normal.scope.NormalScopedBeanWithInjectionPoint"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.reference.ambiguous.AmbiguousInjectableReferenceTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.reference.unresolved.UnsatisfiedInjectableReferenceTest"/>
@@ -186,15 +202,13 @@
       <class name="org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.broken.type.variable.TypeVariableInjectionPointTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator.DecoratorNotInjectedTest"/>
       <class name="org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.interceptor.InterceptorNotResolvedTest"/>
-      <class name="org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized.AssignabilityOfRawAndParameterizedTypesTest"/>
       <class name="org.jboss.jsr299.tck.tests.policy.PolicyAvailabilityTest"/>
       <class name="org.jboss.jsr299.tck.tests.policy.broken.incorrect.name.NoClassWithSpecifiedNameTest"/>
       <class name="org.jboss.jsr299.tck.tests.policy.broken.incorrect.name.stereotype.NoAnnotationWithSpecifiedNameTest"/>
       <class name="org.jboss.jsr299.tck.tests.policy.broken.not.policy.ClassIsNotPolicyTest"/>
       <class name="org.jboss.jsr299.tck.tests.policy.broken.not.policy.stereotype.ClassIsNotPolicyTest"/>
       <class name="org.jboss.jsr299.tck.tests.policy.broken.same.type.twice.SameTypeListedTwiceTest"/>
-      <class name="org.jboss.jsr299.tck.tests.decorators.invocation.DecoratorInvocationTest"/>
-
+      <class name="org.jboss.jsr299.tck.tests.policy.enterprise.SessionBeanPolicyTest"/>
     </classes>
   </test>
 </suite>



Mime
View raw message