+ private ThreadContext tg;
+
+ public void init() throws ServletException {
+ Properties sprop = new Properties();
+ try {
+ InputStream pi = Servlet.class.getClassLoader().getResourceAsStream("jsvc.properties");
+ try {
+ sprop.load(pi);
+ } finally {
+ pi.close();
+ }
+ } catch(IOException e) {
+ throw(new Error(e));
+ }
+ String clnm = (String)sprop.get("jsvc.bootstrap");
+ if(clnm == null)
+ throw(new ServletException("No JSvc bootstrapper specified"));
+ Class<?> bc;
+ try {
+ bc = Class.forName(clnm);
+ } catch(ClassNotFoundException e) {
+ throw(new ServletException("Invalid JSvc bootstrapper specified", e));
+ }
+ tg = new ThreadContext(null, "JSvc service", bc);
+ ServletContext ctx = getServletContext();
+ ctx.setAttribute("jsvc.starttime", System.currentTimeMillis());
+ }