tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Singleton in Tomcat 6.0 not working
Date Thu, 05 Jun 2008 17:11:24 GMT
> From: ktou Ho [mailto:hktou@hotmail.com]
> Subject: RE: Singleton in Tomcat 6.0 not working
>
> Have you tried to put in it the "ROOT"?

Yes, I've tried putting it in ROOT, and I get only a single instance, using Tomcat 6.0.16
under JDK 1.6.0_06.

For more information, add these lines to your constructor, immediately after printing out
the counter:

  StackTraceElement[] traces = Thread.currentThread().getStackTrace();
  for (StackTraceElement ste : traces) System.out.println("  " + ste);

This is what mine displays:
counter = 0
  java.lang.Thread.getStackTrace(Thread.java:1426)
  RemoteDBConnections.<init>(RemoteDBConnections.java:9)
  RemoteDBConnections.<clinit>(RemoteDBConnections.java:3)
  Hello.doGet(Hello.java:84)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
  org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394)
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  java.lang.Thread.run(Thread.java:619)

I'm not using any filters.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message