title: Extended server_name (SNI Extension) not sent with jdk1.8.0 but send with jdk1.7.0
body: <p>I have implemented a JAX-WS client by using ApacheCXF (v3.0.4) and everything works successfully but the problem comes when I want to use a secure connection (SSL/TLS) with java 8 (jdk1.8.0_25).</p>
  
  <p>I see the following exception in log (-Djavax.net.debug=all):</p>
  
  <pre><code>main, handling exception: java.net.SocketException: Connection reset
  main, SEND TLSv1.2 ALERT:  fatal, description =    unexpected_message
  main, WRITE: TLSv1.2 Alert, length = 2
  main, Exception sending alert: java.net.SocketException: Connection reset by peer: socket write error
  </code></pre>
  
  <p>After a depeer analysis I have observed the problem is caused because the with Java 8 the server_name (SNI) is not sent but with Java 7 it is sent and the web service invocation works successfully.</p>
  
  <p><strong>Java 8 log (-Djavax.net.debug=all):</strong> Missing "Extension server_name"</p>
  
  <pre><code>[...]
  Compression Methods:  { 0 }
  Extension elliptic_curves, curve names: {secp256r1, sect163k1, sect163r2, secp192r1, secp224r1, sect233k1, sect233r1, sect283k1, sect283r1, secp384r1, sect409k1, sect409r1, secp521r1, sect571k1, sect571r1, secp160k1, secp160r1, secp160r2, sect163r1, secp192k1, sect193r1, sect193r2, secp224k1, sect239k1, secp256k1}
  Extension ec_point_formats, formats: [uncompressed]
  Extension signature_algorithms, signature_algorithms: SHA512withECDSA, SHA512withRSA, SHA384withECDSA, SHA384withRSA, SHA256withECDSA, SHA256withRSA, SHA224withECDSA, SHA224withRSA, SHA1withECDSA, SHA1withRSA, SHA1withDSA, MD5withRSA
  ***
  [...]
  </code></pre>
  
  <p><strong>Java 7 log (-Djavax.net.debug=all) (works):</strong> "Extension server_name" is set</p>
  
  <pre><code>[...]
  Compression Methods:  { 0 }
  Extension elliptic_curves, curve names: {secp256r1, sect163k1, sect163r2, secp192r1, secp224r1, sect233k1, sect233r1, sect283k1, sect283r1, secp384r1, sect409k1, sect409r1, secp521r1, sect571k1, sect571r1, secp160k1, secp160r1, secp160r2, sect163r1, secp192k1, sect193r1, sect193r2, secp224k1, sect239k1, secp256k1}
  Extension ec_point_formats, formats: [uncompressed]
  Extension signature_algorithms, signature_algorithms: SHA512withECDSA, SHA512withRSA, SHA384withECDSA, SHA384withRSA, SHA256withECDSA, SHA256withRSA, SHA224withECDSA, SHA224withRSA, SHA1withECDSA, SHA1withRSA, SHA1withDSA, MD5withRSA
  Extension server_name, server_name: [host_name: testeo.hostname.es]
  ***
  [...]
  </code></pre>
  
  <p>It is observed that with Java 7 the <em>Extension server_name, server_name: [host_name: testeo.hostname.es]</em> is set and then the web service invocation works successfully.</p>
  
  <p>Why didn't Java 8 set the server_name as Java 7 did? Is it a Java configuration issue?</p>