users@glassfish.java.net

Re: One Pager review request:V3 Connectors(Connectors, Pooling, JDBC) featu

From: <glassfish_at_javadesktop.org>
Date: Tue, 13 Jan 2009 03:25:17 PST

[i]> Section 4.1.1
>
> Why have the cache size set to zero by default?
> Would it make sense to have a 'small' cache by
> default? Is the search overhead that significant
> compared to the savings?
[/i]
Typically, statement caching is provided by most jdbc drivers. Hence this feature can be turned on when needed.

[i]> Is the cache shared across the whole server or is it
> set on a 'per-pool' basis?
[/i]
The cache settings are per pool, so you need to enable it per pool. There will be one cache per connection in the pool.

[i]> You discuss an attribute, statement-cache-size,
> but don't say what object(s) where it is applicable...
[/i]
section 4.1.1 defines the list of statements that will be cached. This
includes Statement, PreparedStatement, CallableStatement.

[i]
> A link to the dtd changes doc may be a good idea here...(though the name of
> the attribute here does not match any name in
> http://wiki.glassfish.java.net/Wiki.jsp?page=GFV3JDBCO
> nePager_DTDChanges&version=9
[/i]>
The DTD Changes page has a typo for this attribute. Will change it.

[i]> Is there a way to change the caching strategy in this
> release or will that be available in the future?
[/i]
Ability to specify other caching mechanisms will be done in future releases.

[i]> Why not extend the connection-validation-method
> attribute to accept the name of a custom validation
> class and eliminate the need to have two attributes
> (connection-validation-method and
> validator-class-name)?
[/i]
[b]custom-validation[/b] as a value for [b]connection-validation-method[/b] makes the attribute more meaningful.

[i]> Is there a list of 'common databases' or a table that
> maps the name of a 'common database' to the name of a
> validator-class-name?
[/i]
The implementation will maintain a list of custom validation mechanisms
(for faster optimized database routines) for some common databases.
 Section 4.5.1 mentions the class names of custom validation mechanisms
 for Derby, MySQL and Postgres databases.

[i]> You may want to consider making the connection
> validation a sub-element of jdbc-connection-pool. It
> will be hard to have an object that implements
> ConnectionValidator that has any parameters to it
> constructor... While objects with zero parameter
> constructors can be quite useful, the ability to have
> parameters passed to the constructor might make
> writing the validation routine a bit easier... just
> a thought...
[/i]Custom validation works to see if a connection is valid or not by executing the isValid() on the validation class name mentioned. What are the need for these extra parameters?


[i]> Section 4.1.3
>
> What happens if the SQL is not valid (like a syntax
> error)? [/i]
A SQLException will be thrown.

[/i]> What happens if the SQL causes an error in
> the DB?[/i]
A SEVERE message is thrown in the server.log with the error code and SQL state.

[i]> The discussion of constructors in my notes about
> section 4.1.2 probably apply to this list of
> sql-trace-listeners, too.[/i]
What are the need for these parameters in case of SQL tracing?

[i]> Section 4.1.5
>
> Why only a GUI feature? I would think the ability to
> find out this data would be useful for someone using
> the CLI to create a jdbc-connection-pool...[/i]
This is a GUI only feature because it can display a list of driver implementations which is not possible in CLI.

[i]> Will the driver be detected BEFORE the server is
> restarted or AFTER the server is restarted?[/i]
Will get back to you on this.

[i]> I also noticed that this feature wasn't listed in the
> 'GUI Support' subsection of section 4.7.[/i]
Will add this to the GUI support section.

[i]> Section 4.1.9
>
> The name of the attribute is clumsy... It is easy to
> assume that a pool (noun) will pool (verb) by
> default, so why bot just use a boolean attribute
> 'disabled', with a default of false.[/i]
The attribute cannot be made [b]disabled[/b] since other elements use the same attribute and would become too ambiguous. Also, we needed to be in sync with the existing com.sun.enterprise.connectors.SwitchoffACCConnectionPooling flag.

[i]> What is the difference between a pool that is
> switched off and a pool that has a max-pool-size of 1?[/i]
Similar to com.sun.enterprise.connectors.SwitchoffACCConnectionPooling, an UnpooledResource will be got whenever a pool is created and initialized when switch-off-pooling is true. The latter does not get an UnpooledResource.

[i]> What happens if the exception is thrown? Does the
> user see a warning in their log? Do their attempts to
> connect fail? Does the server just refuse to start? [/i]
A WARNING message along with an exception is logged in the server.log. The pool becomes unusable in this case.

[i]> Section 4.1.11
>
> The attribute name is clumsy... why not just use ping
> or ping-during-creation?[/i]
ping is a better attribute name. Ping happens during a creation as well as reconfiguration using a dotted name set. Hence ping-during-creation cannot be used. This information was not added in the one pager and will be added.

[i]> What is the semantics of the ping failing?[/i]
A warning is logged.

[i]> What does 'creation' mean in this context:
>
> 1. when the server starts?
>
> 2. when the first connection is made?
>
> 3. when the jdbc-connection-pool element is added to
> domain.xml?
>
> If it is #3, would it be better to just add a new
> command-line operator, like --ping?[/i]
Yes it is during #3 as well as during a reconfiguration of the attribute using a dotted name set. --ping sounds good.

Thanks,
Shalini.
[Message sent by forum member 'sm157516' (sm157516)]

http://forums.java.net/jive/thread.jspa?messageID=325509