Well, I spent some time looking through the JMX spec and code.
Whew!  Dense stuff.
        I guess I should explain what I've got.  It's a JDBC connection
pool architecture implemented as a JDBC driver.  That is, you initialize
one or more connection pools (read settings out of a configuration file or
something - including the JDBC URL that the pool should use to create
connections form the underlying DB). Then when you want to get a
connection from the pool, you use the usual DriverManager routine with a
URL like jdbc:pool:poolname.  If there's a loose connection in the pool,
you get it.  Otherwise, it uses the preconfigured parameters to open a new
physical connection and puts it in the pool.  When you call close on the
connection, it gets marked as free in the pool (it isn't really closed).
        So the use of the connections would already fit in the
orb.jboss.jdbc.DataSourceImpl - you'd just give the pool's URL to the
DataSourceImpl in an <MLET> entry.  This would unfortunately result in
double-pooling with the current DataSourceImpl implementation, but that's
a minor change.
        Yhere are two loose ends here.  The first is how to initialize the
pool.  We could create a JMX helper class so you include an MLET tag in
the config file with the pool parameters, and the helper class will just
initialize the pool.  The other problem is how to shut down the pool - but
I guess this could be done the same way.

        Does that sound like the right track?  Will you be willing to drop
the pooling in the DataSourceImpl to work with this, or should I implement
a different data source or something?

        Finally, how should I get code to you?  Post it here?  There are
~10 classes (including JDBC wrappers to update "last used" times, etc.).

Thanks,
        Aaron

On Fri, 19 May 2000, marc fleury wrote:
> Do it in a plugin (I forgot to say)
> 
> marc


Reply via email to