hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Arnott <>
Subject Re: Configuring services question...
Date Wed, 29 Sep 2004 13:14:19 GMT
Howard Lewis Ship wrote:

> The kind of thing you want could be built, but is not part of HiveMind
> at this time.
> Part of the idea of HiveMind is to remove the clutter of external XML
> descriptor files, and move things into HiveMind MDDs, where they will
> be uniform and documented (using HiveDoc).

The idea was that there would be a section in the XML config file
relating to the ObjectPool config, so that it could be tuned for
different loads without having to rebuild the module JAR file for each

> With HiveMind 1.1, you'll be able to mark your object pool service as
> private, so it won't be accessible from outside your own module.

That will be useful.

> I wouldn't balk at the idea of creating new services, HiveMind really
> lets you go wild on divide-and-conquer, resulting in very small, very
> testable services.

I do like the fact that I can create a pooling data source without
having to write any code. I also like the fact that coupled with a
bit of reflection I can handle XML-RPC requests that contain the name
of the service and the method to call, without having to know anything
about the service. It means I can write a server that can have extra
bits added to it by simple placing the modules in the classpath and

Well, I've now got the following bits in my descriptor file, but am
getting a error when the PoolableObjectFactory is being created.

   <service-point id="ObjectPool" interface="org.apache.commons.pool.ObjectPool">
       <construct class="org.apache.commons.pool.impl.GenericObjectPool">
         <!-- config properties... -->

   <service-point id="ConnectionFactory" interface="org.apache.commons.dbcp.ConnectionFactory">
       <construct class="org.apache.commons.dbcp.DataSourceConnectionFactory">

   <service-point id="DefaultDataSource" interface="javax.sql.DataSource">
       <construct class="org.apache.commons.dbcp.BasicDataSource">
         <!-- properties... -->

   <service-point id="PoolableObjectFactory" interface="org.apache.commons.pool.PoolableObjectFactory">
       <construct class="org.apache.commons.dbcp.PoolableConnectionFactory">

   <service-point id="DataSourceConnectionPoolService" interface="javax.sql.DataSource">
       <construct class="org.apache.commons.dbcp.PoolingDataSource">
         <set-service property="pool" service-id="ObjectPool" />

The problem is the <object>instance:null</object> statement and I'm
assuming the <string>null</string> statement. How do you specify a null
object to a constructor...?


Bob Arnott

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

View raw message