public void iniciar() throws Exception {
		comun.RootAndIp.setConf("");
		int port = RootAndIp.getPort();
		
		Registry Naming = LocateRegistry.createRegistry(port);
		Utils.setCodeBase(Servidor.class);
		
		System.out.println("Iniciando servidor !!!");

		comun.RootAndIp.setConf("");
        ip = RootAndIp.getIp_servidor();
        System.out.println("ip localhost: "+InetAddress.getLocalHost().toString());
		System.out.println("Ip: " + this.ip);
		
		this.name = "rmi://" + this.ip + "/IControlAlternativo";
		Naming.rebind(this.name, this.controlAlternativo);
		System.out.println("Nombre: " + this.name);
		
		this.name = "rmi://" + this.ip + "/IControlCarroceria";
		Naming.rebind(this.name, this.controlCarroceria);
		System.out.println("Nombre: " + this.name);
		
		this.name = "rmi://" + this.ip + "/IControlFabrica";
		Naming.rebind(this.name, this.controlFabrica);
		System.out.println("Nombre: " + this.name);	
		
		this.name = "rmi://" + this.ip + "/IControlGarantia";
		Naming.rebind(this.name, this.controlGarantia);
		System.out.println("Nombre: " + this.name);	
		
		this.name = "rmi://" + this.ip + "/IControlMayorista";
		Naming.rebind(this.name, this.controlMayorista);
		System.out.println("Nombre: " + this.name);	
		
		this.name = "rmi://" + this.ip + "/IControlMecanico";
		Naming.rebind(this.name, this.controlMecanico);
		System.out.println("Nombre: " + this.name);			

		this.name = "rmi://" + this.ip + "/IControlMostrador";
		Naming.rebind(this.name, this.controlMostrador);
		System.out.println("Nombre: " + this.name);
		
		this.name = "rmi://" + this.ip + "/IControlPieza";
		Naming.rebind(this.name, this.controlPieza);
		System.out.println("Nombre: " + this.name);
		
		this.name = "rmi://" + this.ip + "/IControlProveedor";
		Naming.rebind(this.name, this.controlProveedor);
		System.out.println("Nombre: " + this.name);
		
		this.name = "rmi://" + this.ip + "/IControlReclamo";
		Naming.rebind(this.name, this.controlReclamo);
		System.out.println("Nombre: " + this.name);
		
		this.name = "rmi://" + this.ip + "/IControlSeguro";
		Naming.rebind(this.name, this.controlSeguro);
		System.out.println("Nombre: " + this.name);
		
		this.name = "rmi://" + this.ip + "/IControlSolicitante";
		Naming.rebind(this.name, this.controlSolicitante);
		System.out.println("Nombre: " + this.name);
		
		this.name = "rmi://" + this.ip + "/IControlSolicitud";
		Naming.rebind(this.name, this.controlSolicitud);
		System.out.println("Nombre: " + this.name);
		
		this.name = "rmi://" + this.ip + "/IControlSucursal";
		Naming.rebind(this.name, this.controlSucursal);
		System.out.println("Nombre: " + this.name);
		
		this.name = "rmi://" + this.ip + "/IControlTaller";
		Naming.rebind(this.name, this.controlTaller);
		System.out.println("Nombre: " + this.name);
		
		this.name = "rmi://" + this.ip + "/IControlUsuarioRepuesto";
		Naming.rebind(this.name, this.controlUsuarioRepuesto);
		System.out.println("Nombre: " + this.name);
		
		// Cargar el resto de los controles
		System.out.println("Listo para conexiones");
		int exit = 0;
		synchronized (this) {
			if(exit!=1)
				this.wait();
		}
		//GUIServidor serv = new GUIServidor();
	}