From: | Ned Wolpert <wolpert(at)yahoo(dot)com> |
---|---|
To: | Dave(at)micro-automation(dot)net, pgsql-jdbc(at)postgresql(dot)org, "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | "'Dave Cramer'" <Dave(at)micro-automation(dot)net>, "'Barry Lind'" <barry(at)xythos(dot)com> |
Subject: | Re: Default configuration file |
Date: | 2001-11-02 18:22:45 |
Message-ID: | 20011102182245.35211.qmail@web13401.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
--- Dave Cramer <Dave(at)micro-automation(dot)net> wrote:
> Looks good so far... I haven't had a chance to really read it, but I am
> wondering about a synchronized method that can block? Specifically
> getPooledConnection.
Actually, I punted on that one. Reason I did it was that creating a
new Properties could fail due to an IOException. However, if I make
the 'reload()' method catch the exception, then I can have the static
var be created at construction time. (Like this)
private static DefaultProperties self = new DefaultProperties();
public static DefaultProperties getDefaultProperties() {
return self;
}
I use the term 'punted' since I didn't know if developers would rather
a) check that the singleton is null, b) get an empty DefaultProperties
object or c) handle the exception of an IOException. For this case, I
allowed the singleton to be null, and made it not a true singleton by
giving people the option to create their own instance.
Votes on proper behavior? I guess it makes sense to catch the exception
internally, and behave as if the DefaultProperties is empty should an
IOException occur.
=====
Virtually, | "Must you shout too?"
Ned Wolpert | -Dante
wolpert(at)yahoo(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Nick Fankhauser | 2001-11-02 18:26:39 | Re: Staroffice, druid, dbvisualizer compatability |
Previous Message | Dave Cramer | 2001-11-02 17:59:54 | Re: Default configuration file |