InitialContext context = new InitialContext(properties);
if (fillNames) {
context.bind("first", new String("first"));
context.bind("second", new String("first"));
context.bind("third", new String("first"));
context.createSubcontext("dir1");
context.createSubcontext("dir2");
context.createSubcontext("dir3");
context.bind("dir1/first", new String("first"));
context.bind("dir1/second", new String("first"));
context.bind("dir1/third", new String("first"));