hatever it is final HandshakeCompletedListener listener = new HandshakeCompletedListenerImpl(); final TrustStoreTrustManager trustMgr = new TrustStoreTrustManager( trustStore, trustStorePassword); trustMgr.setPrompt( true ); final TLSParams tlsParams = new TLSParams( new X509TrustManager[] { trustMgr }, listener ); final AppserverConnectionSource src = new AppserverConnectionSource( AppserverConnectionSource.PROTOCOL_RMI, "localhost", 8686, "admin", "admin123", tlsParams, null ); final DomainRoot domainRoot = src.getDomainRoot(); If security is not an issue, it is recommended to simply disable TLS on the server. However, you can also connect using TLS whereby the server certificate is blindly trusted:
final TLSParams tlsParams = new TLSParams( TrustAnyTrustManager.getInstanceArray(), null ); final AppserverConnectionSource src = new AppserverConnectionSource( AppserverConnectionSource.PROTOCOL_RMI, "localhost", 8686, "admin", "admin123", tlsParams, null ); final DomainRoot domainRoot = src.getDomainRoot();
@see com.sun.appserv.management.client.TrustStoreTrustManager
@see com.sun.appserv.management.client.TrustAnyTrustManager
@see com.sun.appserv.management.client.HandshakeCompletedListenerImpl
@see com.sun.appserv.management.client.TLSParams