JON delpoyment using Java API
Issue
- We need to deploy a bundle using Java API. Is there any example available?
- Using the Java API we created a connection to the JON Server in the following way:
RemoteClient remoteClient;
remoteClient = new RemoteClient(host, port);
Subject subject;
try
{
subject = remoteClient.login(username, password);
}
catch(Exception e)
{
System.out.println("ERROR Connecting");
}
And then we created the subject to allow us to interrogate the instances on the JON instances themselves in the following way:
BundleCriteria bundleCriteria = new BundleCriteria();
bundleCriteria.addFilterName("HelloWorld_bundle");
bundleCriteria.fetchBundleVersions(true);
BundleManagerRemote BundleManager;
BundleManager = remoteClient.getBundleManager();
List bundlesList = BundleManager.findBundlesByCriteria(subject, bundleCriteria);
However, when we try to get the Status of a deployment which according to the API is part of the BundleDeployment Class which has a getStatus we get nothing back from JON which is a little strange. What are we doing wrong?
Environment
- JBoss Operations Network (JON) 3.x
- JON Remote Client API
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.