You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by dj...@apache.org on 2010/07/23 02:35:32 UTC

svn commit: r966913 - in /openejb/trunk/openejb3: container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ container/openejb-core/src/main/java/org/apache/openejb/core/ container/openejb-core/src/test/java/org/apache/openejb/core/cmp/...

Author: djencks
Date: Fri Jul 23 00:35:32 2010
New Revision: 966913

URL: http://svn.apache.org/viewvc?rev=966913&view=rev
Log:
OPENEJB-1140 glue together the various java: contexts for ejbs

Modified:
    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/assembler/classic/EjbJarBuilder.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EnterpriseBeanBuilder.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/AppContext.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ModuleContext.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/AuthorBean.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/BookBean.java
    openejb/trunk/openejb3/container/openejb-junit/src/main/java/org/apache/openejb/junit/LocalClientRunner.java
    openejb/trunk/openejb3/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DeploymentIndexTest.java

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=966913&r1=966912&r2=966913&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 Fri Jul 23 00:35:32 2010
@@ -23,9 +23,7 @@ import java.lang.instrument.Instrumentat
 import java.lang.reflect.Method;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.net.URLClassLoader;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
@@ -475,6 +473,13 @@ public class Assembler extends Assembler
             throw new DuplicateDeploymentIdException(message);
         }
 
+        //Construct the global and app jndi contexts for this app
+        InjectionBuilder injectionBuilder = new InjectionBuilder(classLoader);
+        List<Injection> appInjections = injectionBuilder.buildInjections(appInfo.globalJndiEnc);
+        appInjections.addAll(injectionBuilder.buildInjections(appInfo.appJndiEnc));
+        Context globalJndiContext = new JndiEncBuilder(appInfo.globalJndiEnc, appInjections, null, classLoader).build(false);
+        Context appJndiContext = new JndiEncBuilder(appInfo.appJndiEnc, appInjections, null, classLoader).build(false);
+
         try {
             // Generate the cmp2/cmp1 concrete subclasses
             CmpJarBuilder cmpJarBuilder = new CmpJarBuilder(appInfo, classLoader);
@@ -483,7 +488,7 @@ public class Assembler extends Assembler
                 classLoader = ClassLoaderUtil.createClassLoader(appInfo.jarPath, new URL []{generatedJar.toURI().toURL()}, classLoader);
             }
 
-            AppContext appContext = new AppContext(appInfo.jarPath, SystemInstance.get(), classLoader);
+            AppContext appContext = new AppContext(appInfo.jarPath, SystemInstance.get(), classLoader, globalJndiContext, appJndiContext);
             
             // JPA - Persistence Units MUST be processed first since they will add ClassFileTransformers
             // to the class loader which must be added before any classes are loaded
@@ -527,7 +532,7 @@ public class Assembler extends Assembler
             // EJB
             EjbJarBuilder ejbJarBuilder = new EjbJarBuilder(props, appContext);
             for (EjbJarInfo ejbJar : appInfo.ejbJars) {
-                HashMap<String, DeploymentInfo> deployments = ejbJarBuilder.build(ejbJar);
+                HashMap<String, DeploymentInfo> deployments = ejbJarBuilder.build(ejbJar, appInjections);
 
                 JaccPermissionsBuilder jaccPermissionsBuilder = new JaccPermissionsBuilder();
                 PolicyContext policyContext = jaccPermissionsBuilder.build(ejbJar, deployments);
@@ -553,6 +558,7 @@ public class Assembler extends Assembler
                     containerSystem.addDeployment(deploymentInfo);
                 }
 
+                //bind ejbs into global jndi
                 jndiBuilder.build(ejbJar, deployments);
 
                 // setup timers - must be after transaction attibutes are set
@@ -608,7 +614,6 @@ public class Assembler extends Assembler
             // App Client
             for (ClientInfo clientInfo : appInfo.clients) {
                 // determine the injections
-                InjectionBuilder injectionBuilder = new InjectionBuilder(classLoader);
                 List<Injection> injections = injectionBuilder.buildInjections(clientInfo.jndiEnc);
 
                 // build the enc
@@ -621,7 +626,7 @@ public class Assembler extends Assembler
 
                 }
                 jndiEncBuilder.setUseCrossClassLoaderRef(false);
-                Context context = (Context) jndiEncBuilder.build();
+                Context context = (Context) jndiEncBuilder.build(true);
 
                 containerSystem.getJNDIContext().bind("openejb/client/" + clientInfo.moduleId, context);
                 if (clientInfo.codebase != null) {

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EjbJarBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EjbJarBuilder.java?rev=966913&r1=966912&r2=966913&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EjbJarBuilder.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EjbJarBuilder.java Fri Jul 23 00:35:32 2010
@@ -19,14 +19,17 @@ package org.apache.openejb.assembler.cla
 
 import org.apache.openejb.Container;
 import org.apache.openejb.DeploymentInfo;
+import org.apache.openejb.Injection;
 import org.apache.openejb.OpenEJBException;
 import org.apache.openejb.core.CoreDeploymentInfo;
 import org.apache.openejb.core.ModuleContext;
 import org.apache.openejb.core.AppContext;
 import org.apache.openejb.util.Messages;
 
+import javax.naming.Context;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Properties;
 
 /**
@@ -43,14 +46,20 @@ public class EjbJarBuilder {
         this.context = context;
     }
 
-    public HashMap<String, DeploymentInfo> build(EjbJarInfo ejbJar) throws OpenEJBException {
+    public HashMap<String, DeploymentInfo> build(EjbJarInfo ejbJar, List<Injection> appInjections) throws OpenEJBException {
+        InjectionBuilder injectionBuilder = new InjectionBuilder(context.getClassLoader());
+        List<Injection> moduleInjections = injectionBuilder.buildInjections(ejbJar.moduleJndiEnc);
+        moduleInjections.addAll(appInjections);
+        Context moduleJndiContext = new JndiEncBuilder(ejbJar.moduleJndiEnc, moduleInjections, ejbJar.moduleId, context.getClassLoader()).build(false);
+
         HashMap<String, DeploymentInfo> deployments = new HashMap<String, DeploymentInfo>();
 
+        ModuleContext moduleContext = new ModuleContext(ejbJar.moduleId, context, moduleJndiContext);
         InterceptorBindingBuilder interceptorBindingBuilder = new InterceptorBindingBuilder(context.getClassLoader(), ejbJar);
 
         for (EnterpriseBeanInfo ejbInfo : ejbJar.enterpriseBeans) {
             try {
-                EnterpriseBeanBuilder deploymentBuilder = new EnterpriseBeanBuilder(ejbInfo, new ArrayList<String>(), new ModuleContext(ejbJar.moduleId, context));
+                EnterpriseBeanBuilder deploymentBuilder = new EnterpriseBeanBuilder(ejbInfo, new ArrayList<String>(), moduleContext, moduleInjections);
                 CoreDeploymentInfo deployment = (CoreDeploymentInfo) deploymentBuilder.build();
 
                 interceptorBindingBuilder.build(deployment, ejbInfo);

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EnterpriseBeanBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EnterpriseBeanBuilder.java?rev=966913&r1=966912&r2=966913&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EnterpriseBeanBuilder.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EnterpriseBeanBuilder.java Fri Jul 23 00:35:32 2010
@@ -39,9 +39,11 @@ import javax.ejb.Timer;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Arrays;
+import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
 class EnterpriseBeanBuilder {
@@ -49,13 +51,15 @@ class EnterpriseBeanBuilder {
     private final EnterpriseBeanInfo bean;
     private final List<String> defaultInterceptors;
     private final BeanType ejbType;
-    private List<Exception> warnings = new ArrayList<Exception>();
-    private ModuleContext moduleContext;
+    private final List<Exception> warnings = new ArrayList<Exception>();
+    private final ModuleContext moduleContext;
+    private final List<Injection> moduleInjections;
 
-    public EnterpriseBeanBuilder(EnterpriseBeanInfo bean, List<String> defaultInterceptors, ModuleContext moduleContext) {
+    public EnterpriseBeanBuilder(EnterpriseBeanInfo bean, List<String> defaultInterceptors, ModuleContext moduleContext, List<Injection> moduleInjections) {
         this.moduleContext = moduleContext;
         this.bean = bean;
         this.defaultInterceptors = defaultInterceptors;
+        this.moduleInjections = moduleInjections;
 
         if (bean.type == EnterpriseBeanInfo.STATEFUL) {
             ejbType = BeanType.STATEFUL;
@@ -117,21 +121,36 @@ class EnterpriseBeanBuilder {
 
         final String transactionType = bean.transactionType;
 
-        // determind the injections
+        // determine the injections
         InjectionBuilder injectionBuilder = new InjectionBuilder(moduleContext.getClassLoader());
         List<Injection> injections = injectionBuilder.buildInjections(bean.jndiEnc);
+        Set<Class<?>> relevantClasses = new HashSet<Class<?>>();
+        Class c = ejbClass;
+        do {
+            relevantClasses.add(c);
+            c = c.getSuperclass();
+        } while (c != null && c != Object.class);
+
+        for (Injection injection: moduleInjections) {
+            if (relevantClasses.contains(injection.getTarget())) {
+                injections.add(injection);
+            }
+        }
 
         // build the enc
         JndiEncBuilder jndiEncBuilder = new JndiEncBuilder(bean.jndiEnc, injections, transactionType, moduleContext.getId(), moduleContext.getClassLoader());
-        Context root = jndiEncBuilder.build();
+        Context compJndiContext = jndiEncBuilder.build(true);
+        bind(compJndiContext, "module", moduleContext.getModuleJndiContext());
+        bind(compJndiContext, "app", moduleContext.getAppContext().getAppJndiContext());
+        bind(compJndiContext, "global", moduleContext.getAppContext().getGlobalJndiContext());
 
         CoreDeploymentInfo deployment;
         if (BeanType.MESSAGE_DRIVEN != ejbType) {
-            deployment = new CoreDeploymentInfo(bean.ejbDeploymentId, root, moduleContext, ejbClass, home, remote, localhome, local, serviceEndpoint, businessLocals, businessRemotes, primaryKey, ejbType);
+            deployment = new CoreDeploymentInfo(bean.ejbDeploymentId, compJndiContext, moduleContext, ejbClass, home, remote, localhome, local, serviceEndpoint, businessLocals, businessRemotes, primaryKey, ejbType);
         } else {
             MessageDrivenBeanInfo messageDrivenBeanInfo = (MessageDrivenBeanInfo) bean;
             Class mdbInterface = loadClass(messageDrivenBeanInfo.mdbInterface, "classNotFound.mdbInterface");
-            deployment = new CoreDeploymentInfo(bean.ejbDeploymentId, root, moduleContext, ejbClass, mdbInterface, messageDrivenBeanInfo.activationProperties);
+            deployment = new CoreDeploymentInfo(bean.ejbDeploymentId, compJndiContext, moduleContext, ejbClass, mdbInterface, messageDrivenBeanInfo.activationProperties);
             deployment.setDestinationId(messageDrivenBeanInfo.destinationId);
         }
 
@@ -261,6 +280,21 @@ class EnterpriseBeanBuilder {
         return deployment;
     }
 
+    private void bind(Context compJndiContext, String s, Context moduleJndiContext) throws OpenEJBException {
+        Context c;
+        try {
+            c = (Context) moduleJndiContext.lookup(s);
+        } catch (NamingException e) {
+            //ok, nothing there....
+            return;
+        }
+        try {
+            compJndiContext.bind(s, c);
+        } catch (NamingException e) {
+            throw new OpenEJBException("Could not bind context at " + s, e);
+        }
+    }
+
     public static boolean paramsMatch(Method methodA, Method methodB) {
         if (methodA.getParameterTypes().length != methodB.getParameterTypes().length){
             return false;

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java?rev=966913&r1=966912&r2=966913&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java Fri Jul 23 00:35:32 2010
@@ -94,7 +94,7 @@ public class JndiEncBuilder {
         beanManagedTransactions = transactionType != null && transactionType.equalsIgnoreCase("Bean");
 
         try {
-            moduleUri = new URI(moduleId);
+            moduleUri = moduleId == null? null: new URI(moduleId);
         } catch (URISyntaxException e) {
             throw new OpenEJBException(e);
         }
@@ -117,42 +117,27 @@ public class JndiEncBuilder {
         this.client = client;
     }
 
-    public Context build() throws OpenEJBException {
+    public Context build(boolean isComp) throws OpenEJBException {
         JndiFactory jndiFactory = SystemInstance.get().getComponent(JndiFactory.class);
 
         if (SystemInstance.get().hasProperty("openejb.geronimo")){
             return jndiFactory.createComponentContext(new HashMap());
         }
 
-        return jndiFactory.createComponentContext(buildMap());
+        Map<String, Object> bindings = buildMap();
+        if (isComp) {
+            addSpecialCompBindings(bindings);
+        }
+
+        return jndiFactory.createComponentContext(bindings);
     }
 
     public Map<String, Object> buildMap() throws OpenEJBException {
         Map<String, Object> bindings = new HashMap<String, Object>();
 
-        // bind TransactionManager
-        TransactionManager transactionManager = SystemInstance.get().getComponent(TransactionManager.class);
-        bindings.put("comp/TransactionManager", transactionManager);
-
-        // bind TransactionSynchronizationRegistry
-        bindings.put("comp/TransactionSynchronizationRegistry", new TransactionSynchronizationRegistryWrapper());
-
-        bindings.put("comp/ORB", new SystemComponentReference(ORB.class));
-        bindings.put("comp/HandleDelegate", new SystemComponentReference(HandleDelegate.class));
-
         // get JtaEntityManagerRegistry
         JtaEntityManagerRegistry jtaEntityManagerRegistry = SystemInstance.get().getComponent(JtaEntityManagerRegistry.class);
 
-        // bind UserTransaction if bean managed transactions
-        UserTransaction userTransaction = null;
-        if (beanManagedTransactions) {
-            userTransaction = new CoreUserTransaction(transactionManager);
-            bindings.put("comp/UserTransaction", userTransaction);
-        }
-
-        // bind TimerService
-        bindings.put("comp/TimerService", new TimerServiceWrapper());
-
         for (EjbReferenceInfo referenceInfo : jndiEnc.ejbReferences) {
 
             Reference reference = null;
@@ -278,7 +263,7 @@ public class JndiEncBuilder {
 
             Object reference = null;
             if (UserTransaction.class.getName().equals(referenceInfo.resourceEnvRefType)) {
-                reference = userTransaction;
+                reference = new IntraVmJndiReference("comp/UserTransaction");
             } else if (referenceInfo.location != null){
                 reference = buildReferenceLocation(referenceInfo.location);
             } else if (referenceInfo.resourceID != null) {
@@ -412,6 +397,30 @@ public class JndiEncBuilder {
         return bindings;
     }
 
+    private void addSpecialCompBindings(Map<String, Object> bindings) {
+        // bind TransactionManager
+        TransactionManager transactionManager = SystemInstance.get().getComponent(TransactionManager.class);
+        bindings.put("comp/TransactionManager", transactionManager);
+
+        // bind TransactionSynchronizationRegistry
+        bindings.put("comp/TransactionSynchronizationRegistry", new TransactionSynchronizationRegistryWrapper());
+
+        bindings.put("comp/ORB", new SystemComponentReference(ORB.class));
+        bindings.put("comp/HandleDelegate", new SystemComponentReference(HandleDelegate.class));
+
+        // bind UserTransaction if bean managed transactions
+        UserTransaction userTransaction = null;
+        if (beanManagedTransactions) {
+            userTransaction = new CoreUserTransaction(transactionManager);
+            bindings.put("comp/UserTransaction", userTransaction);
+        }
+
+        // bind TimerService
+        if (!isClient()) {
+            bindings.put("comp/TimerService", new TimerServiceWrapper());
+        }
+    }
+
     public static boolean bindingExists(Context context, Name contextName) {
         try {
             return context.lookup(contextName) != null;

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/AppContext.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/AppContext.java?rev=966913&r1=966912&r2=966913&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/AppContext.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/AppContext.java Fri Jul 23 00:35:32 2010
@@ -19,17 +19,23 @@ package org.apache.openejb.core;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.loader.Options;
 
+import javax.naming.Context;
+
 /**
  * @version $Rev$ $Date$
 */
 public class AppContext extends DeploymentContext {
     private final SystemInstance systemInstance;
     private final ClassLoader classLoader;
+    private final Context globalJndiContext;
+    private final Context appJndiContext;
 
-    public AppContext(String id, SystemInstance systemInstance, ClassLoader classLoader) {
+    public AppContext(String id, SystemInstance systemInstance, ClassLoader classLoader, Context globalJndiContext, Context appJndiContext) {
         super(id, systemInstance.getOptions());
         this.classLoader = classLoader;
         this.systemInstance = systemInstance;
+        this.globalJndiContext = globalJndiContext;
+        this.appJndiContext = appJndiContext;
     }
 
     public ClassLoader getClassLoader() {
@@ -39,4 +45,12 @@ public class AppContext extends Deployme
     public SystemInstance getSystemInstance() {
         return systemInstance;
     }
+
+    public Context getAppJndiContext() {
+        return appJndiContext;
+    }
+
+    public Context getGlobalJndiContext() {
+        return globalJndiContext;
+    }
 }

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ModuleContext.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ModuleContext.java?rev=966913&r1=966912&r2=966913&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ModuleContext.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ModuleContext.java Fri Jul 23 00:35:32 2010
@@ -16,15 +16,19 @@
  */
 package org.apache.openejb.core;
 
+import javax.naming.Context;
+
 /**
  * @version $Rev$ $Date$
 */
 public class ModuleContext extends DeploymentContext {
     private final AppContext appContext;
+    private final Context moduleJndiContext;
 
-    public ModuleContext(String id, AppContext appContext) {
+    public ModuleContext(String id, AppContext appContext, Context moduleJndiContext) {
         super(id, appContext.getOptions());
         this.appContext = appContext;
+        this.moduleJndiContext = moduleJndiContext;
     }
 
     public AppContext getAppContext() {
@@ -34,4 +38,8 @@ public class ModuleContext extends Deplo
     public ClassLoader getClassLoader() {
         return appContext.getClassLoader();
     }
+
+    public Context getModuleJndiContext() {
+        return moduleJndiContext;
+    }
 }

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/AuthorBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/AuthorBean.java?rev=966913&r1=966912&r2=966913&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/AuthorBean.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/AuthorBean.java Fri Jul 23 00:35:32 2010
@@ -24,6 +24,7 @@ import org.apache.openejb.core.AppContex
 import org.apache.openejb.core.ModuleContext;
 import org.apache.openejb.BeanType;
 import org.apache.openejb.SystemException;
+import org.apache.openejb.core.ivm.naming.IvmContext;
 import org.apache.openejb.loader.SystemInstance;
 
 import javax.ejb.EntityBean;
@@ -35,7 +36,7 @@ public class AuthorBean implements Entit
     public static Object deploymentInfo;
     static {
         try {
-            deploymentInfo = new CoreDeploymentInfo("author", null, new ModuleContext("", new AppContext("", SystemInstance.get(), Author.class.getClassLoader())),
+            deploymentInfo = new CoreDeploymentInfo("author", null, new ModuleContext("", new AppContext("", SystemInstance.get(), Author.class.getClassLoader(), new IvmContext(), new IvmContext()), new IvmContext()),
                     AuthorBean.class,
                     null,
                     null,

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/BookBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/BookBean.java?rev=966913&r1=966912&r2=966913&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/BookBean.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/BookBean.java Fri Jul 23 00:35:32 2010
@@ -24,6 +24,7 @@ import org.apache.openejb.core.AppContex
 import org.apache.openejb.core.ModuleContext;
 import org.apache.openejb.BeanType;
 import org.apache.openejb.SystemException;
+import org.apache.openejb.core.ivm.naming.IvmContext;
 import org.apache.openejb.loader.SystemInstance;
 
 import javax.ejb.EntityBean;
@@ -35,7 +36,7 @@ public class BookBean implements EntityB
     public static Object deploymentInfo;
     static {
         try {
-            deploymentInfo = new CoreDeploymentInfo("book", null, new ModuleContext("", new AppContext("", SystemInstance.get(), Book.class.getClassLoader())),
+            deploymentInfo = new CoreDeploymentInfo("book", null, new ModuleContext("", new AppContext("", SystemInstance.get(), Book.class.getClassLoader(), new IvmContext(), new IvmContext()), new IvmContext()),
                     BookBean.class,
                     null,
                     null,

Modified: openejb/trunk/openejb3/container/openejb-junit/src/main/java/org/apache/openejb/junit/LocalClientRunner.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-junit/src/main/java/org/apache/openejb/junit/LocalClientRunner.java?rev=966913&r1=966912&r2=966913&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-junit/src/main/java/org/apache/openejb/junit/LocalClientRunner.java (original)
+++ openejb/trunk/openejb3/container/openejb-junit/src/main/java/org/apache/openejb/junit/LocalClientRunner.java Fri Jul 23 00:35:32 2010
@@ -107,7 +107,7 @@ public class LocalClientRunner extends B
 
     private CoreDeploymentInfo createDeployment(Class<?> testClass) {
         try {
-            return new CoreDeploymentInfo(null, new IvmContext(), new ModuleContext("", new AppContext("", SystemInstance.get(), testClass.getClassLoader())), testClass, null, null, null, null, null, null, null, null, BeanType.MANAGED);
+            return new CoreDeploymentInfo(null, new IvmContext(), new ModuleContext("", new AppContext("", SystemInstance.get(), testClass.getClassLoader(), new IvmContext(), new IvmContext()), new IvmContext()), testClass, null, null, null, null, null, null, null, null, BeanType.MANAGED);
         } catch (SystemException e) {
             throw new IllegalStateException(e);
         }

Modified: openejb/trunk/openejb3/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DeploymentIndexTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DeploymentIndexTest.java?rev=966913&r1=966912&r2=966913&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DeploymentIndexTest.java (original)
+++ openejb/trunk/openejb3/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DeploymentIndexTest.java Fri Jul 23 00:35:32 2010
@@ -40,7 +40,7 @@ public class DeploymentIndexTest {
     @Before
     public void setUp() throws SystemException {
         method = Method.class.getMethods()[0];
-        deploymentInfo = new CoreDeploymentInfo("aDeploymentId", null, new ModuleContext("", new AppContext("", SystemInstance.get(), null)), DeploymentIndexTest.class, null, null, null, null, null, null, null, null, null);
+        deploymentInfo = new CoreDeploymentInfo("aDeploymentId", null, new ModuleContext("", new AppContext("", SystemInstance.get(), null, null, null), null), DeploymentIndexTest.class, null, null, null, null, null, null, null, null, null);
         deploymentIndex = new DeploymentIndex(new DeploymentInfo[] { deploymentInfo, deploymentInfo });
     }