You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bill Page <Bi...@DigitalGarden.com> on 2002/04/04 00:55:19 UTC
data connection limit
I spent awhile this afternoon trying to figure why I was hanging. Turns out
that I was not closing 1 of several connections on each pass of a certain
page. when I hit the maxcount, I hung. I'm running struts as an NT service
but have a window up so I can see debugging I put in with system.out.... and
exceptions. I'm not seeing anything here. Does struts throw an exception?
We use acommon piece of code:
public static Connection getConnection(ActionServlet _servlet, String
_key)
throws SQLException
{
javax.sql.DataSource dataSource;
dataSource = _servlet.findDataSource(_key);
return dataSource.getConnection();
}
in a static utility class. I've got catches for SQL and Throwable but don't
seem to be catching anything.
bill page
billp@digitalgarden.com
Digital Garden Software, Inc.
856 US Hwy 206 Bldg B Ste 15
Hillsborough, NJ 08844
908.904.0664
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: data connection limit
Posted by Ted Husted <hu...@apache.org>.
I'd strongly recommend going with Poolman instead. You could pop that
into your getConnection method, and the rest of the application would
never know the difference.
-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services
Bill Page wrote:
>
> I spent awhile this afternoon trying to figure why I was hanging. Turns out
> that I was not closing 1 of several connections on each pass of a certain
> page. when I hit the maxcount, I hung. I'm running struts as an NT service
> but have a window up so I can see debugging I put in with system.out.... and
> exceptions. I'm not seeing anything here. Does struts throw an exception?
> We use acommon piece of code:
> public static Connection getConnection(ActionServlet _servlet, String
> _key)
> throws SQLException
> {
> javax.sql.DataSource dataSource;
> dataSource = _servlet.findDataSource(_key);
> return dataSource.getConnection();
> }
>
> in a static utility class. I've got catches for SQL and Throwable but don't
> seem to be catching anything.
>
> bill page
> billp@digitalgarden.com
> Digital Garden Software, Inc.
> 856 US Hwy 206 Bldg B Ste 15
> Hillsborough, NJ 08844
> 908.904.0664
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>