boot.interrupt();
Thread.currentThread().interrupt();
}
- if(err[0] != null)
+ if(err[0] != null) {
+ destroy();
throw(new RuntimeException(err[0]));
+ }
if(res[0] == null) {
+ destroy();
logger.log(Level.SEVERE, "No responder returned in spite of no error having happened.");
throw(new NullPointerException("No responder returned in spite of no error having happened."));
}
} catch(ClassNotFoundException e) {
throw(new ServletException("Invalid JSvc bootstrapper specified", e));
}
- tg = new ThreadContext(null, "JSvc service", J2eeContext.create(cfg), bc);
+ ServerContext ctx = J2eeContext.create(cfg);
+ String tgn;
+ if(ctx.name() != null)
+ tgn = "JSvc service for " + ctx.name();
+ else
+ tgn = "JSvc service";
+ tg = new ThreadContext(null, tgn, ctx, bc);
}
public void destroy() {
this.base = new java.io.File(base, nm.substring(p));
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
- if(!FileStore.this.base.mkdirs())
- throw(new RuntimeException("Could not create store directory (Java won't tell me why)"));
+ if(!FileStore.this.base.exists()) {
+ if(!FileStore.this.base.mkdirs())
+ throw(new RuntimeException("Could not create store directory (Java won't tell me why)"));
+ }
return(null);
}
});