[9] Review request JDK-8131334: SAAJ Plugability Layer: using java.util.ServiceLoader

Deva Sagar deva.sagar at oracle.com
Thu Oct 1 14:53:48 UTC 2015


Hi Miran,

My personal opinion is to prefer the more defensive approach instead of introducing a new abstract method, even though it would be more consistent with other factories to add the new abstract method. The spec doesn’t require _all_ factories to delegate to SAAJMetaFactory as I understand. 

Also the current API docs on SAAJMetaFactory explicitly refer only to the 2 factories mentioned.

Thanks,
Deva

> On Oct 1, 2015, at 4:26 AM, Miroslav Kos <miroslav.kos at oracle.com> wrote:
> 
> 
> 
> On 30/09/15 17:31, Miroslav Kos wrote:
>> On 30/09/15 16:50, Georgiy Rakov wrote:
>>> 2. This is not related to ServiceLoader feature, but anyway - SAAJMetaFactory.java:
>>>   30 * SAAJ API. All of the {@code newInstance} methods defined on factories in
>>>   31 * SAAJ 1.3 defer to instances of this class to do the actual object creation.
>>> Namely it says that all the newInstance methods defined on factories delegate factory creation to SAAJMetaFactory instances, but this seems to be not exactly true because SOAPConnectionFactory is not created by SAAJMetaFactory instance.
>> Yes, good catch. To fix it, it would be good to add a new abstract method 
>> public abstract SOAPConnectionFactory newSOAPConnectionFactory() 
>>     throws SOAPException, UnsupportedOperationException
>> 
>> Would you agree, Deva, Chen? There is a problem with backwards compatibility here ... More defensive would be to name the two factories instead of saying "all"?
> Any opinion on this, anybody?
> 
> Thanks
> Miran
> 
> 
>> 
>> Thanks
>> Miran
>> 
>> Btw. I sent this RFR initially to wrong mailing lists, would you check when answering that it's to  Core-Libs-Dev  <mailto:core-libs-dev at openjdk.java.net><core-libs-dev at openjdk.java.net> <mailto:core-libs-dev at openjdk.java.net> ?
>> 
>>> 
>>> Thank you,
>>> Georgiy.
>>> 
>> 
> 




More information about the core-libs-dev mailing list