users@glassfish.java.net

Re: Additional properties in connection pools

From: Jagadish Prasath Ramu <jagadish.ramu_at_oracle.com>
Date: Wed, 16 May 2012 23:29:04 +0530

Yes, the additional properties in the pool are meant for setters of the
bean (DataSource) attribute.

Thanks,
-Jagadish

On Wed, 2012-05-16 at 13:14 -0400, Laird Nelson wrote:
> I'm untangling an Informix documentation error and trying to
> understand what the interaction is between the Additional Properties
> tab in a connection pool and the underlying DataSource implementation
> supplied by the vendor.
>
>
> Informix has an utterly bizarre convention where you can set an
> "environment variable" in a JDBC URL. If you do this, then it is
> effectively applied at the server level. Nice.
>
>
> However, if you specify one of these "environment variables" in the
> additional properties section of a connection pool, Glassfish throws a
> NullPointerException (well, it's probably the underlying Informix
> driver, I'd guess, atlhough there's not a stack trace to prove it).
>
>
> Instead, if you prefix the environment variable name with "ifx", then
> the property goes through fine.
>
>
> Interestingly, the Informix DataSource implementation has a bunch of
> getters and setters that start with, e.g., "setIfx". So you might
> have, for example, setIfxIFXHOST().
>
>
> I'm guessing that the connection pool "additional properties" tab
> simply takes its property names and tries to call bean setters on the
> underlying data source implementation? Hence a property name of
> ifxIFXHOST and a value of "fred" would get routed to
> InformixDataSourceImplementation#setIfxIFXHOST("fred")?
>
>
> (Otherwise I can't even begin to explain what's going on. :-))
>
>
> Thanks,
> Laird
>
>
> --
> http://about.me/lairdnelson
>
>