Hi Rick,
It's hard to imagine JNDIConnector being used by two different ServerPlatforms or SelverPlatform changing - so I don't think there is a real difference.
However logically the whole jndi lookup procedure seem to belong to ServerPlatform (and I would remove any remnants of lookup_type from JNDIConnector - but we have to be backward compatible).
From this perspective I would probably not cache jndi lookup type that comes from ServerPlatform, and also I would not introduce DEFAULT_LOOKUP_TYPE,
instead base ServerPlatform class would return the default type COMPOSITE_NAME_LOOKUP
Thanks,
Andrei
----- Original Message -----
From: curtisr7@xxxxxxxxx
To: eclipselink-dev@xxxxxxxxxxx
Sent: Friday, December 19, 2014 11:48:26 AM GMT -05:00 US/Canada Eastern
Subject: Re: [eclipselink-dev] Fwd: [Bug 455690] Add support to allow ServerPlatforms to do additional initialization
Andrei -
Thanks for the suggestion. I like that approach, but I have one implementation question. When JNDIConnector.connect is called and the lookupType is uninitialized (-1), should I cache the value returned from the ServerPlatform? I'm wondering if there is a scenario where a ServerPlatform instance could change but the JNDIConnector instance doesn't. Perhaps this isn't a valid scenario, but I don't have a deep enough understanding of the runtime to know. See the attached patch for details.
Thanks,
Rick