public static ApiAccessType getAPIType() throws ServerAPIException, UnknownAPITypeException, IOException { if (apiAccessType == null) { final String apiType = getAPITypeFromProperties(); if (LOCAL.name().equalsIgnoreCase(apiType)) { apiAccessType = LOCAL; } else if (EJB3.name().equalsIgnoreCase(apiType)) { apiAccessType = EJB3; } else if (HTTP.name().equalsIgnoreCase(apiType)) { apiAccessType = HTTP; } else if (TCP.name().equalsIgnoreCase(apiType)) { apiAccessType = TCP; } else { throw new UnknownAPITypeException("Invalid API type: " + apiType); } } return apiAccessType; }
public void start() throws Exception { LOGGER.info("====================================================="); LOGGER.info("============ Starting Bonita Engine ==========="); LOGGER.info("====================================================="); final long startTime = System.currentTimeMillis(); if (System.getProperty("org.bonitasoft.engine.api-type") == null) { //force it to local if not specified APITypeManager.setAPITypeAndParams(ApiAccessType.LOCAL, Collections.<String, String> emptyMap()); } if (APITypeManager.getAPIType().equals(ApiAccessType.LOCAL)) { prepareEnvironment(); setupPlatform(); initPlatformAndTenant(); } deployCommandsOnDefaultTenant(); LOGGER.info("==== Finished initialization (took " + (System.currentTimeMillis() - startTime) / 1000 + "s) ==="); }
public static ApiAccessType getAPIType() throws ServerAPIException, UnknownAPITypeException, IOException { if (apiAccessType == null) { final String apiType = getAPITypeFromProperties(); if (LOCAL.name().equalsIgnoreCase(apiType)) { apiAccessType = LOCAL; } else if (EJB3.name().equalsIgnoreCase(apiType)) { apiAccessType = EJB3; } else if (HTTP.name().equalsIgnoreCase(apiType)) { apiAccessType = HTTP; } else if (TCP.name().equalsIgnoreCase(apiType)) { apiAccessType = TCP; } else { throw new UnknownAPITypeException("Invalid API type: " + apiType); } } return apiAccessType; }
private static String getAPITypeFromProperties() throws IOException { String property = getProperties().get(API_TYPE); if (property != null) { return property; } return LOCAL.name(); }
private static String getAPITypeFromProperties() throws IOException { String property = getProperties().get(API_TYPE); if (property != null) { return property; } return LOCAL.name(); }