User: starksm Date: 02/04/09 00:59:00 Modified: src/main/org/jboss/test/web/servlets Tag: Branch_2_4 DebugServlet.java EJBOnStartupServlet.java Log: Print the classloader hash code in hex Revision Changes Path No revision No revision 1.3.2.3 +2 -2 jbosstest/src/main/org/jboss/test/web/servlets/DebugServlet.java Index: DebugServlet.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/web/servlets/DebugServlet.java,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -u -r1.3.2.2 -r1.3.2.3 --- DebugServlet.java 28 Sep 2001 19:15:20 -0000 1.3.2.2 +++ DebugServlet.java 9 Apr 2002 07:59:00 -0000 1.3.2.3 @@ -17,7 +17,7 @@ /** A servlet that dumps out debugging information about its environment. * @author [EMAIL PROTECTED] - * @version $Revision: 1.3.2.2 $ + * @version $Revision: 1.3.2.3 $ */ public class DebugServlet extends HttpServlet { @@ -27,7 +27,7 @@ response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<html>"); - out.println("<head><title>ENCServlet</title></head>"); + out.println("<head><title>DebugServlet</title></head>"); out.println("<h1>Debug Accessed</h1>"); out.println("<body>"); out.println("<h2>Call Stack</h2>"); 1.3.2.3 +13 -10 jbosstest/src/main/org/jboss/test/web/servlets/EJBOnStartupServlet.java Index: EJBOnStartupServlet.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/web/servlets/EJBOnStartupServlet.java,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -u -r1.3.2.2 -r1.3.2.3 --- EJBOnStartupServlet.java 20 Oct 2001 00:57:34 -0000 1.3.2.2 +++ EJBOnStartupServlet.java 9 Apr 2002 07:59:00 -0000 1.3.2.3 @@ -22,7 +22,7 @@ to test web component startup ordering with respect to ebj components. @author [EMAIL PROTECTED] -@version $Revision: 1.3.2.2 $ +@version $Revision: 1.3.2.3 $ */ public class EJBOnStartupServlet extends HttpServlet { @@ -34,6 +34,17 @@ boolean failOnError = true; if( param != null && Boolean.valueOf(param).booleanValue() == false ) failOnError = false; + String loaderTrace = null; + ClassLoader loader = Thread.currentThread().getContextClassLoader(); + try + { + loaderTrace = Util.displayClassLoaders(loader); + } + catch(NamingException ne) + { + ne.printStackTrace(); + } + try { // Access the Util.configureLog4j() method to test classpath resource @@ -47,15 +58,7 @@ catch(Exception e) { e.printStackTrace(); - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - try - { - System.out.println(Util.displayClassLoaders(loader)); - } - catch(NamingException ne) - { - ne.printStackTrace(); - } + System.out.println(loaderTrace); if( failOnError == true ) throw new ServletException("Failed to init EJBOnStartupServlet", e); }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development