docs: @JsonIgnore
  	public ImmutableMap<String, ?> getEnvironment() {
  		if (getProtocolProviderPackages() != null && getProtocolProviderPackages().contains("weblogic")) {
  			ImmutableMap.Builder<String, String> environment = ImmutableMap.builder();
  			if ((username != null) && (password != null)) {
  				environment.put(PROTOCOL_PROVIDER_PACKAGES, getProtocolProviderPackages());
  				environment.put(SECURITY_PRINCIPAL, username);
  				environment.put(SECURITY_CREDENTIALS, password);
  			}
  			return environment.build();
  		}
  
  		ImmutableMap.Builder<String, Object> environment = ImmutableMap.builder();
  		if ((username != null) && (password != null)) {
  			String[] credentials = new String[] {
  					username,
  					password
  			};
  			environment.put(JMXConnector.CREDENTIALS, credentials);
  		}
  
  		JmxTransRMIClientSocketFactory rmiClientSocketFactory = new JmxTransRMIClientSocketFactory(DEFAULT_SOCKET_SO_TIMEOUT_MILLIS, ssl);
  		// The following is required when JMX is secured with SSL
  		// with com.sun.management.jmxremote.ssl=true
  		// as shown in http://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html#gdfvq
  		environment.put(RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, rmiClientSocketFactory);
  		// The following is required when JNDI Registry is secured with SSL
  		// with com.sun.management.jmxremote.registry.ssl=true
  		// This property is defined in com.sun.jndi.rmi.registry.RegistryContext.SOCKET_FACTORY
  		environment.put("com.sun.jndi.rmi.factory.socket", rmiClientSocketFactory);
  
  		return environment.build();
  	}