velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Bauman" <>
Subject Re: Connection Pooling
Date Mon, 01 Oct 2001 20:52:33 GMT
Database access is best abstracted through some kind of O/R mapping, which
usually has some kind of connection pooling. I wrote a simple O/R layer
which fits most of my needs that uses java.sql.DataSource - based
connection-pooling. It could be a bit more flexible than it is, but at that
point I will be looking at Torque / Turbine.

As a side note, people who write tools to iterate over a DB result set in
the Velocity page are sidestepping much of this issue entirely, which is
fine if your app is a toy, intended to be used by maybe you and one other
person only. ;)

> To the bigger question of accessing the init method from Velocity
> Servlet, you can write your own loadConfiguration() method as indicated
> in the Velocity documentation.  The Velocity Servlet init() method
> always calls the loadConfiguration() method.  Whether it's a good idea
> to create connections here is up to you. 
> Barbara Baughman
> X2157
> On Fri, 28 Sep 2001, Rasoul Hajikhani wrote:
>> Hi,
>> I was reading "Core Servlets..." and at some point the author
>> recommends that it is best to create connections inside the init
>> method of the servlets. In extending VelocityServlet I do not have
>> access to the init method of my servlet(?). I am wondering what is the
>> work around to that?  Appreciate all comments and suggestions
>> -r

Will America never be the same after September 11? I would phrase the
question differently. Will America again be so captured by fear as to cast a
net of suspicion over growing numbers of its own citizens? 

View raw message