Re: Problem closing datasource when used as JNDI resource
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, On 8/26/2009 12:01 AM, Mohammed Bin Mahmood wrote: Yes, that is a listener for the context, where as I am using a listener for a server. Why are you using a listener for the server... it seems much more appropriate to use a context listener instead. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqVQC0ACgkQ9CaO5/Lv0PDKmwCeNSnfY7OK2+P2heA0EcqiarIA 4NUAoLZb7dJYrNTz17EE0iqCpT/nZT5y =OWly -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem closing datasource when used as JNDI resource
Since you don't seem to be able to google yourself, here is the link. http://www.mail-archive.com/users@tomcat.apache.org/msg65149.html Mohammed Bin Mahmood wrote: Hi Chris, You mentioned about the published filter that can close datasource. I wonder if you have any idea about that. Is it provided by tomcat or some other Thanks, Mohammed. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Monday, August 24, 2009 7:48 PM To: Tomcat Users List Subject: Re: Problem closing datasource when used as JNDI resource Mohammed, On 8/24/2009 12:49 AM, Mohammed Bin Mahmood wrote: Hi Chris, 3. There is a published filter that can close the DataSource for you. Do you have any idea about the filter that can close the Datasource? What? -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Mark Shifman MD. Ph.D. Yale Center for Medical Informatics Phone (203)737-5219 mark.shif...@yale.edu - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem closing datasource when used as JNDI resource
Hi Chris, Yes, that is a listener for the context, where as I am using a listener for a server. Any how if you see the archive, my first mail gives the reference of the same thread. I guess I have to live with that (Server life cycle listener) :-( Thanks again, Mohammed. -Original Message- From: Mark Shifman [mailto:mark.shif...@yale.edu] Sent: Tuesday, August 25, 2009 5:47 PM To: Tomcat Users List Subject: Re: Problem closing datasource when used as JNDI resource Since you don't seem to be able to google yourself, here is the link. http://www.mail-archive.com/users@tomcat.apache.org/msg65149.html Mohammed Bin Mahmood wrote: Hi Chris, You mentioned about the published filter that can close datasource. I wonder if you have any idea about that. Is it provided by tomcat or some other Thanks, Mohammed. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Monday, August 24, 2009 7:48 PM To: Tomcat Users List Subject: Re: Problem closing datasource when used as JNDI resource Mohammed, On 8/24/2009 12:49 AM, Mohammed Bin Mahmood wrote: Hi Chris, 3. There is a published filter that can close the DataSource for you. Do you have any idea about the filter that can close the Datasource? What? -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Mark Shifman MD. Ph.D. Yale Center for Medical Informatics Phone (203)737-5219 mark.shif...@yale.edu - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem closing datasource when used as JNDI resource
Sorry Chris I meant to address Mark in my previous mail. Thanks, Mohammed. -Original Message- From: Mohammed Bin Mahmood [mailto:moham...@sustainlane.com] Sent: Wednesday, August 26, 2009 9:32 AM To: 'Tomcat Users List' Subject: RE: Problem closing datasource when used as JNDI resource Hi Chris, Yes, that is a listener for the context, where as I am using a listener for a server. Any how if you see the archive, my first mail gives the reference of the same thread. I guess I have to live with that (Server life cycle listener) :-( Thanks again, Mohammed. -Original Message- From: Mark Shifman [mailto:mark.shif...@yale.edu] Sent: Tuesday, August 25, 2009 5:47 PM To: Tomcat Users List Subject: Re: Problem closing datasource when used as JNDI resource Since you don't seem to be able to google yourself, here is the link. http://www.mail-archive.com/users@tomcat.apache.org/msg65149.html Mohammed Bin Mahmood wrote: Hi Chris, You mentioned about the published filter that can close datasource. I wonder if you have any idea about that. Is it provided by tomcat or some other Thanks, Mohammed. -Original Message- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem closing datasource when used as JNDI resource
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, On 8/24/2009 12:49 AM, Mohammed Bin Mahmood wrote: Hi Chris, 3. There is a published filter that can close the DataSource for you. Do you have any idea about the filter that can close the Datasource? What? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqSoSIACgkQ9CaO5/Lv0PDwcgCgrUL+GQZ4w1NOf3EZNrNeJnJl lj8AoJkZ1ztu+y2oLV8/Y0WP3YNCeiek =xGeI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem closing datasource when used as JNDI resource
Hi Chris, You mentioned about the published filter that can close datasource. I wonder if you have any idea about that. Is it provided by tomcat or some other Thanks, Mohammed. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Monday, August 24, 2009 7:48 PM To: Tomcat Users List Subject: Re: Problem closing datasource when used as JNDI resource -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, On 8/24/2009 12:49 AM, Mohammed Bin Mahmood wrote: Hi Chris, 3. There is a published filter that can close the DataSource for you. Do you have any idea about the filter that can close the Datasource? What? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqSoSIACgkQ9CaO5/Lv0PDwcgCgrUL+GQZ4w1NOf3EZNrNeJnJl lj8AoJkZ1ztu+y2oLV8/Y0WP3YNCeiek =xGeI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem closing datasource when used as JNDI resource
Hi Chris, 3. There is a published filter that can close the DataSource for you. Do you have any idea about the filter that can close the Datasource? Thanks, Mohammed. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Friday, August 21, 2009 11:25 PM To: Tomcat Users List Subject: Re: Problem closing datasource when used as JNDI resource -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, On 8/20/2009 9:44 AM, Mohammed Bin Mahmood wrote: But I still do not get my answer yet. Yes, you do: 1. This is a problem with Tomcat. Patches are welcome. 2. No, there is no Tomcat configuration to fix this. You will have to work around it unless Tomcat is fixed. 3. There is a published filter that can close the DataSource for you. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqO34gACgkQ9CaO5/Lv0PCj2QCfZWNx8vS8vlLBD/8qfAUG+4LU wyQAoJZQxCSrUZqb9qutP6u5OfT5TNl4 =JgOZ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem closing datasource when used as JNDI resource
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, On 8/20/2009 9:44 AM, Mohammed Bin Mahmood wrote: But I still do not get my answer yet. Yes, you do: 1. This is a problem with Tomcat. Patches are welcome. 2. No, there is no Tomcat configuration to fix this. You will have to work around it unless Tomcat is fixed. 3. There is a published filter that can close the DataSource for you. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqO34gACgkQ9CaO5/Lv0PCj2QCfZWNx8vS8vlLBD/8qfAUG+4LU wyQAoJZQxCSrUZqb9qutP6u5OfT5TNl4 =JgOZ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem closing datasource when used as JNDI resource
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hop, On 8/20/2009 11:17 AM, Pham, Hop wrote: I'm new to this users list. I think that JNDI resource management (i.e., datasource) is JEE app server domain, and remains available while Tomcat up by design so that it can be shared across multiple applications. The original thread referenced in the OP (see the archives, Mohammed gave a link to the original thread) was talking about JNDI DataSources defined in the webapp's context.xml, so they are webapp-specific. In this case, it's appropriate for the webapp to close them down since Tomcat doesn't bother to do it. Your DBAs may complain about the number of open connections to the databases, but they are shared resources, and does not take up much CPU utilization on both database servers and application servers to keep connections open. Actually, many databases have significant resources allocated on the server side for a connection, even when it's not really being used by the client. Your DBA probably has a reason to complain about wasted resources :) Fortunately, production webapps are rarely restarted right? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqO4B0ACgkQ9CaO5/Lv0PAWPQCeLU1BPxwiOLR+GoDBHm1Qgn+U Ez4Anjr9Un0wwdUGoPVk4VxOUkFwSfU2 =5/eE -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem closing datasource when used as JNDI resource
Thanks Chris, But I still do not get my answer yet. Does anybody have the better way to shut down the data source when started by tomcat using JNDI resource? Or is there any configuration we can do so that tomcat closes it automatically without us doing any workarounds? Thanks, Mohammed. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Wednesday, August 19, 2009 7:05 PM To: Tomcat Users List Subject: Re: Problem closing datasource when used as JNDI resource -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, On 8/19/2009 8:25 AM, Mohammed Bin Mahmood wrote: When tomcat takes care of creating maintaining datasource, then does it not closes it when server is shut down? According to Filip's comments on the first thread you mentioned, yes: the connection pool is not explicitly closed. Do we have to close it on our own (the way I do) or is there any better way to do it without external listener? The best way would be to have Tomcat actually shut-down the DataSource, since it created it in the first place. Patches to Tomcat are always welcome :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqL/4MACgkQ9CaO5/Lv0PD39QCdEWcriY2WJyRfKDYmCtZM10Gu 2GgAnRGHpsPKz4bKLCXw9ylHnTFGdvfn =EwiF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem closing datasource when used as JNDI resource
I'm new to this users list. I think that JNDI resource management (i.e., datasource) is JEE app server domain, and remains available while Tomcat up by design so that it can be shared across multiple applications. It is not effective to terminate datasource connections, and resume connetion pool establishment when a new request for datasource arrives. Your DBAs may complain about the number of open connections to the databases, but they are shared resources, and does not take up much CPU utilization on both database servers and application servers to keep connections open. thanks, -hop From: Mohammed Bin Mahmood [moham...@sustainlane.com] Sent: Thursday, August 20, 2009 9:44 AM To: 'Tomcat Users List' Subject: RE: Problem closing datasource when used as JNDI resource Thanks Chris, But I still do not get my answer yet. Does anybody have the better way to shut down the data source when started by tomcat using JNDI resource? Or is there any configuration we can do so that tomcat closes it automatically without us doing any workarounds? Thanks, Mohammed. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Wednesday, August 19, 2009 7:05 PM To: Tomcat Users List Subject: Re: Problem closing datasource when used as JNDI resource -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, On 8/19/2009 8:25 AM, Mohammed Bin Mahmood wrote: When tomcat takes care of creating maintaining datasource, then does it not closes it when server is shut down? According to Filip's comments on the first thread you mentioned, yes: the connection pool is not explicitly closed. Do we have to close it on our own (the way I do) or is there any better way to do it without external listener? The best way would be to have Tomcat actually shut-down the DataSource, since it created it in the first place. Patches to Tomcat are always welcome :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqL/4MACgkQ9CaO5/Lv0PD39QCdEWcriY2WJyRfKDYmCtZM10Gu 2GgAnRGHpsPKz4bKLCXw9ylHnTFGdvfn =EwiF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem closing datasource when used as JNDI resource
Correction: missing DON'T I looked into the code and I can only see that it destroys the Resource and other references. But DON'T destroy or closes the datasource on a whole. Thanks, Mohammed. -Original Message- From: Mohammed Bin Mahmood [mailto:moham...@sustainlane.com] Sent: Wednesday, August 19, 2009 5:45 PM To: users@tomcat.apache.org Subject: Problem closing datasource when used as JNDI resource Hello All, I am using datasource as a JNDI resource described in http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html The problem I see is that datasource is not closed cleanly when the server shuts down. I looked into the code and I can only see that it destroys the Resource and other references. But destroys or close the datasource on a whole. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem closing datasource when used as JNDI resource
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, On 8/19/2009 8:25 AM, Mohammed Bin Mahmood wrote: When tomcat takes care of creating maintaining datasource, then does it not closes it when server is shut down? According to Filip's comments on the first thread you mentioned, yes: the connection pool is not explicitly closed. Do we have to close it on our own (the way I do) or is there any better way to do it without external listener? The best way would be to have Tomcat actually shut-down the DataSource, since it created it in the first place. Patches to Tomcat are always welcome :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqL/4MACgkQ9CaO5/Lv0PD39QCdEWcriY2WJyRfKDYmCtZM10Gu 2GgAnRGHpsPKz4bKLCXw9ylHnTFGdvfn =EwiF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org