dain 2005/01/26 18:27:59
Modified: modules/core/src/java/org/openejb/client
AppClientJNDIContext.java
Log:
ENC is now passed around as a Map instead of a jndi Context. This allows the
ejb container to modify it and inject the kernel and class loader into
references.
Changed Stateless and MDB containers to use system chain for ejbCreate and
ejbRemove invocations.
Added test to verify that ejbRemove is propertly called from the cache code.
Revision Changes Path
1.8 +3 -6
openejb/modules/core/src/java/org/openejb/client/AppClientJNDIContext.java
Index: AppClientJNDIContext.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/client/AppClientJNDIContext.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AppClientJNDIContext.java 21 Jan 2005 06:30:35 -0000 1.7
+++ AppClientJNDIContext.java 26 Jan 2005 23:27:59 -0000 1.8
@@ -50,7 +50,6 @@
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.naming.java.ReadOnlyContext;
import org.apache.geronimo.naming.java.RootContext;
import org.apache.geronimo.kernel.Kernel;
import org.openejb.client.naming.java.javaURLContextFactory;
@@ -71,8 +70,6 @@
}
public void startClient(ObjectName appClientModuleName, Kernel kernel,
ClassLoader classLoader) throws Exception {
-
- Context context;
try {
ServerMetaData serverMetaData = new ServerMetaData(host, port);
JNDIResponse res = new JNDIResponse(serverMetaData);
@@ -92,7 +89,7 @@
throw new IllegalStateException("Server returned a null JNDI
context");
}
- RootContext.setComponentContext((ReadOnlyContext) context);
+ RootContext.setComponentContext(context);
System.setProperty(Context.URL_PKG_PREFIXES,
"org.openejb.client.naming");
System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
javaURLContextFactory.class.getName());