Erik Weber wrote:
If you are using SQL Server, I would say, watch out for the drivers as
much as the DataSource implementation. I have read and heard many horror
stories about the Microsoft drivers and have experienced problems myself
(though pinpointing them is another matter). There are third party
drivers out there that claim to be much better. I could use a good one
myself . . .
Have you tried: http://jtds.sourceforge.net/
Erik
Brian McGovern wrote:
Well all the folks in the Hibernate boards seem to favor either
Proxool or C3P0. I've heard about the complaints on DBCP and am using
SQL Server for this implementation so i'll watch out for connection
leaks. It's really not that hard to switch the pooler, I'll probably
give c3p0 a shot with and without my extended base class and see what
happens there.
-B
-----Original Message-----
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 3:46 PM
To: Struts Users Mailing List
Subject: Re: Struts , hibernate, and DBCP
Interesting. Yeah, I was going to suggest writing some "trigger" code
for startup, and it looks like that's what you have done. Also, you're
not stuck with DBCP. There are many DataSource implementations out
there, including others that are open source. I was hoping to get
around to reviewing them all one day. . . I have had problems with
DBCP leaking connections when used with some databases (Oracle and SQL
Server 2000). It could be a vendor-specific problem though, because
DBCP seems to work great with ConnectorJ/MySQL.
Erik
Brian McGovern wrote:
Eric Thanks for response. I wrote a follow up that explained my work
around. But to your points, in using commons-dbcp and specifying the
initial pool size of 5, you'd think that it would fire up the pool on
application start but it doesnt. In code, you have to request a
connection from the JNDI resource in order for the pool to be created.
-----Original Message-----
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 2:58 PM
To: Struts Users Mailing List
Subject: Re: Struts , hibernate, and DBCP
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
--
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]