Subject | Re: Firebirdsql and Tomcat Connection pooling, how t o use it? |
---|---|
Author | patcom123 |
Post date | 2002-01-28T23:40:37Z |
--- In IB-Java@y..., "rrokytskyy" <rrokytskyy@y...> wrote:
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
> > This is interesting, you have SYSDBA in uppercase.. I wonder ifconnection
> > that makes a difference? I haven't checked if the older
> > methods do case conversion... I'm using Tomcat not Jboss, but i'mI thought so too, but i did notice that IB-Console uses all
> > 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.
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