X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fdolda%2Fjsvc%2Fj2ee%2FJ2eeContext.java;h=f687afd3f158b6be29c2e5f284dacd087759a8c7;hb=HEAD;hp=bf1917c9c1ad8462f84d694648a7644873c89a49;hpb=762009abaf3acc38003c9635115c721c602bdaa5;p=jsvc.git diff --git a/src/dolda/jsvc/j2ee/J2eeContext.java b/src/dolda/jsvc/j2ee/J2eeContext.java index bf1917c..f687afd 100644 --- a/src/dolda/jsvc/j2ee/J2eeContext.java +++ b/src/dolda/jsvc/j2ee/J2eeContext.java @@ -9,12 +9,13 @@ import java.io.*; public abstract class J2eeContext implements ServerContext { private final ServletConfig sc; private final long ctime; - protected final Properties config; + protected final Properties sysconfig, libconfig; protected J2eeContext(ServletConfig sc) { this.sc = sc; this.ctime = System.currentTimeMillis(); - config = new Properties(); + sysconfig = new Properties(); + libconfig = new Properties(); } static J2eeContext create(ServletConfig sc) { @@ -27,11 +28,23 @@ public abstract class J2eeContext implements ServerContext { return(ctime); } - public String config(String key) { - return((String)config.get(key)); + public String sysconfig(String key, String def) { + return(sysconfig.getProperty(key, def)); + } + + public String libconfig(String key, String def) { + return(libconfig.getProperty(key, def)); + } + + void loadconfig(InputStream in) throws IOException { + libconfig.load(in); } public ServletConfig j2eeconfig() { return(sc); } + + public RequestThread worker(Responder root, Request req, ThreadGroup tg, String name) { + return(new RequestThread(root, req, tg, name)); + } }