tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Embedding tomcat and bug in org.apache.catalina.startup.Catalina
Date Wed, 03 Feb 2010 10:08:21 GMT
2010/2/1 Henning Blohm <henning.blohm@gmail.com>:
> Hi,
>
>  this is a question about embedding Tomcat into an application so that
> it can still be configured using server.xml and web applications can be
> added or removed programmatically.
>
>  I am using Tomcat 6.0.24.
>
>  The way I tried to make it work is by instantiating an instance of
> Catalina, feeding in all necessary config and then adding
> StandardContext instances as needed to a named host of a named service
> etc. However there is a bug (I believe) in Catalina that made me
> subclass Catalina and add a getServer() method:
>
> public class MyCatalina extends Catalina {
>        public Server getServer() {
>                return this.server;
>        }
> }
>
>  This is due to Catalina declaring its own protected member variable
> "server" and a corresponding "setServer" method, while Catalina's super
> class Embedded has a private member "server" and a "getServer" method,
> so that Catalina sets its "service" member, but when asking, will return
> super.server which is consistently null.
>

I agree that it is a bug. Please add it to bugzilla.

You can include a link to your message,
http://marc.info/?l=tomcat-user&m=126502245412565&w=2

Best regards,
Konstantin Kolinko

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


Mime
View raw message