excalibur-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Wilson" <mart...@bright-interactive.com>
Subject Using ResourceLimitingJdbcDataSource
Date Thu, 13 Jan 2005 16:39:14 GMT
Hi,
 
For the last couple of years we have been using the component
functionality Avalon/Excalibur (from avalon-framework.jar and
avalon-excalibur-4.1.jar).
 
The JdbcDataSource component in this does not block (and wait) if no
connections are left in the pool, which has recently become a problem
for us.
 
I am planning to fix this by using the ResourceLimitingJdbcDataSource
class.
 
Looking at the Excalibur website it appears that there have been some
changes (i.e. the Avalon project itself has closed). To bring our code
up-to-date, I downloaded the following jar files:
 
avalon-fortress-container-complete-1.1.jar
excalibur-component-1.2.jar
excalibur-datasource-1.2.0.jar
excalibur-pool-1.2.jar
 
These seem to contain all the classes that we previously used from
avalon-framework.jar and avalon-excalibur-4.1.jar, and with these our
webapp runs fine.
 
However, once I changed components.xconf to create a data source
component that uses
org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource
(and added excalibur-pool-instrumented-2.0.0.jar, which is necessary) I
get a link error.
 
Using the source code instead of excalibur-datasource-1.2.0.jar I get a
compilation error "cannot convert from
ResourceLimitingJdbcConnectionPool to InstrumentedResourceLimitingPool"
(line 323)
 
This seems to be a problem with line 160 of
ResourceLimitingJdbcDataSource - m_pool is declared as type
InstrumentedResourceLimitingPool, yet it is instantiated on line 323 as
a ResourceLimitingJdbcConnectionPool, which doesn't inherit from
InstrumentedResourceLimitingPool.
 
If I change line 160 so that m_pool is of type
ResourceLimitingJdbcConnectionPool then everything works ok.
 
I don't really want to alter the source myself so I was wondering if I
am using the right jar files and, if so, why is this problem occurring?
 
Any help gratefully received.
 
Thanks,
Martin.
 

Mime
View raw message