Dolda2000 GitWeb
/
jsvc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added initial SCGI server and a handler for serving JARs from the filesystem.
[jsvc.git]
/
src
/
dolda
/
jsvc
/
j2ee
/
Servlet.java
diff --git
a/src/dolda/jsvc/j2ee/Servlet.java
b/src/dolda/jsvc/j2ee/Servlet.java
index
2b149c9
..
082113c
100644
(file)
--- a/
src/dolda/jsvc/j2ee/Servlet.java
+++ b/
src/dolda/jsvc/j2ee/Servlet.java
@@
-11,18
+11,18
@@
public class Servlet extends HttpServlet {
private ThreadContext tg;
public void init(ServletConfig cfg) throws ServletException {
private ThreadContext tg;
public void init(ServletConfig cfg) throws ServletException {
-
Properties sprop = new Properties(
);
+
J2eeContext ctx = J2eeContext.create(cfg
);
try {
InputStream pi = Servlet.class.getClassLoader().getResourceAsStream("jsvc.properties");
try {
try {
InputStream pi = Servlet.class.getClassLoader().getResourceAsStream("jsvc.properties");
try {
-
sprop.load
(pi);
+
ctx.loadconfig
(pi);
} finally {
pi.close();
}
} catch(IOException e) {
throw(new Error(e));
}
} finally {
pi.close();
}
} catch(IOException e) {
throw(new Error(e));
}
- String clnm =
(String)sprop.get("jsvc.bootstrap"
);
+ String clnm =
ctx.libconfig("jsvc.bootstrap", null
);
if(clnm == null)
throw(new ServletException("No JSvc bootstrapper specified"));
Class<?> bc;
if(clnm == null)
throw(new ServletException("No JSvc bootstrapper specified"));
Class<?> bc;
@@
-31,7
+31,12
@@
public class Servlet extends HttpServlet {
} catch(ClassNotFoundException e) {
throw(new ServletException("Invalid JSvc bootstrapper specified", e));
}
} catch(ClassNotFoundException e) {
throw(new ServletException("Invalid JSvc bootstrapper specified", e));
}
- tg = new ThreadContext(null, "JSvc service", J2eeContext.create(cfg), bc);
+ 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() {
}
public void destroy() {