The fourth way of starting the xBus is integrated in another Java application:
The class
net.sf.xbus.bootstrap.JavaReceiverBootstrap
provides the method
public Object receive(String system, Object request) throws XException
Calling this method by a Java application will process the given request
for the given system
and return the result according to the configuration of the xBus. If the request
cannot be processed, a XException
is thrown.
Prerequisites:
XBUS_HOME/lib/xbus-bootstrap.jar
must be in the CLASSPATH
.
- The environment variable XBUS_HOME must be given to the calling Java application. Specify the parameter
-Dxbus.home="%XBUS_HOME%"
(Windows) resp. -Dxbus.home="${XBUS_HOME}"
(Unix) when starting the application.