dev@glassfish.java.net

Re: error creating jdbc connection pool

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Tue, 09 Nov 2010 13:30:24 -0800

Jagadish Prasath Ramu wrote on 11/ 9/10 12:40 AM:
> Please find my responses in-line.
>
> On Tue, 2010-11-09 at 00:13 -0800, Bill Shannon wrote:
>> I'm not sure what I'm supposed to do now. Does this mean that
>> I can never create a connection pool in b24?
>> Actually, it seems like the connection pool was created anyway,
>> despite the errors. But if I try to ping the connection pool,
>> it fails with the "Unable to open file /_cpds_0" error. What
>> does that mean?
> I am just cc-ed to an issue :
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=14358
> which shows the same exception.
>
> This seems to be due to the fact that empty properties of datasource
> (eg: TraceDirectory in the properties tab)
> are persisted in domain.xml and when they are applied to the datasource
> at runtime,
> they fail with the above exception.
> When the pool is created after removing empty properties, it works fine.
>
> IIRC, in GlassFish v2.x, empty properties were not persisted in
> domain.xml by admin console.
> I shall investigate this.

Thanks.

>> Also, its not clear to me how I know whether to choose a
>> DataSource, XADataSource, or ConnectionPoolDataSource. Since I'm
>> creating a connection pool, wouldn't I always want the latter?
> Not all database driver vendors may support all 3 variants.

The list is presented before the database vendor is chosen.
Shouldn't it be presented after, and the unsupported items removed?

>> And if the database supports XA, wouldn't I want that variant?
>> How do I choose?
> If one is sure that the application will be involved in Local
> Transaction, DS or CPDS can be chosen.

What criteria would I use to choose DataSource vs. ConnectionPoolDataSource?
I'm not required to choose ConnectionPoolDataSource if I want pooling?

Can I not do local transactions if I choose XADataSource?

>> Finally, what's the difference between "JavaDB" and "JavaDB-30"?
>> How do I know which one to choose?
> JavaDB-30 represents the JDBC 3.0 implementation of datasource from
> derby.
> [org.apache.derby.jdbc.ClientDataSource]
> JavaDB represents the latest (JDBC 4.0) implementation of datasource.
> [org.apache.derby.jdbc.ClientDataSource40]

This sure isn't clear from the list that's presented in the admin GUI.
Can the list include a description of each item?