users@javaee-spec.java.net

[javaee-spec users] Re: Improving data-source element with facility for vendor specific pool settings?

From: arjan tijms <arjan.tijms_at_gmail.com>
Date: Sat, 14 Feb 2015 13:27:42 +0100

Hi,

On Sat, Feb 14, 2015 at 1:57 AM, Bill Shannon <bill.shannon_at_oracle.com> wrote:
> We would recommend that the connection pool properties not be of a form
> that could be confused with the JavaBeans properties on the DataSource,
> e.g., "org.glassfish.useStrictMin" or "use-strict-min".

That would absolutely work indeed, and I was indeed thinking of
something similar.

Unfortunately, that's not how it's being adopted in practice. As per
the example above, IBM uses connection pool properties named
"agedTimeout", "authDataAlias", etc. which all could be properties for
the DataSource just as well.

Perhaps the spec should at least express this recommendation? Better
would be an actual separation, but in absence of that just stating the
recommendation would already be a huge step up.

> As I understand it, GlassFish currently doesn't set anything on the
> pool either. We just haven't gotten around to implementing that because
> there hasn't been demand for it.

Well, I can express a demand for that ;) I'l create an issue for it
then at the GlassFish jira.

> The only thing I can think of is requiring that *if* the vendor's
> connection pool has configurable properties, there must be a way to
> set them through properties in the DataSourceDefinition. But I think
> that might be going too far since it's getting into a very implementation
> specific area. Plus, it would be essentially untestable.

It would be untestable indeed, which as we've seen with some other
specs not rarely means it just doesn't happen, or doesn't happen
correctly.

Here too though, just stating that the vendor *must* do this *if*
there are configurable connection pool properties does make the
situation better. At the very least it will be easier for people to
address the individual vendors. I.e. it's much easier for me if I go
to vendor X and say "The spec says you should or must do this and
that, but you are not doing it", vs "I'd like to have this feature or
enhancement, could you add it?".

Kind regards,
Arjan Tijms