Sometimes, there is a need to know if LiveCycle is up and running. I’ve seen a few techniques being used to try to get the status of LiveCycle:
- HTTP GET call to adminui
- Orchestration that returns true/false
LiveCycle has a service API that can return the status of any LiveCycle service.
I’ve written a simple web application that does the following:
- Returns the list of all services with their status.
- Return the status of a particular service.
1- Returns the list of all services with their status
This snippet of code will return the status of all services:
serviceReg = new ServiceRegistryClient(myfactory);
List lstServiceConfig = serviceReg.getServiceConfigurations();
try{
for(int i=0;i< lstServiceConfig.size();i++){
ServiceConfiguration sr = (ServiceConfiguration)lstServiceConfig.get(i);
int state = sr.getState();
response.setContentType("text/html");
response.getOutputStream().println("Name of the service : " + sr.getServiceId()
+ " " + sr.getMajorVersion() + "." + sr.getMinorVersion() + " : ");
response.getOutputStream().println("State : " + getStateValue(state) + "
“);
}
}
catch(Exception e){
System.out.println(“Error: ” + e.getMessage() + “\n”);
}
If you use the attached servlet you can get the result using the following url:
http://
2- Return the status of a particular service.
This snippet of code will return the status of a specific service:
try{
ServiceConfiguration serviceConfig = serviceReg.getServiceConfiguration(serviceName, max, min);
int state = serviceConfig.getState();
response.setContentType(“text/html”);
response.getOutputStream().println(“Name of the service : ”
+ serviceConfig.getServiceId() + max + “.” + min + ” : “);
response.getOutputStream().println(“State : ” + getStateValue(state) + “
“);
}
catch(Exception e){
System.out.println(“Error retrieving service ” + serviceName + ” with version ” + max + “.” + min);
}
If you use the attached servlet you can get the result using the following url:
http://
Just deploy the attached war file and give it a try.
You can also get additional examples for the service api at the following url:
http://help.adobe.com/en_US/livecycle/9.0/programLC/help/index.htm?content=000067.html#1548277
You can get the source from here.
Jasmin


Hi Jasmin,
Thanks for posting this useful techniques.
Can this be applied to LiveCycle ES (8.2.1)?
Thanks,
Han
Yes. You would need to change the client jars in the war file to use the ES ones, but other than that it should work.
Jasmin