SslTransportFactory transportFactory = new SslTransportFactory();
SslTransportFactory transportFactory = new SslTransportFactory();
SslTransportFactory transportFactory = new SslTransportFactory();
SslTransportFactory transportFactory = new SslTransportFactory();
SslTransportFactory transportFactory = new SslTransportFactory();
/** * Overriding to make special considerations for SSL connections. If we are * not using SSL, the superclass's method is called. If we are using SSL, an * SslConnectionFactory is used and it is given the needed key and trust * managers. * * @author sepandm@gmail.com */ protected Transport createTransport() throws JMSException { // If the given URI is non-ssl, let superclass handle it. if (!brokerURL.getScheme().equals("ssl")) { return super.createTransport(); } try { if (keyManager == null || trustManager == null) { trustManager = createTrustManager(); keyManager = createKeyManager(); // secureRandom can be left as null } SslTransportFactory sslFactory = new SslTransportFactory(); SslContext ctx = new SslContext(keyManager, trustManager, secureRandom); SslContext.setCurrentSslContext(ctx); return sslFactory.doConnect(brokerURL); } catch (Exception e) { throw JMSExceptionSupport.create("Could not create Transport. Reason: " + e, e); } }