Context ctx = null;
// Construct a non-shared memory context
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "tyrex.naming.MemoryContextFactory");
rootJNDIContext = new MemoryContext(null);
rootJNDIContext.createSubcontext("jdbc");
ctx = rootJNDIContext.createSubcontext("comp");
ctx = ctx.createSubcontext("env");
ctx = ctx.createSubcontext("jdbc");