public EJB3ServerAPI(final Map<String, String> parameters) throws ServerAPIException { this.parameters = parameters; initServerAPIReference(); }
protected void initServerAPIReference() throws ServerAPIException { String serverAPIBeanName; if (parameters == null || (serverAPIBeanName = parameters.get(EJB_NAMING_REFERENCE_PROPERTY)) == null) { serverAPIBeanName = SERVER_API_BEAN_NAME; } try { remoteServAPI = lookup(serverAPIBeanName, new Hashtable<String, String>( parameters)); } catch (final NamingException e) { throw new ServerAPIException("[" + serverAPIBeanName + "] Reference To Server API does not exists. Edit bonita-client.properties#" + EJB3ServerAPI.EJB_NAMING_REFERENCE_PROPERTY + " property to change the reference name", e); } } }
ServerAPI getServerAPI() throws ServerAPIException, UnknownAPITypeException { try { final ApiAccessType apiType = APITypeManager.getAPIType(); Map<String, String> parameters; switch (apiType) { case LOCAL: return LocalServerAPIFactory.getServerAPI(); case EJB3: parameters = APITypeManager.getAPITypeParameters(); return new EJB3ServerAPI(parameters); case HTTP: parameters = APITypeManager.getAPITypeParameters(); return new HTTPServerAPI(parameters); case TCP: parameters = APITypeManager.getAPITypeParameters(); return new TCPServerAPI(parameters); default: throw new UnknownAPITypeException("Unsupported API Type: " + apiType); } } catch (IOException e) { throw new ServerAPIException(e); } }
static ServerAPI getServerAPI() throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException { try { final ApiAccessType apiType = APITypeManager.getAPIType(); Map<String, String> parameters; switch (apiType) { case LOCAL: return LocalServerAPIFactory.getServerAPI(); case EJB3: parameters = APITypeManager.getAPITypeParameters(); return new EJB3ServerAPI(parameters); case HTTP: parameters = APITypeManager.getAPITypeParameters(); return new HTTPServerAPI(parameters); case TCP: parameters = APITypeManager.getAPITypeParameters(); return new TCPServerAPI(parameters); default: throw new UnknownAPITypeException("Unsupported API Type: " + apiType); } } catch (IOException e) { throw new ServerAPIException(e); } }
ServerAPI getServerAPI() throws ServerAPIException, UnknownAPITypeException { try { final ApiAccessType apiType = APITypeManager.getAPIType(); Map<String, String> parameters; switch (apiType) { case LOCAL: return LocalServerAPIFactory.getServerAPI(); case EJB3: parameters = APITypeManager.getAPITypeParameters(); return new EJB3ServerAPI(parameters); case HTTP: parameters = APITypeManager.getAPITypeParameters(); return new HTTPServerAPI(parameters); case TCP: parameters = APITypeManager.getAPITypeParameters(); return new TCPServerAPI(parameters); default: throw new UnknownAPITypeException("Unsupported API Type: " + apiType); } } catch (IOException e) { throw new ServerAPIException(e); } }
public EJB3ServerAPI(final Map<String, String> parameters) throws ServerAPIException { this.parameters = parameters; initServerAPIReference(); }
protected void initServerAPIReference() throws ServerAPIException { String serverAPIBeanName; if (parameters == null || (serverAPIBeanName = parameters.get(EJB_NAMING_REFERENCE_PROPERTY)) == null) { serverAPIBeanName = SERVER_API_BEAN_NAME; } try { remoteServAPI = lookup(serverAPIBeanName, new Hashtable<String, String>( parameters)); } catch (final NamingException e) { throw new ServerAPIException("[" + serverAPIBeanName + "] Reference To Server API does not exists. Edit bonita-client.properties#" + EJB3ServerAPI.EJB_NAMING_REFERENCE_PROPERTY + " property to change the reference name", e); } } }
static ServerAPI getServerAPI() throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException { try { final ApiAccessType apiType = APITypeManager.getAPIType(); Map<String, String> parameters; switch (apiType) { case LOCAL: return LocalServerAPIFactory.getServerAPI(); case EJB3: parameters = APITypeManager.getAPITypeParameters(); return new EJB3ServerAPI(parameters); case HTTP: parameters = APITypeManager.getAPITypeParameters(); return new HTTPServerAPI(parameters); case TCP: parameters = APITypeManager.getAPITypeParameters(); return new TCPServerAPI(parameters); default: throw new UnknownAPITypeException("Unsupported API Type: " + apiType); } } catch (IOException e) { throw new ServerAPIException(e); } }