hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Arnott <>
Subject Configuring services question...
Date Tue, 28 Sep 2004 15:11:39 GMT
Hello, I'm just starting to investigate using HiveMind as it looks quite
cool. However, I can't get my head round the configuration of services
and I can't see what I want to know in any of the documentation
(alternatively I might be blind).

I'm having trouble creating a org.apache.commons.dbcp.PoolingDataSource
as a service due to the fact that it needs a load of other classes to
make it function properly, namely an ObjectPool and a PoolableObjectFactory.

I've managed to create a org.apache.commons.pool.impl.GenericObjectPool
as a service and pass it to another service via the <set-service> tag.
However, I can't see how to set object on other object that are then
added to services (if you see what I mean).

Basically I'm trying to do is create the PoolingDataSource as a service
and pass it a GenericObjectPool that has had various properties set on
it as well as a PoolableObjectFactory.

I've got as far as the hivemodule config below, but can't see how to set
properties on the instance of GenericObjectPool. I maybe missing something
totally here, but I haven't a clue what.

<module id="services" version="1.0.0">
   <service-point id="DataSourceConnectionPoolService" interface="javax.sql.DataSource">
       <construct class="org.apache.commons.dbcp.PoolingDataSource">
         <set-object property="pool" value="instance:org.apache.commons.pool.impl.GenericObjectPool"

   <service-point id="OtherService" interface="services.OtherService">
     <invoke-factory model="threaded">
       <construct class="services.OtherServiceImpl">
         <set-service property="connectionPool" service-id="DataSourcePoolService" />

I also have a configuration file that is read in via a Digester that sets up
a load of stuff. I would like to specify the GenericObjectPool properties in
this file and then pass them to it. Is that possible...? I've not seen
anything relating to passing external config to HiveMind services.

I must admit to not being able to fully understand the configuration point
stuff; I feel that the documentation doesn't make it very clear what you're
actually supposed to do.

Any help would be greatly appreciated.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message