Service service = new Service( "ldap", TransportType.SOCKET, PropertiesUtils.get( initialEnv, EnvKeys.LDAP_PORT, LDAP_PORT ) );
int port = PropertiesUtils.get( initialEnv, EnvKeys.LDAP_PORT, LDAP_PORT );  Service service = new Service( "ldap", TransportType.SOCKET, port );
    private void startUpWireProtocol() throws NamingException    {        ServiceRegistry registry = null;        if ( initialEnv.containsKey( EnvKeys.PASSTHRU ) )        {            registry = ( ServiceRegistry ) initialEnv.get( EnvKeys.PASSTHRU );            if ( registry != null )            {                initialEnv.put( EnvKeys.PASSTHRU, "Handoff Succeeded!" );            }        }                        Service service = new Service( "ldap", TransportType.SOCKET,                PropertiesUtils.get( initialEnv, EnvKeys.LDAP_PORT,                                     LDAP_PORT ) );        try        {            if( registry == null )            {                registry = new SimpleServiceRegistry();            }            registry.bind( service,                           new LdapProtocolProvider(                                   ( Hashtable ) initialEnv.clone() ) );                        minaService = service;            minaRegistry = registry;        }        catch ( IOException e )        {            e.printStackTrace();            String msg = "Failed to bind the service to the service registry: " +                    service;            LdapConfigurationException e2 = new LdapConfigurationException( msg );            e2.setRootCause( e );        }    }