private IvmContext createIvmContext() {
IvmContext context = new IvmContext(new NameNode(null, new ParsedName("comp"), null, null));
try {
context.createSubcontext("comp").createSubcontext("env");
// todo remove this... IvmContext seems to drop empty nodes
context.bind("java:comp/env/dummy", "dummy");
} catch (NamingException e) {
throw new IllegalStateException("Unable to create subcontext 'java:comp/env'. Exception:"+e.getMessage(),e);
}
return context;
}