Answers inline...
mark archur wrote:
Hi Dirk/All,
Thanks for the information on BasicDataSource. Its good to know that BasicDataSource can give me all I want. Though, I do not seem to run out of questions yet related to dbcp:).......
Regarding setting parameters via setter methods: I defined these settings in my server.xml and the code seems to be picking up/honoring these settings. Are setter methods of BasicDataSource not another way of setting parameters to the pool? What is the right way and/or the usual way of setting these parameters? via server.xml? or via setter methods of BasicDataSource?
Yes, defining the settings in server.xml has the same effect as using
the setters on BasicDatasource. Tomcat calls BasicDatasourceFactory with
these server.xml settings and the factory creates a BasicDatasource and
sets the properties.
The preferred way is to configure everything in server.xml.
Similarly, regarding setting connectionProprties to the driver, there is a parameter
"connectionParameters" which can be defined in server.xml ans can be used to
set different driver proprties. Do we still have to do this via
BasicDataSource.setConnectionProperties() method?
You can use addConnectionProperty(String name, String value) but using
server.xml also works.
I read at few places (eg: dbcp tool java doc) that *abandoned* is deprepcated
and will be removed from the future releases. Is this deprecation valid/true
only for BasicDataSource.*Abandoned*() methods? or is it valid even with
setting *abandoned* parameters in server.xml? finally, is it not advisable to
use *abandoned* related stuff now when usinf commons-dbcp-1.1 version?
The *abandoned* feature has been deprecated since 1.1, in general its
use is still supported but not recommended. The classes are deprecated
because the current implementation and API may change in a future
version. See also:
http://wiki.apache.org/jakarta-commons/DBCP
Thanks in advance for the answers.
-- Dirk
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]