Home Projects Jobs Clientele Contact


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Db pool [was: My little comments to CPP code]

sergey@total-knowledge.com wrote:
>> How about using UUServlet for that purpose?
> I will do that. But in this case I'll have to create an instance of the
> pool only if there is no "uu_pool" attribute in the servlet context.
>  I'm
> not sure if it's good enough though, maybe I should check if the pool
> already exist too. So I have several questions regarding potential
> complications.
> Are those kind of situations when "Pool does not exist, but uu_pool
> attribute is present in ServletContext"
It's up to you to make sure this doesn't happen.
>  or "Pool exists, but no uu_pool
> attribute is present in ServletContext" possible due to some DB or server
> failures?
DB server failure may mean there are no connections in the pool.
Existence of pool itself is different story.
> I understand that after shutdown all connections will be removed from
> m_connections list, but I'm not sure about uuDBPool object. Will it be
> destroyed too?
You tell me.
> I guess I need to remove "uu_pool" attribute from ServletContext too when
> it happens, perhaps in UUServlet::destroy() where supposly all connections
> in the pool will be closed.

Ilya A. Volynets-Evenbakh
Total Knowledge. CTO

Authoright © Total Knowledge: 2001-2008