log.debug("CtxName: "+ctxName);
try {
ctx = (Context) cx.lookup(ctxName);
if (ctx==null){//to workaround resin bug!
log.debug("Lookup retured null, will create new subcontext");
ctx = cx.createSubcontext(ctxName);
}
} catch (NameNotFoundException e) {
log.warn("Could not lookup for ctx ",e);
ctx = cx.createSubcontext(ctxName);
log.debug("ctx after create subcontext: "+ctx);