Re: context classloader
От | Oliver Jowett |
---|---|
Тема | Re: context classloader |
Дата | |
Msg-id | 41ED96C4.9030401@opencloud.com обсуждение исходный текст |
Ответ на | context classloader (was: Re: 8.0 drivers released.) (Vadim Nasardinov <vadimn@redhat.com>) |
Ответы |
Re: context classloader
|
Список | pgsql-jdbc |
Vadim Nasardinov wrote: > Another reasonable course of action might be to try the context classloader: > http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Thread.html#getContextClassLoader%28%29 > > This would typically have the system classloader in its parent hierarchy, > but it may also give you access to locations that the system classloader > cannot see. I am of the opinion that thread context classloaders are evil and should be avoided if at all possible -- they make code fragile and sensitive to caller context (almost by definition!) Also it'd mean that we would have to load the defaults on every call to getConnection(), rather than once per Driver instance (i.e. most probably exactly once). Does it make sense to have the driver defaults change depending on who is obtaining the connection? -O
В списке pgsql-jdbc по дате отправления: