The fact that you get a compilation error indicates a version mismatch
between some of the jars (since we of course compile our source code against
itself before a release). I¹m afraid I don¹t know top-of-head what versions
of different jars are supposed to work together, and I don¹t think we have
those documented very well. Looking at the subversion and cvs history for
this component, Niclas Hedhman introduced some changes to this code in 2003:
> 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:
> 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
> 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.
To unsubscribe, e-mail: user-unsubscribe@exca... For additional commands, e-mail: email@example.com