	public void start() throws Exception {
		logger = LoggerFactory.getLogger(Main.class);
		final String PROACTIVE_PNP_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.pnp.port");
		final String PROACTIVE_HTTP_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.http.port");
		final String PROACTIVE_RMI_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.rmi.port");
		logger.debug("Setting system property 'proactive.pnp.port' to: " + PROACTIVE_PNP_PORT);
		System.getProperties().setProperty("proactive.pnp.port", PROACTIVE_PNP_PORT);
		logger.debug("Setting system property 'proactive.http.port' to: " + PROACTIVE_HTTP_PORT);
		System.getProperties().setProperty("proactive.http.port", PROACTIVE_HTTP_PORT);
		logger.debug("Setting system property 'proactive.rmi.port' to: " + PROACTIVE_RMI_PORT);
		System.getProperties().setProperty("proactive.rmi.port", PROACTIVE_RMI_PORT);
		CentralPAPropertyRepository.JAVA_SECURITY_POLICY
				.setValue(propertiesFile);
		CentralPAPropertyRepository.GCM_PROVIDER
				.setValue("org.objectweb.proactive.core.component.Fractive");
		Factory factory = FactoryFactory.getFactory();
		HashMap<String, Object> context = new HashMap<String, Object>();
		root = (Component) factory.newComponent("PlayPlatform", context);
		GCM.getGCMLifeCycleController(root).startFc();
		boolean init = false;
		while (!init) {
			boolean overallInitStatus = true;
			for (Component subcomponent : GCM.getContentController(root)
					.getFcSubComponents()) {
				overallInitStatus = overallInitStatus
						&& GCM.getGCMLifeCycleController(subcomponent)
								.getFcState()
								.equals(LifeCycleController.STARTED);
			}
			if (overallInitStatus == true) {
				init = true;
			} else {
				logger.info("Wait for all subcomponents to be started...");
			}
			Thread.sleep(500);
		}
		QueryDispatchApi queryDispatchApi = ((eu.play_project.play_platformservices.api.QueryDispatchApi) root
				.getFcInterface("QueryDispatchApi"));
		for (String queryFileName : DcepConstants.getProperties()
				.getProperty("dcep.startup.registerqueries").split(",")) {
			queryFileName = queryFileName.trim();
			try {
				String queryString = IOUtils.toString(Main.class
						.getClassLoader().getResourceAsStream(queryFileName));
				logger.info(queryString);
				queryDispatchApi.registerQuery(queryFileName, queryString);
			} catch (QueryDispatchException e) {
				logger.warn("Error registering query {} on startup: {}",
						queryFileName, e.getMessage());
			}
		}
	}

	public void start() throws Exception {
		logger = LoggerFactory.getLogger(Main.class);
		final String PROACTIVE_PNP_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.pnp.port");
		final String PROACTIVE_HTTP_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.http.port");
		final String PROACTIVE_RMI_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.rmi.port");
		logger.debug("Setting system property 'proactive.pnp.port' to: " + PROACTIVE_PNP_PORT);
		System.getProperties().setProperty("proactive.pnp.port", PROACTIVE_PNP_PORT);
		logger.debug("Setting system property 'proactive.http.port' to: " + PROACTIVE_HTTP_PORT);
		System.getProperties().setProperty("proactive.http.port", PROACTIVE_HTTP_PORT);
		logger.debug("Setting system property 'proactive.rmi.port' to: " + PROACTIVE_RMI_PORT);
		System.getProperties().setProperty("proactive.rmi.port", PROACTIVE_RMI_PORT);
		CentralPAPropertyRepository.JAVA_SECURITY_POLICY
				.setValue(propertiesFile);
		CentralPAPropertyRepository.GCM_PROVIDER
				.setValue("org.objectweb.proactive.core.component.Fractive");
		Factory factory = FactoryFactory.getFactory();
		HashMap<String, Object> context = new HashMap<String, Object>();
		root = (Component) factory.newComponent("PlayPlatform", context);
		GCM.getGCMLifeCycleController(root).startFc();
		boolean init = false;
		while (!init) {
			boolean overallInitStatus = true;
			for (Component subcomponent : GCM.getContentController(root)
					.getFcSubComponents()) {
				overallInitStatus = overallInitStatus
						&& GCM.getGCMLifeCycleController(subcomponent)
								.getFcState()
								.equals(LifeCycleController.STARTED);
			}
			if (overallInitStatus == true) {
				init = true;
			} else {
				logger.info("Wait for all subcomponents to be started...");
			}
			Thread.sleep(500);
		}
		QueryDispatchApi queryDispatchApi = ((eu.play_project.play_platformservices.api.QueryDispatchApi) root
				.getFcInterface("QueryDispatchApi"));
		for (String queryFileName : DcepConstants.getProperties()
				.getProperty("dcep.startup.registerqueries").split(",")) {
			queryFileName = queryFileName.trim();
			if (!queryFileName.isEmpty()) {
				try {
					String queryString = IOUtils.toString(Main.class
							.getClassLoader().getResourceAsStream(queryFileName));
					logger.info(queryString);
					queryDispatchApi.registerQuery(queryFileName, queryString);
				} catch (QueryDispatchException e) {
					logger.warn("Error registering query {} on startup: {}",
							queryFileName, e.getMessage());
				}
			}
		}
	}
