Re: New pooling (Long) [Was RE: Updates to the driver]

From: Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com>
To: "Shevland, Joseph (AU - Hobart)" <jshevland(at)deloitte(dot)com(dot)au>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: New pooling (Long) [Was RE: Updates to the driver]
Date: 2001-11-01 23:30:29
Message-ID: XFMail.20011101163029.ned.wolpert@knowledgenet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01-Nov-2001 Shevland, Joseph (AU - Hobart) wrote:
>> 3) In a JNDI layer, it 'almost' makes sense for a the
>> connection pool to ma
>
> Oops, chopped this one off...

I didn't get any comments above this one... is it missing any>

> How about maybe a configuration item in the default properties file that
> says 'I'm not going to read any further property files'... for the case
> where the administrator bundles up a JAR with the settings he/she wants the
> user to use and not override (on an OS or instance where the user cannot
> simply modify the JAR that is or create another one to use).

Well, execept that programmatically, the user of the connection pool can
still enter in things like servername, database, etc. The properties allow
it to be done without requiring programmatically changes. If someone has
access to the ConnectonPoolDataSource that I have listed, then they could
change it.

Actually, what's needed is a 'SecureDataSource' which is the result of the
user lookup in the JNDI namespace. That one does not allow changes outside
of the configured version. I'd add that in as an option once its working.

> I like the idea of having separate named pools (I'm not sure if it makes
> sense in this particular case, might do). So I can create a pool called
> 'read-only', one called 'dostuff-with-this-username' etc. It'd also be nice
> to be able to specify different configs for each of the different pools
> (with defaults) aka Poolman style. I've only recently started using Poolman
> but it has some features I'd like to see in this beast like a 'soft
> maximum', which if set means the driver will create connections above the
> maximum if requested, but will close these connections when finished with
> (as opposed to keeping them in the pool). The alternative is to wait until
> a connection in the pool becomes available. There's a few other features
> that would be nice.

Actually, poolman is my inspiration for the pooling agent I'm writing. The
soft-limits in poolman are implemented in my version as
'minFreeUnusedConnections'. Meaning that there is a min number of
connections and max, as normal. But keep at least x number of connections
free as long as the max isn't reached. PoolMan makes it so you can exceede
the max, which I'm not too keen on personally, but a feature to add if
people want.

Of course, another option is to just use poolman. :-) My intention to this
pool is to first make a basic pooling system that is available by default
with the driver. However, people can always pick more specific-feature rich
pooling agents like PoolMan if needed. (Or tyrex, if people like that one.)
I go by the KISS principle... keeping it simple to start with, and add
features once its working.

> I think its a good idea to centralise all this functionality into one spot,

Yeah, I'm going to have a properties-reader class (as a singleton) which I'll
propose to be in the utils directory.

Virtually,
Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com>

D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE74dsViysnOdCML0URAtKCAJ0dupCXfJ/9DjbEPeVMqiTtkdOXXACfcPQK
ysToTnPFKT4W+NsvMYjpyJg=
=PscP
-----END PGP SIGNATURE-----

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Neil Zanella 2001-11-02 04:15:43 jdbc example: java.lang.NoClassDefFoundError
Previous Message Shevland, Joseph (AU - Hobart) 2001-11-01 23:08:26 Re: New pooling (Long) [Was RE: Updates to the driver]