private static RegistrationService getRegistrationService(String proxyHost, int proxyPort) {
try {
File registryFile = RegistrationUtil.getServiceTagRegistry();
Object params[] = new Object[] { registryFile, proxyHost, proxyPort, "glassfish:console"};
RegistrationServiceConfig config = new RegistrationServiceConfig("com.sun.enterprise.registration.SysnetRegistrationService", params);
RegistrationService registrationService = RegistrationServiceFactory.getInstance().getRegistrationService(config);
return registrationService;
} catch (Exception ex) {
// FIXME: Log trace instead
ex.printStackTrace();