public class APITypeManager extends Object
Use System property -Dorg.bonitasoft.engine.api-type=
connect to the server in the local JVM (default). No other configuration is necessary.
connect to the server using HTTP. You must also specify:
-Dorg.bonitasoft.engine.api-type.server.url=HTTP_SERVER_URL
, e.g. http://localhost:8080
-Dorg.bonitasoft.engine.api-type.application.name=WEBAPP_NAME
, this is the name of the web application, e.g. bonita
-Dorg.bonitasoft.engine.api-type.connections.max=CONNECTIONS_MAX
connect to the server using EJB3. You must also specify
For Wildfly 10 :
-Djava.naming.factory.url.pkgs=org.jboss.ejb.client.naming
-Dorg.bonitasoft.engine.ejb.naming.reference=ejb:bonita-ear/bonita-ejb/serverAPIBean!org.bonitasoft.engine.api.internal.ServerAPI
not recommended, only for testing purpose.
APITypeManager.setAPITypeAndParams(ApiAccessType.LOCAL, null);
HashMap parameters = new HashMap<>();
parameters.put("server.url", "http://myserver.com:8080");
parameters.put("application.name", "bonita-application");
parameters.put("connections.max", "5");
APITypeManager.setAPITypeAndParams(ApiAccessType.HTTP, parameters);
HashMap parameters= new HashMap<>();
parameters.put("java.naming.factory.url.pkgs", "org.jboss.ejb.client.naming");
parameters.put("org.bonitasoft.engine.ejb.naming.reference","ejb:bonita-ear/bonita-ejb/serverAPIBean!org.bonitasoft.engine.api.internal.ServerAPI");
APITypeManager.setAPITypeAndParams(ApiAccessType.EJB3, parameters);
Constructor and Description |
---|
APITypeManager() |
Modifier and Type | Method and Description |
---|---|
static ApiAccessType |
getAPIType() |
static Map<String,String> |
getAPITypeParameters() |
static void |
refresh() |
static void |
setAPITypeAndParams(ApiAccessType type,
Map<String,String> parameters) |
public static ApiAccessType getAPIType() throws ServerAPIException, UnknownAPITypeException, IOException
public static Map<String,String> getAPITypeParameters() throws ServerAPIException, IOException
ServerAPIException
IOException
public static void setAPITypeAndParams(ApiAccessType type, Map<String,String> parameters)
public static void refresh()
Copyright © 2020 Bonitasoft S.A. All rights reserved.