title: HttpsURLConnection.setDefaultHostnameVerifier: method verify not invoked
body: <p>I configure HttpsUrlConnection like this: </p>
  
  <pre><code>HttpsURLConnection.setDefaultSSLSocketFactory(sslFactory);
  HttpsURLConnection.setDefaultHostnameVerifier(new DummyHostnameVerifier());
  </code></pre>
  
  <p>DummyHostnameVerifier:</p>
  
  <pre><code>public class DummyHostnameVerifier implements HostnameVerifier {
      @Override
      public boolean verify(String s, SSLSession sslSession) {
          return true;
      }
  }
  </code></pre>
  
  <p>Of course, it's only part of configuration. But the problem is that verify method in DummyHostnameVerifier isn't invoked. 
  When I test my application on local machine, glassfish 3 server, verify invoked and I'm not recieving any exceptions. 
  But when I test it on remote environment, verify isn't invoked, and I recieve this: </p>
  
  <pre><code>java.io.IOException: The https URL hostname does not match the Common Name (CN) on the server certificate.  To disable this check (NOT recommended for production) set the CXF client TLS configuration property "disableCNCheck" to true.
  </code></pre>
  
  <p>On remote env app runs on jboss 5. 
  Maybe this depends on some jboss config? I can't understand, where default hostname verifier changed after setting my verifier. </p>