Deploying resources to an integration node by using a custom integration application
Deploy BAR files to the integration nodes in your integration node network by using the IBM® Integration API Exerciser, or a custom integration application.
About this task
You can also check the result of a deployment by using the IBM Integration API.
To use the IBM Integration API to deploy files and check the results:
Procedure
Example
The following example custom integration application connects to an integration node that
is running on the local computer. The integration node is listening for webadmin requests on
the web administration port (the default is 4414). The code deploys a BAR file that is
called MyBAR.bar to an integration server called
default
that is running on the integration node, and displays the
result.
import com.ibm.broker.config.proxy.*;
public class DeployBAR {
public static void main(String[] args) {
BrokerConnectionParameters bcp =
new IntegrationNodeConnectionParameters("localhost", 4414);
try {
BrokerProxy b = BrokerProxy.getInstance(bcp);
ExecutionGroupProxy eg = b.getExecutionGroupByName("default");
DeployResult dr = eg.deploy("MyBAR.bar", true, 30000);
System.out.println("Result = "+dr.getCompletionCode());
} catch (Exception e) {
e.printStackTrace();
}
}
}