Looking at JavaDoc, I see that .list (String name) will return a list of names in a named context and that .getNameInNamespace () will return the name InitialContext. Therefore, perhaps you can do:
ctx.list(ctx.getNameInNamespace());
DMKing
source share