new TLSParams( new X509TrustManager[] { tm }, hcl );
println( "\ntestAppserverConnectionSource: testing: " + AppserverConnectionSource.PROTOCOL_RMI);
final ConnectionSource rmiSource =
new AppserverConnectionSource( AppserverConnectionSource.PROTOCOL_RMI,
host, 8686, user, password, null);
conn = rmiSource.getMBeanServerConnection( true );
conn.isRegistered( JMXUtil.getMBeanServerDelegateObjectName() );
println( AppserverConnectionSource.PROTOCOL_RMI + " OK using " + rmiSource );
println( "\ntestAppserverConnectionSource: testing: " + AppserverConnectionSource.PROTOCOL_HTTP );
final Map<String,String> env = Collections.emptyMap();
final ConnectionSource httpSource =
new AppserverConnectionSource( AppserverConnectionSource.PROTOCOL_HTTP,
host, 1234, user, password, tlsParams, env);
conn = httpSource.getMBeanServerConnection( true );
assert conn.isRegistered( JMXUtil.getMBeanServerDelegateObjectName() );
println( AppserverConnectionSource.PROTOCOL_HTTP + " OK using " + httpSource );
}