RFR: 8223260: NamingManager should cache InitialContextFactory

Seán Coffey sean.coffey at oracle.com
Thu Feb 6 23:11:18 UTC 2020

On 6 February 2020 21:13:52 GMT, Peter Levart <peter.levart at gmail.com> wrote:
>On 2/6/20 6:54 PM, Seán Coffey wrote:
>> the current proposal is still:
>> http://cr.openjdk.java.net/~coffeys/webrev.8223260.v2/webrev/
>But wasn't this one already better:

D'oh! You're right Peter. v3 is my preference (and most up to date) at the moment. I'll look at Alan's comment in the morning. I could create a custom exception if the current UndeclaredThrowableException is not a good use.


>Or do you prefer the v2 so that spec change and behavior change would
>Regards, Peter
>> I'd like to make the specification change in a follow on bug ID (if 
>> that works for people)
>> Regards,
>> Sean.
>> On 06/02/20 17:49, Alan Bateman wrote:
>>> On 06/02/2020 15:32, Seán Coffey wrote:
>>>> InitialContextFactory itself is an extremely simple interface with 
>>>> one method. I've browsed some code bases and could only find a
>>>> number of such Factories implementations with simple logic to
>>>> a Context. Applications will most likely delegate to the same 
>>>> Factory over and over also (albeit, it's all controlled by
>>>> parameters). The new caching logic should help memory pressure here
>>>> and not hinder it. I'm not seeing a major concern with current 
>>>> solution as a result.
>>> Okay, although I could imagine a non-JDK InitialContextFactory 
>>> implementation keeping a graph of objects alive. I saw your mail 
>>> about separating the clarification in the APIs docs so does it mean 
>>> the proposal on the table is the last webrev or is there a new
>>> -Alan

More information about the core-libs-dev mailing list