Subject Re: [Firebird-Java] Re: firebird conection pool and glassfish
Author Mark Rotteveel
On Mon, 18 Feb 2013 19:33:55 -0000, "p.bondar" <p.bondar@...> wrote:
>> Don't use the class from org.firebirdsql.pool; they are known to be
>> broken, especially when used in combination with an Application server
>> connection pool.
>>
>> The full stacktrace would have helped to pin the problem down with
>> org.firebirdsql.ds.FBConnectionPoolDataSource, but with some trying I
>> can get that error if I don't specify the serverName property.
>>
>> At minimum you need to specify the following properties:
>>
>> serverName (with hostname or IP address)
>> databaseName (with path or alias of the database)
>> user (Firebird username)
>> password (Firebird password)
>>
>> Instead of the properties serverName, portNumber and databaseName you
>> can also use one property:
>> database (with <server>[/<port>]:<path-or-alias>, where the
>> portnumber is optional)
>>
>> I would advise not to use the "database" property as it is non-standard

>> (JDBC defines the serverName, databaseName and portNumber properties),
>> and we might remove it in the future.
>
> Used org.firebirdsql.ds.FBConnectionPoolDataSource following error:
> javax.servlet.jsp.JspException: Unable to get connection, DataSource
> invalid: "java.sql.SQLException: Error in allocating a connection.
Cause:
> Connection could not be allocated because: GDS Exception. 0. Connection
> string missing"
>
> With these settings,glassfish-resources.xml:

> wrap-jdbc-objects = "false">    <property name="URL"
>
value="jdbc:firebirdsql:localhost/3150:D:/java/base/DATABSEIFPWAFCAD.fdb"/>    <property
> name="User" value="SYSDBA"/>    <property name="Password"
> value="masterkey"/>  </ Jdbc-connection-pool></ Resources>

There is the problem: the DataSource or ConnectionPoolDataSource
implementations in Jaybird have no property 'URL' (see the releasenotes,
section 'JDBC connection properties' for a list of the supported
properties).

Instead of URL, you need to specify these three properties:
serverName : localhost
portNumber : 3150 (btw: the default port of Firebird is 3050)
databaseName : D:/java/base/DATABSEIFPWAFCAD.fdb

Mark