On 26/03/2012 12:30, Terence M. Bandoian wrote:
>  On 1:59 PM, Pid * wrote:
>> On 25 Mar 2012, at 03:10, "Terence M. Bandoian"<tere...@tmbsw.com> 
>> wrote:
>>
>>> On 1:59 PM, Pid * wrote:
>>>> On 23 Mar 2012, at 21:59, David Kerber<dcker...@verizon.net>   wrote:
>>>>
>>>>> On 3/23/2012 6:51 PM, Terence M. Bandoian wrote:
>>>>>> On 1:59 PM, David kerber wrote:
>>>>>>> On 3/23/2012 11:19 AM, Caldarale, Charles R wrote:
>>>>>>>>> From: David kerber [mailto:dcker...@verizon.net]
>>>>>>>>> Subject: jdbc driver location in TC 7
>>>>>>>>> Where is the recommended location for jdbc driver jars in TC7,
>>>>>>>>> when I'm using separate CATALINA_HOME and CATALINA_BASE locations?
>>>>>>>> If you look in conf/catalina.properties, you'll see the order in
>>>>>>>> which the common loader searches directories.
>>>>>>>>
>>>>>>>>> If it makes a difference, I am not using tomcat's connection
>>>>>>>>> pooling; it's handled in my app.
>>>>>>>> That's a critical difference.
>>>>>>>>
>>>>>>>>> I generally would prefer to put it in my webapp's lib directory
>>>>>>>> That is the correct location, since Tomcat is not involved.
>>>>>>> Great; thanks for confirming.
>>>>>>>
>>>>>>> D
>>>>>>>
>>>>>> Hi, David-
>>>>>>
>>>>>> I prefer the web app's lib directory as well but when I place the
>>>>>> JDBC driver there, a memory leak detection error is logged when I
>>>>>> stop Tomcat.  Not a big deal but I'd prefer not to have to
>>>>>> explain.  When I move the JDBC driver to the Tomcat lib directory,
>>>>>> the error is no longer logged.  (Tomcat 6)
>>>>> Even better would be to fix your probable connection leak.  I had
>>>>> some too, when I went to a version that had the leak detection, but
>>>>> was able to fix them all.
>>>>>
>>>>> D
>>>> Yup. Just deregister the DB driver on app stop using a
>>>> ServletContexListener.
>>>>
>>>>
>>>> p
>>>
>>> Thanks.  I'll give that a try.  Wouldn't I see a connection leak no
>>> matter where I placed the driver?
>> Only if you're not returning / cleaning up connection objects properly.
>>
>>
>>> De-registering the driver may do the trick.
>> This addresses the driver leak&  warning by Tomcat.
>>
>>
>> p
> 
> 
> Thanks again.  Explicitly de-registering the driver eliminated the
> Tomcat error message with the driver located in WEB-INF/lib.  From what
> I've read, JDBC 4.0 drivers automatically register themselves with
> DriverManager but I haven't seen anything about automatic
> de-registration.  Apparently, Tomcat (6.0.29) takes care of that if the
> driver is located in the Tomcat lib directory but not if it is located
> in web application's lib directory.  Or maybe de-registration isn't a
> concern when Tomcat is shutting down.

The other way round, I think.  Read the warning message.


p

> -Terence Bandoian
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-- 

[key:62590808]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to