Subject Re: Firebirdsql and Tomcat Connection pooling, how t o use it?
Author patcom123
--- In IB-Java@y..., "rrokytskyy" <rrokytskyy@y...> wrote:
> > This is interesting, you have SYSDBA in uppercase.. I wonder if
> > that makes a difference? I haven't checked if the older
connection
> > methods do case conversion... I'm using Tomcat not Jboss, but i'm
> > hoping/assuming a similar connection is occuring?
>
> At least when I use this driver in JDBC Explorer I can use "sysdba"
> in lowercase. So, "old-fashion" java.sql.Connection accepts it.

I thought so too, but i did notice that IB-Console uses all
uppercase. Anyway, its not that:) I've found the problem...

There is a bug in FBWrappingDataSource, for which a quick fix is
below:

The setUser (and password) functions currently creates a new
ConnectionRequestInfo object, sets the parameter and then lets the
garbage collector trash it. Changing setUser to something like the
following fixes it, but i'm wondering if there is a better way of
doing it? (eg add a getCRI and not getDefaultCRI, which doesn't clone
the original? or removing the wrapper altogether?)

public void setUser(String userName){
FBConnectionRequestInfo cri=mcf.getDefaultConnectionRequestInfo();
cri.setUser(userName);
mcf.setConnectionRequestInfo(cri);
}

Apart from that, it seems to work fine:)


JOHN