All, I'm looking at adding startup messages to Tomcat to satisfy https://issues.apache.org/bugzilla/show_bug.cgi?id=56401. Something like this:
Starting Apache Tomcat/8.0.4-dev (Mar 5 2014 10:34:35), Java HotSpot(TM) 64-Bit Server VM, Java(TM) SE Runtime Environment, 1.7.0_51-b13, x86_64, Mac OS X, 10.9.2 I thought at first, I'd add it to StandardServer.startInternal, since that method is invoked (eventually) by both the Bootstrap and Tomcat classes. Unfortunately, all the LifecycleListeners get notified first that things are getting started, so there are lots of opportunities for logs to come before that. Specifically, the AprLifecycleListener and protocol handlers, which are pretty chatty on startup. No problem: put everything in initInternal, right? Nope. It looks like all the child containers get their init methods called before initInternal gets called on the StandardServer. StandardServer extends LifecycleBase which defines init() to be final, so I can't override it. Without a change to the class structure, I only see two possibilities: 1. Register the first listener for lifecycle events and pay attention 2. Write a StartupVersionDumperLifecycleListener Does anyone have any comments about any of the above? Both ideas seem to be ... stupid. Are there other options I haven't though of? -chris
signature.asc
Description: OpenPGP digital signature