hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kurt R. Hoehn" <>
Subject RE: Configuring services question...
Date Tue, 28 Sep 2004 18:27:20 GMT
You can add another service point.

This will give you the ability to configure the GenericObjectPool.

<service-point id="GenericObjectPool"
    <construct class="org.apache.commons.pool.GenericObjectPool">
      <set property="maxIdle" value="15" />

Then in your DataSourceConnectionPoolService change

<set-object property="pool"
value="instance:org.apache.commons.pool.impl.GenericObjectPool" />

<set-service property="pool" service-id="GenericObjectPool" />


-----Original Message-----
From: Bob Arnott [] 
Sent: Tuesday, September 28, 2004 11:12 AM
Subject: Configuring services question...

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

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
totally here, but I haven't a clue what.

<module id="services" version="1.0.0">
   <service-point id="DataSourceConnectionPoolService"
       <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
stuff; I feel that the documentation doesn't make it very clear what
actually supposed to do.

Any help would be greatly appreciated.



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

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

View raw message