Thread: ConnectionPoolDataSource submittal
Folks- I finished an implementation of the ConnectionPoolDataSource that is functional. I've included in this email the relavant code (tar, gziped): org/postgresql/PostgresqlConnectionPoolDataSource.java org/postgresql/psqlProps.properties org/postgresql/util/DefaultProperties.java org/postgresql/jdbc2/PostgresqlPooledConnection.java (What is the normal way to send in new files for the driver? Is attachment prefered?) They are also on my website at http://members.home.net/wolpert5/code/ as well. The only additions left to make is 1) Cleaning thread to close unused connections 2) Wrap objects returned by the connection so errors are caught on that level too. 3) Move all exceptions to throw PSQLException rather than SQLException. (So they'll use the errors.properties file instead of being hard coded.) I'll do these if people like the code I've submitted. The code should function properly, and is fully commented in the relavent areas. The DefaultProperties.java class I submited has also been updated; it nolonger throws exceptions due to read errors, and does not synchronize access to itself. Please comment on my submittial, and if I'm going about my updates correctly. (And if you have improvements for my code. :-) Thanks ===== Virtually, | "Must you shout too?" Ned Wolpert | -Dante wolpert@yahoo.com | _________________/ "Who watches the watchmen?" 4e75 -Juvenal, 120 AD -- Place your commercial here -- fnord __________________________________________________ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Attachment
I will save this for 7.3: http://216.55.132.35/cgi-bin/pgpatches2 --------------------------------------------------------------------------- > Folks- > > I finished an implementation of the ConnectionPoolDataSource that is > functional. I've included in this email the relavant code (tar, gziped): > > org/postgresql/PostgresqlConnectionPoolDataSource.java > org/postgresql/psqlProps.properties > org/postgresql/util/DefaultProperties.java > org/postgresql/jdbc2/PostgresqlPooledConnection.java > > (What is the normal way to send in new files for the driver? Is attachment > prefered?) They are also on my website at > http://members.home.net/wolpert5/code/ > as well. The only additions left to make is > > 1) Cleaning thread to close unused connections > 2) Wrap objects returned by the connection so errors are caught on that > level too. > 3) Move all exceptions to throw PSQLException rather than SQLException. > (So they'll use the errors.properties file instead of being hard > coded.) > > I'll do these if people like the code I've submitted. The code should > function properly, and is fully commented in the relavent areas. The > DefaultProperties.java class I submited has also been updated; it nolonger > > throws exceptions due to read errors, and does not synchronize access to > itself. Please comment on my submittial, and if I'm going about my > updates > correctly. (And if you have improvements for my code. :-) > > Thanks > > ===== > Virtually, | "Must you shout too?" > Ned Wolpert | -Dante > wolpert@yahoo.com | > _________________/ "Who watches the watchmen?" > 4e75 -Juvenal, 120 AD > > -- Place your commercial here -- fnord > > __________________________________________________ > Do You Yahoo!? > Find a job, post your resume. > http://careers.yahoo.com > Content-Description: codeSubmittal.tgz [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Ned, I didn't forget about this code, I am waiting until version 7.2 is released, and then I will commit it to cvs. DAve -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Ned Wolpert Sent: Monday, December 03, 2001 11:05 AM To: Barry Lind; Bruce Momjian Cc: psql-jdbc Subject: [JDBC] ConnectionPoolDataSource submittal Folks- I finished an implementation of the ConnectionPoolDataSource that is functional. I've included in this email the relavant code (tar, gziped): org/postgresql/PostgresqlConnectionPoolDataSource.java org/postgresql/psqlProps.properties org/postgresql/util/DefaultProperties.java org/postgresql/jdbc2/PostgresqlPooledConnection.java (What is the normal way to send in new files for the driver? Is attachment prefered?) They are also on my website at http://members.home.net/wolpert5/code/ as well. The only additions left to make is 1) Cleaning thread to close unused connections 2) Wrap objects returned by the connection so errors are caught on that level too. 3) Move all exceptions to throw PSQLException rather than SQLException. (So they'll use the errors.properties file instead of being hard coded.) I'll do these if people like the code I've submitted. The code should function properly, and is fully commented in the relavent areas. The DefaultProperties.java class I submited has also been updated; it nolonger throws exceptions due to read errors, and does not synchronize access to itself. Please comment on my submittial, and if I'm going about my updates correctly. (And if you have improvements for my code. :-) Thanks ===== Virtually, | "Must you shout too?" Ned Wolpert | -Dante wolpert@yahoo.com | _________________/ "Who watches the watchmen?" 4e75 -Juvenal, 120 AD -- Place your commercial here -- fnord __________________________________________________ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Whoops. Sorry about that. I accidently resent my original message. (Didn't mean to spam the list.) I have a new update to my classes that I'll send in after 7.2 is released. If you want, I can send in my new changes this week instead, though. My changes include 1) Renamding psqlProps.properties to pgDriver.properties 2) Wrapping each statement so that the driver can catch their errors so 3) Connections are removed in case of error 4) Alittle better pooling 5) Moved exception names into the errors.properties file So don't hold on to those classes I sent. Wait for my new ones. Thanks. On 03-Dec-2001 Bruce Momjian wrote: > > I will save this for 7.3: > > http://216.55.132.35/cgi-bin/pgpatches2 > > > --------------------------------------------------------------------------- > >> Folks- >> >> I finished an implementation of the ConnectionPoolDataSource that is >> functional. I've included in this email the relavant code (tar, gziped): >> >> org/postgresql/PostgresqlConnectionPoolDataSource.java >> org/postgresql/psqlProps.properties >> org/postgresql/util/DefaultProperties.java >> org/postgresql/jdbc2/PostgresqlPooledConnection.java >> >> (What is the normal way to send in new files for the driver? Is attachment >> prefered?) They are also on my website at >> http://members.home.net/wolpert5/code/ >> as well. The only additions left to make is >> >> 1) Cleaning thread to close unused connections >> 2) Wrap objects returned by the connection so errors are caught on that >> level too. >> 3) Move all exceptions to throw PSQLException rather than SQLException. >> (So they'll use the errors.properties file instead of being hard >> coded.) >> >> I'll do these if people like the code I've submitted. The code should >> function properly, and is fully commented in the relavent areas. The >> DefaultProperties.java class I submited has also been updated; it nolonger >> >> throws exceptions due to read errors, and does not synchronize access to >> itself. Please comment on my submittial, and if I'm going about my >> updates >> correctly. (And if you have improvements for my code. :-) >> >> Thanks >> >> ===== >> Virtually, | "Must you shout too?" >> Ned Wolpert | -Dante >> wolpert@yahoo.com | >> _________________/ "Who watches the watchmen?" Virtually, Ned Wolpert <ned.wolpert@knowledgenet.com> D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8C7DYiysnOdCML0URAr2YAJ4+AwFVRIkTeO6u7OuSWwm1iF+BgQCdFV/H chuZ31eZaSuqqyYiXRY0FgY= =fvXX -----END PGP SIGNATURE-----
Ned, can get get the newest versions for inclusion in 7.3? --------------------------------------------------------------------------- Ned Wolpert wrote: -- Start of PGP signed section. > Whoops. Sorry about that. I accidently resent my original message. (Didn't > mean to spam the list.) > > I have a new update to my classes that I'll send in after 7.2 is released. > If you want, I can send in my new changes this week instead, though. My > changes include > 1) Renamding psqlProps.properties to pgDriver.properties > 2) Wrapping each statement so that the driver can catch their errors so > 3) Connections are removed in case of error > 4) Alittle better pooling > 5) Moved exception names into the errors.properties file > > So don't hold on to those classes I sent. Wait for my new ones. > > Thanks. > > > On 03-Dec-2001 Bruce Momjian wrote: > > > > I will save this for 7.3: > > > > http://216.55.132.35/cgi-bin/pgpatches2 > > > > > > --------------------------------------------------------------------------- > > > >> Folks- > >> > >> I finished an implementation of the ConnectionPoolDataSource that is > >> functional. I've included in this email the relavant code (tar, gziped): > >> > >> org/postgresql/PostgresqlConnectionPoolDataSource.java > >> org/postgresql/psqlProps.properties > >> org/postgresql/util/DefaultProperties.java > >> org/postgresql/jdbc2/PostgresqlPooledConnection.java > >> > >> (What is the normal way to send in new files for the driver? Is attachment > >> prefered?) They are also on my website at > >> http://members.home.net/wolpert5/code/ > >> as well. The only additions left to make is > >> > >> 1) Cleaning thread to close unused connections > >> 2) Wrap objects returned by the connection so errors are caught on that > >> level too. > >> 3) Move all exceptions to throw PSQLException rather than SQLException. > >> (So they'll use the errors.properties file instead of being hard > >> coded.) > >> > >> I'll do these if people like the code I've submitted. The code should > >> function properly, and is fully commented in the relavent areas. The > >> DefaultProperties.java class I submited has also been updated; it nolonger > >> > >> throws exceptions due to read errors, and does not synchronize access to > >> itself. Please comment on my submittial, and if I'm going about my > >> updates > >> correctly. (And if you have improvements for my code. :-) > >> > >> Thanks > >> > >> ===== > >> Virtually, | "Must you shout too?" > >> Ned Wolpert | -Dante > >> wolpert@yahoo.com | > >> _________________/ "Who watches the watchmen?" > > > Virtually, > Ned Wolpert <ned.wolpert@knowledgenet.com> > > D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45 -- End of PGP signed section. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce- Sure. I have to do it this weekend. Note that this contains changes to the DefaultProperties.java patch that you have planned to go into 7.3, so you might want to hold off on doing that one until I get you the new code. On Fri, 2002-02-22 at 12:53, Bruce Momjian wrote: > > Ned, can get get the newest versions for inclusion in 7.3? > > --------------------------------------------------------------------------- > > Ned Wolpert wrote: > -- Start of PGP signed section. > > Whoops. Sorry about that. I accidently resent my original message. (Didn't > > mean to spam the list.) > > > > I have a new update to my classes that I'll send in after 7.2 is released. > > If you want, I can send in my new changes this week instead, though. My > > changes include > > 1) Renamding psqlProps.properties to pgDriver.properties > > 2) Wrapping each statement so that the driver can catch their errors so > > 3) Connections are removed in case of error > > 4) Alittle better pooling > > 5) Moved exception names into the errors.properties file > > > > So don't hold on to those classes I sent. Wait for my new ones. > > > > Thanks. > > > > > > On 03-Dec-2001 Bruce Momjian wrote: > > > > > > I will save this for 7.3: > > > > > > http://216.55.132.35/cgi-bin/pgpatches2 > > > > > > > > > --------------------------------------------------------------------------- > > > > > >> Folks- > > >> > > >> I finished an implementation of the ConnectionPoolDataSource that is > > >> functional. I've included in this email the relavant code (tar, gziped): > > >> > > >> org/postgresql/PostgresqlConnectionPoolDataSource.java > > >> org/postgresql/psqlProps.properties > > >> org/postgresql/util/DefaultProperties.java > > >> org/postgresql/jdbc2/PostgresqlPooledConnection.java > > >> > > >> (What is the normal way to send in new files for the driver? Is attachment > > >> prefered?) They are also on my website at > > >> http://members.home.net/wolpert5/code/ > > >> as well. The only additions left to make is > > >> > > >> 1) Cleaning thread to close unused connections > > >> 2) Wrap objects returned by the connection so errors are caught on that > > >> level too. > > >> 3) Move all exceptions to throw PSQLException rather than SQLException. > > >> (So they'll use the errors.properties file instead of being hard > > >> coded.) > > >> > > >> I'll do these if people like the code I've submitted. The code should > > >> function properly, and is fully commented in the relavent areas. The > > >> DefaultProperties.java class I submited has also been updated; it nolonger > > >> > > >> throws exceptions due to read errors, and does not synchronize access to > > >> itself. Please comment on my submittial, and if I'm going about my > > >> updates > > >> correctly. (And if you have improvements for my code. :-) > > >> > > >> Thanks > > >> > > >> ===== > > >> Virtually, | "Must you shout too?" > > >> Ned Wolpert | -Dante > > >> wolpert@yahoo.com | > > >> _________________/ "Who watches the watchmen?" > > > > > > Virtually, > > Ned Wolpert <ned.wolpert@knowledgenet.com> > > > > D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45 -- End of PGP signed section. > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 853-3000 > + If your life is a hard drive, | 830 Blythe Avenue > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 -- Virtually, Ned Wolpert <ned.wolpert@knowledgenet.com> D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45
Attachment
Ned Wolpert wrote: Checking application/pgp-signature: FAILURE -- Start of PGP signed section. > Bruce- > > Sure. I have to do it this weekend. Note that this contains changes > to the DefaultProperties.java patch that you have planned to go into > 7.3, so you might want to hold off on doing that one until I get you the > new code. OK, let me know how you want it handled. If a jdbc maintainer will tell me, I can get your DefaultProperties.java in right away or wait and discard it. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Currently, no one is using DefaultProperties as of yet... I'll be the first. The pooled connection uses it mostly. The only thing in DefaultProperties that I changed was the name of the property file to be used... I stopped using psqlProps.properties and changed it to pgsqlDriver.properties instead. But I figure its easier to check in the 6 files I've got in one push. On Fri, 2002-02-22 at 12:57, Bruce Momjian wrote: > Ned Wolpert wrote: > > Checking application/pgp-signature: FAILURE > -- Start of PGP signed section. > > Bruce- > > > > Sure. I have to do it this weekend. Note that this contains changes > > to the DefaultProperties.java patch that you have planned to go into > > 7.3, so you might want to hold off on doing that one until I get you the > > new code. > > OK, let me know how you want it handled. If a jdbc maintainer will tell > me, I can get your DefaultProperties.java in right away or wait and > discard it. > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 853-3000 > + If your life is a hard drive, | 830 Blythe Avenue > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 -- Virtually, Ned Wolpert <ned.wolpert@knowledgenet.com> D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45
Attachment
OK, original DefaultProperties patch deleted. --------------------------------------------------------------------------- Ned Wolpert wrote: Checking application/pgp-signature: FAILURE -- Start of PGP signed section. > Currently, no one is using DefaultProperties as of yet... I'll be the > first. The pooled connection uses it mostly. > > The only thing in DefaultProperties that I changed was the name of the > property file to be used... I stopped using psqlProps.properties and > changed it to pgsqlDriver.properties instead. But I figure its easier > to check in the 6 files I've got in one push. > > On Fri, 2002-02-22 at 12:57, Bruce Momjian wrote: > > Ned Wolpert wrote: > > > > Checking application/pgp-signature: FAILURE > > -- Start of PGP signed section. > > > Bruce- > > > > > > Sure. I have to do it this weekend. Note that this contains changes > > > to the DefaultProperties.java patch that you have planned to go into > > > 7.3, so you might want to hold off on doing that one until I get you the > > > new code. > > > > OK, let me know how you want it handled. If a jdbc maintainer will tell > > me, I can get your DefaultProperties.java in right away or wait and > > discard it. > > > > -- > > Bruce Momjian | http://candle.pha.pa.us > > pgman@candle.pha.pa.us | (610) 853-3000 > > + If your life is a hard drive, | 830 Blythe Avenue > > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > -- > > Virtually, > Ned Wolpert <ned.wolpert@knowledgenet.com> > > D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45 -- End of PGP section, PGP failed! -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce, Not much sense putting it in now if Ned is going to change it. Dave -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Bruce Momjian Sent: Friday, February 22, 2002 2:58 PM To: Ned Wolpert Cc: psql-jdbc; Barry Lind; Ned Wolpert Subject: Re: [JDBC] ConnectionPoolDataSource submittal Ned Wolpert wrote: Checking application/pgp-signature: FAILURE -- Start of PGP signed section. > Bruce- > > Sure. I have to do it this weekend. Note that this contains > changes to the DefaultProperties.java patch that you have planned to > go into 7.3, so you might want to hold off on doing that one until I > get you the new code. OK, let me know how you want it handled. If a jdbc maintainer will tell me, I can get your DefaultProperties.java in right away or wait and discard it. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
Is there an estimated time when the connection pool driver will be released? Thanks. Sean ----- Original Message ----- From: "Dave Cramer" <Dave@micro-automation.net> To: "'Bruce Momjian'" <pgman@candle.pha.pa.us>; "'Ned Wolpert'" <ned.wolpert@knowledgenet.com> Cc: "'psql-jdbc'" <pgsql-jdbc@postgresql.org>; "'Barry Lind'" <barry@xythos.com>; "'Ned Wolpert'" <wolpert@yahoo.com> Sent: Friday, February 22, 2002 2:13 PM Subject: Re: [JDBC] ConnectionPoolDataSource submittal > Bruce, > > Not much sense putting it in now if Ned is going to change it. > > Dave > > -----Original Message----- > From: pgsql-jdbc-owner@postgresql.org > [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Bruce Momjian > Sent: Friday, February 22, 2002 2:58 PM > To: Ned Wolpert > Cc: psql-jdbc; Barry Lind; Ned Wolpert > Subject: Re: [JDBC] ConnectionPoolDataSource submittal > > > Ned Wolpert wrote: > > Checking application/pgp-signature: FAILURE > -- Start of PGP signed section. > > Bruce- > > > > Sure. I have to do it this weekend. Note that this contains > > changes to the DefaultProperties.java patch that you have planned to > > go into 7.3, so you might want to hold off on doing that one until I > > get you the new code. > > OK, let me know how you want it handled. If a jdbc maintainer will tell > me, I can get your DefaultProperties.java in right away or wait and > discard it. > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 853-3000 > + If your life is a hard drive, | 830 Blythe Avenue > + Christ can be your backup. | Drexel Hill, Pennsylvania > 19026 > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster
It won't be 'released' until 7.3. Its a new feature, not a bug-fix. But it will be in CVS soon. (I didn't get a chance to finish it yesterday, so I'm going to try tonight.) On Fri, 2002-02-22 at 16:15, Sean Alphonse wrote: > Is there an estimated time when the connection pool driver will be released? > > Thanks. > > Sean > ----- Original Message ----- > From: "Dave Cramer" <Dave@micro-automation.net> > To: "'Bruce Momjian'" <pgman@candle.pha.pa.us>; "'Ned Wolpert'" > <ned.wolpert@knowledgenet.com> > Cc: "'psql-jdbc'" <pgsql-jdbc@postgresql.org>; "'Barry Lind'" > <barry@xythos.com>; "'Ned Wolpert'" <wolpert@yahoo.com> > Sent: Friday, February 22, 2002 2:13 PM > Subject: Re: [JDBC] ConnectionPoolDataSource submittal > > > > Bruce, > > > > Not much sense putting it in now if Ned is going to change it. > > > > Dave > > > > -----Original Message----- > > From: pgsql-jdbc-owner@postgresql.org > > [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Bruce Momjian > > Sent: Friday, February 22, 2002 2:58 PM > > To: Ned Wolpert > > Cc: psql-jdbc; Barry Lind; Ned Wolpert > > Subject: Re: [JDBC] ConnectionPoolDataSource submittal > > > > > > Ned Wolpert wrote: > > > > Checking application/pgp-signature: FAILURE > > -- Start of PGP signed section. > > > Bruce- > > > > > > Sure. I have to do it this weekend. Note that this contains > > > changes to the DefaultProperties.java patch that you have planned to > > > go into 7.3, so you might want to hold off on doing that one until I > > > get you the new code. > > > > OK, let me know how you want it handled. If a jdbc maintainer will tell > > me, I can get your DefaultProperties.java in right away or wait and > > discard it. > > > > -- > > Bruce Momjian | http://candle.pha.pa.us > > pgman@candle.pha.pa.us | (610) 853-3000 > > + If your life is a hard drive, | 830 Blythe Avenue > > + Christ can be your backup. | Drexel Hill, Pennsylvania > > 19026 > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 4: Don't 'kill -9' the postmaster > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 4: Don't 'kill -9' the postmaster > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org -- Virtually, Ned Wolpert <ned.wolpert@knowledgenet.com> D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45