Ok..  Im not to sure how that works.  Can you explain a little more?

-----Original Message-----
From: N G [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 4:34 PM
To: Struts Users Mailing List
Subject: Re: Struts , hibernate, and DBCP


Oh... I didn't know that DBCP doesn't initialize the pool on server
startup and thus misunderstood your question.

Truth is, if you want to go the easiest route, without having to make
your own Controller, you can just configure your Hibernate
SessionFactory in a listener
(ServletContextListener.contextInitialized()). It will FOR SURE fire
up on start up of your application before struts action servlet is
even loaded.

HTH,
NG.


On Tue, 29 Mar 2005 14:58:12 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
> In my opinion, the question is on topic.
> 
> I'm not sure whether by "instantiated" you mean the pool class or the
> connection class. If it's the former, I'm not sure of the answer, but I
> would assume that the pool class typically is instantiated at server
> startup. If not, wouldn't the JNDI lookup fail? If it's the latter, I
> think specifying the minimum connection count property (> 0) in your
> datasource config should cause the pool to be primed right after
> startup. But, it's up to the pool implementation of course. But the
> minimum connection count is supposed to keep the pool from going dry.
> 
> Erik
> 
> 
> N G wrote:
> 
> >This has nothing to do with Struts:
> >http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
> >
> >Good luck,
> >NG.
> >
> >
> >On Tue, 29 Mar 2005 13:40:56 -0500, Brian McGovern
> ><[EMAIL PROTECTED]> wrote:
> >
> >
> >>Im using struts, hibernate and dbcp connection pooling.  Everything works 
> >>fine but regarding my connection pool.  It gets intantiated on the first 
> >>time I request a connection from the DBCP pool.  I want it to create the 
> >>pool when tomcat starts.  I think i can do this with struts, but im not 
> >>sure how.  If using struts config for htis is not the answer i;d still like 
> >>to know what is.
> >>
> >>-thanks
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to