You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by johnrock <jo...@yahoo.com> on 2009/05/30 00:08:23 UTC
Which listeners required in server.xml?
Running tomcat 6.0.18 server.xml has the following listener's enabled by
default:
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- JMX Support for the Tomcat server. Documentation at
/docs/non-existent.html -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
I am using standalone tomcat (no apache) without SSL, without APR, I am not
using any manager or host-manager applications ..
Do I need these listeners or can I remove some/all of them?
--
View this message in context: http://www.nabble.com/Which-listeners-required-in-server.xml--tp23787784p23787784.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Which listeners required in server.xml?
Posted by Martin Gainty <mg...@hotmail.com>.
Spring and/or DI frameworks do not use either JNDI or MXbean unless specifically configured to do so
free to disable those listeners as they are serve no useful purpose
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Fri, 29 May 2009 15:50:00 -0700
> From: johnpiser@yahoo.com
> To: users@tomcat.apache.org
> Subject: RE: Which listeners required in server.xml?
>
>
>
> mgainty wrote:
> >
> >> Do I need these listeners or can I remove some/all of them?
> > DONT_NEED>If No Apr then remove AprLifecycleListener
> > DONT_NEED>If No Jsp then remove JasperListener
> > DONT_NEED>If No MBean then remove ServerLifecycleListener
> > DONT_NEED>If No JNDI then remove GlobalResourcesLifecycleListener
> >
> Thank you very much. I am not explicitly using JNDI or MBean in my app, but
> I am not sure if Tomcat relies on this functionality either internally or
> with Spring?
>
>
>
> --
> View this message in context: http://www.nabble.com/Which-listeners-required-in-server.xml--tp23787784p23788146.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage1_052009
RE: Which listeners required in server.xml?
Posted by johnrock <jo...@yahoo.com>.
mgainty wrote:
>
>> Do I need these listeners or can I remove some/all of them?
> DONT_NEED>If No Apr then remove AprLifecycleListener
> DONT_NEED>If No Jsp then remove JasperListener
> DONT_NEED>If No MBean then remove ServerLifecycleListener
> DONT_NEED>If No JNDI then remove GlobalResourcesLifecycleListener
>
Thank you very much. I am not explicitly using JNDI or MBean in my app, but
I am not sure if Tomcat relies on this functionality either internally or
with Spring?
--
View this message in context: http://www.nabble.com/Which-listeners-required-in-server.xml--tp23787784p23788146.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Which listeners required in server.xml?
Posted by Martin Gainty <mg...@hotmail.com>.
DONT_NEED>dont need with Comment
> Running tomcat 6.0.18 server.xml has the following listener's enabled by
> default:
>
>
> <!--APR library loader. Documentation at /docs/apr.html -->
> <Listener className="org.apache.catalina.core.AprLifecycleListener"
> SSLEngine="on" />
DONT_NEED>NO Implementation of LifecycleListener that will init and
and destroy APR? then comment this out
>
> <!--Initialize Jasper prior to webapps are loaded. Documentation at
> /docs/jasper-howto.html -->
> <Listener className="org.apache.catalina.core.JasperListener" />
DONT_NEED>NO implementation of listener is designed to initialize Jasper before web applications are
started then DONT_NEED>comment out
>
> <!-- JMX Support for the Tomcat server. Documentation at
> /docs/non-existent.html -->
> <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
> />
DONT_NEED>No implementation of LifecycleListener that
instantiates the set of MBeans associated with the DONT_NEED>components of a
running instance of Catalina.
(MX Agents) then comment this out
> <Listener
> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
DONT_NEED>No Implementation of LifecycleListener that instantiates the
set of MBeans associated with global DONT_NEED>JNDI resources that are subject to
management.
then comment this out!
>
> I am using standalone tomcat (no apache) without SSL, without APR, I am not
> using any manager or host-manager applications ..
>
> Do I need these listeners or can I remove some/all of them?
DONT_NEED>If No Apr then remove AprLifecycleListener
DONT_NEED>If No Jsp then remove JasperListener
DONT_NEED>If No MBean then remove ServerLifecycleListener
DONT_NEED>If No JNDI then remove GlobalResourcesLifecycleListener
> --
> View this message in context: http://www.nabble.com/Which-listeners-required-in-server.xml--tp23787784p23787784.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage1_052009
Re: Which listeners required in server.xml?
Posted by Mark Thomas <ma...@apache.org>.
Bill Barker wrote:
>> <!-- JMX Support for the Tomcat server. Documentation at
>> /docs/non-existent.html -->
>> <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
>> />
>
> This looks like it is left over from the admin webapp (RIP). It doesn't
> look like it does anything particularly useful anymore, but again the
> warning about weird errors.
There is almost certainly some code in there that is now redundant.
However, this listener is currently where we make sure all of the mbeans
are destroyed when a server stops. Only an issue when embedding and
starting/stopping the server.
So, scope for clean-up but at least some code needs to remain here or
elsewhere.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Which listeners required in server.xml?
Posted by Bill Barker <wb...@wilshire.com>.
"johnrock" <jo...@yahoo.com> wrote in message
news:23787784.post@talk.nabble.com...
>
> Running tomcat 6.0.18 server.xml has the following listener's enabled by
> default:
>
>
> <!--APR library loader. Documentation at /docs/apr.html -->
> <Listener className="org.apache.catalina.core.AprLifecycleListener"
> SSLEngine="on" />
>
If you are not using APR, than you don't need this (and removing it gets rid
of a message at startup).
> <!--Initialize Jasper prior to webapps are loaded. Documentation at
> /docs/jasper-howto.html -->
> <Listener className="org.apache.catalina.core.JasperListener" />
>
If you are never going to use JSP pages, can probably remove it. However,
it's pretty light-weight so would leave it in just so that I don't have to
spend time with any weird errors.
> <!-- JMX Support for the Tomcat server. Documentation at
> /docs/non-existent.html -->
> <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
> />
This looks like it is left over from the admin webapp (RIP). It doesn't
look like it does anything particularly useful anymore, but again the
warning about weird errors.
> <Listener
> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
>
Also left over from the admin webapp (RIP). This one really doesn't do
anything particularly useful anymore, so it is safe to remove. It should
probably be removed from the distribution as well (at least for TC 7), since
it was a bad idea in the first place.
> I am using standalone tomcat (no apache) without SSL, without APR, I am
> not
> using any manager or host-manager applications ..
>
> Do I need these listeners or can I remove some/all of them?
>
> --
> View this message in context:
> http://www.nabble.com/Which-listeners-required-in-server.xml--tp23787784p23787784.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Which listeners required in server.xml?
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bill,
On 5/30/2009 12:43 AM, Bill Barker wrote:
> "Christopher Schultz" <ch...@christopherschultz.net> wrote in message
>
>> Adding the APR library will give you a significant performance
>> improvement even with the plain-old HTTP connector. It might be worth
>> installing APR and leaving that listener in there.
>
> Urm, and u are basing this on what?
I am basing this on my recent benchmarking, with some results available
on this list under the thread "Apache httpd vs Tomcat static content
performance".
I'm not just talking out of my ass, here.
> A low-traffic dynamic site should see
> next to nothing using APR, and could even lose (given the interlocks to
> JNI). It all depends on who is smarter, the JVM developer, or the APR
> develper for CentOS.
CentOS is just another GNU/Linux flavor. I doubt any optimizations are
made especially for it (or other Linux flavors), so I wouldn't worry too
much about the "APR developer for CentOS" having to do too much work to
get decent performance out of it. It's not like httpd is a dog on CentOS
or anything.
> Again, to the OP, profile both configurations for your OS, and make the
> decision then.
+1
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkokEQ0ACgkQ9CaO5/Lv0PCxewCfeijsi0vMkH6nwuIRi6IUpdyp
GgwAniEROVb9ScKvEzjHICuiLv0CEQFR
=NttG
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Which listeners required in server.xml?
Posted by Bill Barker <wb...@wilshire.com>.
"Christopher Schultz" <ch...@christopherschultz.net> wrote in message
news:4A20AA17.2050104@christopherschultz.net...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> John,
>
> On 5/29/2009 6:08 PM, johnrock wrote:
>> I am using standalone tomcat (no apache) without SSL, without APR, I am
>> not
>> using any manager or host-manager applications ..
>
> Adding the APR library will give you a significant performance
> improvement even with the plain-old HTTP connector. It might be worth
> installing APR and leaving that listener in there.
>
Urm, and u are basing this on what? A low-traffic dynamic site should see
next to nothing using APR, and could even lose (given the interlocks to
JNI). It all depends on who is smarter, the JVM developer, or the APR
develper for CentOS.
Again, to the OP, profile both configurations for your OS, and make the
decision then.
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkogqhcACgkQ9CaO5/Lv0PDCKwCfRq5BCxjaog1MQYTqbMzY7zpc
> r4AAn0cu/kmZmWNq+stofg9zLEXeDP0p
> =/Oi6
> -----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Which listeners required in server.xml?
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John,
On 5/29/2009 6:08 PM, johnrock wrote:
> I am using standalone tomcat (no apache) without SSL, without APR, I am not
> using any manager or host-manager applications ..
Adding the APR library will give you a significant performance
improvement even with the plain-old HTTP connector. It might be worth
installing APR and leaving that listener in there.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkogqhcACgkQ9CaO5/Lv0PDCKwCfRq5BCxjaog1MQYTqbMzY7zpc
r4AAn0cu/kmZmWNq+stofg9zLEXeDP0p
=/Oi6
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org