Management MBean access broken (Rquest for an Management WS API for the JBI
distribution)
-----------------------------------------------------------------------------------------
Key: ODE-895
URL: https://issues.apache.org/jira/browse/ODE-895
Project: ODE
Issue Type: New Feature
Components: Management API
Affects Versions: 1.3.4
Environment: ODE 1.3.4 as OSGi bundle in FUSE-ESB 4.3.0-fuse-02-00
Reporter: Antonio MarĂn
I noticed recently that the old MBean usage is broken with latest stable
version of ODE. So accessing like in the jbi-karaf-commands is not supported:
protected static String COMPONENT_NAME =
"org.apache.servicemix:Type=Component,Name=OdeBpelEngine,SubType=Management";
protected static final String LIST_ALL_PROCESSES = "listAllProcesses";
protected <T> T invoke(final String operationName, final Object[] params, final
String[] signature, Class<?> T, long timeoutInSeconds) throws Exception {
ExecutorService executor = Executors.newSingleThreadExecutor();
Callable<T> callable = new Callable<T>() {
public T call() throws Exception {
MBeanServer server = getMBeanServer();
if (server != null) {
return (T) server.invoke(new ObjectName(COMPONENT_NAME),
operationName, params, signature);
}
return null;
}
};
Future<T> future = executor.submit(callable);
executor.shutdown();
return future.get(timeoutInSeconds, TimeUnit.SECONDS);
}
protected List<TProcessInfo> getProcesses(long timeoutInSeconds) throws
Exception {
ProcessInfoListDocument result = invoke(LIST_ALL_PROCESSES, null, null,
ProcessInfoListDocument.class, timeoutInSeconds);
if (result != null) {
return result.getProcessInfoList().getProcessInfoList();
}
return null;
}
is throwing:
java.util.concurrent.ExecutionException:
javax.management.InstanceNotFoundException:
org.apache.servicemix:Type=Component,Name=OdeBpelEngine,SubType=Management
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
at
net.geant.gembus.services.ode_manager.internal.OdeMBeanManager.invoke(OdeMBeanManager.java:91)
at
net.geant.gembus.services.ode_manager.internal.OdeMBeanManager.getProcesses(OdeMBeanManager.java:95)
at
net.geant.gembus.services.ode_manager.internal.OdeMBeanManager.listAllProcesses(OdeMBeanManager.java:104)
at
net.geant.gembus.services.ode_manager.OdeManagerImpl.ListAllProcesses(OdeManagerImpl.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
It would be desireable to have an input to the Management API on the JBI
distribution as a WS. I tryed to use the pmapi-sa.zip circulating around but
It's not working in my configuration.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.