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

Georgiy Rakov georgiy.rakov at oracle.com
Fri Oct 2 14:21:19 UTC 2015



On 02.10.2015 15:41, Miroslav Kos wrote:
> Hi Georgiy,
> would you be ok with this defensive solution?
>
> Thanks
> Miran
>
>
> On 01/10/15 17:10, Miroslav Kos wrote:
>> Hi,
>>
>> there is a new version of specdiff:
>> http://cr.openjdk.java.net/~mkos/8131334/specdiff.06/index.html
>>
>> To remind, there were two problems to be addressed, both related to 
>> SAAJMetaFactory:
>> http://cr.openjdk.java.net/~mkos/8131334/specdiff.06/javax/xml/soap/SAAJMetaFactory.html
>>
>> 1) hidden feature of lookup mechanism for SAAJMetaFactory:
>> I added two new paragraphs into javadoc
>> - one references the service loader facility
>> - the second one mentions additional steps and references the 
>> algorithm in javax.xml.soap package desc
>>
According to the spec ofSAAJMetaFactory.newInstance method there is the 
last step of lookup procedure:

* <LI>Default to 
com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl.

If this step is still performed, I believe this should be mentioned like 
it's made in the last step of the lookup procedure described in 
javax.xml.soap: "...or platform default implementation is used...". BTW 
it would be good to mention what newMessageFactory and newSOAPFactory of 
this default implementation return (I guess the default implementations 
of corresponding factories).

Another point is that in the first review you sent there was a 
non-normative note you removed, maybe it's worth being restored(?)

Just a stylistic note - wouldn't be easier just to create a list of 
SAAJMetaFactory lookup steps like it's done in |javax.xml.soap?|

Another point - is it worth mentioning how custom SAAJMetaFactory is 
instantiated by SAAJ API? I mean is it instantiated only once and then 
the reference is stored, or is it instantiated each time user requests 
|SOAPFactory| or |MessageFactory| creation and SAAJMetaFactory instance 
is needed?

Thank you,
Georgiy.||
>> 2) SAAJMetaFactory supports only 2 of 3 SAAJ Factories
>> - this is current state, we are not changing that - I am afraid 
>> adding a new abstract method into existing Factory class is too 
>> incompatible change for MR
>> - just changed javadoc:
>> AlloftheThe|newInstance|methods defined on factories|SOAPFactory| 
>> <http://cr.openjdk.java.net/%7Emkos/8131334/specdiff.06/javax/xml/soap/SOAPFactory.html>and|MessageFactory| 
>> <http://cr.openjdk.java.net/%7Emkos/8131334/specdiff.06/javax/xml/soap/MessageFactory.html> 
>> ...
>>
Ok, thanks.
>> Thanks
>> Miran
>>
>




More information about the core-libs-dev mailing list