[Opensource] How can i do to add limitation position in oracle.
liuhey
liuhey at neusoft.com
Tue Nov 18 16:46:50 PST 2003
It is in the createNewConnection() method. The connection is just created. It is not from the connection pool.
For example , we have created a connection. It is the first connection and we set the properties of it. It is ok.
When it is in use, another request comes . There isn't an available connection in the pool and we haven't exceed the max connection limitation.
So we create a new connection but we haven't set its properties because it isn't the first connection .
When its properties are default . No problem . If it isn't ,the connection will have wrong properties.
----- Original Message -----
From: "larry hamel" <expresso at codeguild.com>
To: <opensource at jcorporate.com>
Sent: Wednesday, November 19, 2003 2:36 AM
Subject: Re: [Opensource] How can i do to add limitation position in oracle.
> Connections objects remain in the pool after their first usage. therefore, their properties are set just once, when they are first used.
>
> larry
>
> At 04:47 AM 11/18/2003, you wrote:
>
> >>From the email of Mike, I know Expresso 5.3 RC-6 will come out .
> >I have found a bug in Expresso 5.3 RC-5. I don't know it has been fixed or not in Expresso 5.3 RC-6.
> >The bug is in com.jcorporate.expresso.core.db.DBConnectionPool .
> >
> > protected synchronized DBConnection createNewConnection() throws DBException{
> > ........
> > if (firstConnection) {
> > initialized = true;
> > .........
> > //Added so that limitation syntax is properly set for the connection
> > oneConnection.setLimitationPosition(this.limitationPosition);
> > oneConnection.setLimitationSyntax(this.limitationSyntax);
> > oneConnection.setEscapeHandler(this.escapeHandler);
> >
> > }
> >}
> >>From the code ,you can see that we just set properties of DBConnection just when it is first connection .
> >But this is wrong , we should set the properties of the connection for every new connection.
> >So I think the code should be this:
> > protected synchronized DBConnection createNewConnection() throws DBException{
> > ........
> > if (firstConnection) {
> > initialized = true;
> > .........
> > }
> > //Added so that limitation syntax is properly set for the connection
> > oneConnection.setLimitationPosition(this.limitationPosition);
> > oneConnection.setLimitationSyntax(this.limitationSyntax);
> > oneConnection.setEscapeHandler(this.escapeHandler);
> >}
> >
> >_______________________________________________
> >Opensource mailing list
> >Opensource at jcorporate.com
> >http://mail.jcorporate.com/mailman/listinfo/opensource
> >Archives: http://mail.jcorporate.com/pipermail/opensource/
>
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
> http://mail.jcorporate.com/mailman/listinfo/opensource
> Archives: http://mail.jcorporate.com/pipermail/opensource/
>
More information about the Opensource
mailing list