You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Raquepo <rr...@primeorion.com> on 2003/06/16 06:44:17 UTC

GenericDataSource looping

Im use to use DBCP in Struts 1.1RC1
but then mo back to GenericDataSource in Struts 1.1RC2

but it seem's im having a problem with it. According to my console it seem's generic source is lopping endlessly...
429796 [tcp-accept-6802] INFO util.GenericDataSource  -    createConnection()
429812 [tcp-accept-6802] INFO util.GenericDataSource  -    Return new connection, activeCount=5, useCount=123
429812 [tcp-accept-6802] INFO util.GenericDataSource  -   getConnection()
429812 [tcp-accept-6802] INFO util.GenericDataSource  -    Check for timeout, activeCount=4, useCount=123
....

my data-source configuration in my struts-config.xml looks like this:
  <data-source key="DATASOURCE">  
   <set-property property="driverClass" value="com.mysql.jdbc.Driver" />
   <set-property property="url" value="jdbc:mysql://localhost/crmdev" />
   <set-property property="maxCount" value="10" />
   <set-property property="minCount" value="5" />
   <set-property property="user" value="root" />
   <set-property property="password" value="password" />
  </data-source>

....
has anybody experienced this before? what do i have to do to make it work?
or should i really change my datasource? i was thinking og using DBConnectionBroker? any ideas?

thanks.

Re: GenericDataSource looping

Posted by Ted Husted <hu...@apache.org>.
Any pool that supports the DataSource interface should work, including 
the BasicDataSource. The DBCP just isn't being bundled with Struts 
anymore. In a future release, the type property will be required, and 
you will have to provide your own DataSource implementation.

-Ted.

Richard Raquepo wrote:
> i believe <data-source type="org.apache.commons.dbcp.BasicDataSource"> is no
> longer supported in struts1.1RC2.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: GenericDataSource looping

Posted by Richard Raquepo <rr...@primeorion.com>.
i believe <data-source type="org.apache.commons.dbcp.BasicDataSource"> is no
longer supported in struts1.1RC2.

----- Original Message -----
From: "Adam Hardy" <ah...@cyberspaceroad.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, June 16, 2003 2:55 PM
Subject: Re: GenericDataSource looping


> You've left off the "type" attribute in the <data-source> tag. Try
>
> <data-source type="org.apache.commons.dbcp.BasicDataSource">
>
> don't you get any errors?
>
> Richard Raquepo wrote:
> > Im use to use DBCP in Struts 1.1RC1
> > but then mo back to GenericDataSource in Struts 1.1RC2
> >
> > but it seem's im having a problem with it. According to my console it
seem's generic source is lopping endlessly...
> > 429796 [tcp-accept-6802] INFO util.GenericDataSource  -
createConnection()
> > 429812 [tcp-accept-6802] INFO util.GenericDataSource  -    Return new
connection, activeCount=5, useCount=123
> > 429812 [tcp-accept-6802] INFO util.GenericDataSource  -
getConnection()
> > 429812 [tcp-accept-6802] INFO util.GenericDataSource  -    Check for
timeout, activeCount=4, useCount=123
> > ....
> >
> > my data-source configuration in my struts-config.xml looks like this:
> >   <data-source key="DATASOURCE">
> >    <set-property property="driverClass" value="com.mysql.jdbc.Driver" />
> >    <set-property property="url" value="jdbc:mysql://localhost/crmdev" />
> >    <set-property property="maxCount" value="10" />
> >    <set-property property="minCount" value="5" />
> >    <set-property property="user" value="root" />
> >    <set-property property="password" value="password" />
> >   </data-source>
> >
> > ....
> > has anybody experienced this before? what do i have to do to make it
work?
> > or should i really change my datasource? i was thinking og using
DBConnectionBroker? any ideas?
> >
> > thanks.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: GenericDataSource looping

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
You've left off the "type" attribute in the <data-source> tag. Try

<data-source type="org.apache.commons.dbcp.BasicDataSource">

don't you get any errors?

Richard Raquepo wrote:
> Im use to use DBCP in Struts 1.1RC1
> but then mo back to GenericDataSource in Struts 1.1RC2
> 
> but it seem's im having a problem with it. According to my console it seem's generic source is lopping endlessly...
> 429796 [tcp-accept-6802] INFO util.GenericDataSource  -    createConnection()
> 429812 [tcp-accept-6802] INFO util.GenericDataSource  -    Return new connection, activeCount=5, useCount=123
> 429812 [tcp-accept-6802] INFO util.GenericDataSource  -   getConnection()
> 429812 [tcp-accept-6802] INFO util.GenericDataSource  -    Check for timeout, activeCount=4, useCount=123
> ....
> 
> my data-source configuration in my struts-config.xml looks like this:
>   <data-source key="DATASOURCE">  
>    <set-property property="driverClass" value="com.mysql.jdbc.Driver" />
>    <set-property property="url" value="jdbc:mysql://localhost/crmdev" />
>    <set-property property="maxCount" value="10" />
>    <set-property property="minCount" value="5" />
>    <set-property property="user" value="root" />
>    <set-property property="password" value="password" />
>   </data-source>
> 
> ....
> has anybody experienced this before? what do i have to do to make it work?
> or should i really change my datasource? i was thinking og using DBConnectionBroker? any ideas?
> 
> thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: GenericDataSource looping

Posted by Ted Husted <hu...@apache.org>.
If you are saying that these four lines appear over and over again, 
without ever establishing a connection, then please file a report in 
Bugzilla.

In a future release, the GenericDataSource will be unbundled and you 
will have to supply your own DataSource implementation. So, if you were 
planning on using another implementation, this would be a good a time as 
any to switch.

-Ted.

Richard Raquepo wrote:
> Im use to use DBCP in Struts 1.1RC1
> but then mo back to GenericDataSource in Struts 1.1RC2
> 
> but it seem's im having a problem with it. According to my console it seem's generic source is lopping endlessly...
> 429796 [tcp-accept-6802] INFO util.GenericDataSource  -    createConnection()
> 429812 [tcp-accept-6802] INFO util.GenericDataSource  -    Return new connection, activeCount=5, useCount=123
> 429812 [tcp-accept-6802] INFO util.GenericDataSource  -   getConnection()
> 429812 [tcp-accept-6802] INFO util.GenericDataSource  -    Check for timeout, activeCount=4, useCount=123
> ....
> 
> my data-source configuration in my struts-config.xml looks like this:
>   <data-source key="DATASOURCE">  
>    <set-property property="driverClass" value="com.mysql.jdbc.Driver" />
>    <set-property property="url" value="jdbc:mysql://localhost/crmdev" />
>    <set-property property="maxCount" value="10" />
>    <set-property property="minCount" value="5" />
>    <set-property property="user" value="root" />
>    <set-property property="password" value="password" />
>   </data-source>
> 
> ....
> has anybody experienced this before? what do i have to do to make it work?
> or should i really change my datasource? i was thinking og using DBConnectionBroker? any ideas?
> 
> thanks.


-- 
Ted Husted,
Struts in Action <http://husted.com/struts/book.html>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org