Attempting to use the remote API from an MDB in a 4.3_CPO8 EAP instance resulted in below error: Caused by: java.lang.IllegalArgumentException: interface org.rhq.enterprise.server.auth.SubjectManagerRemote is not visible from class loader at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353) at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581) at org.rhq.enterprise.client.RemoteClientProxy.getProcessor(RemoteClientProxy.java:69) In EAP 5, a different set of issues occur due to differences in the remoting libraries.
The first obstacle to overcome was the fact that the Remote Client needed access to utility classes stored in rhq-enterprise-server.jar. By bundling this in an EAR or EJB, the AS instance would attempt to deploy the EJBs contained in the enterprise-server.jar in the AS container. We should probably separate the necessary utility classes into a separate JAR so that the Remote Client API does not have a dependency on the rhq-enterprise-server JAR. The next obstacle would be possible class conflicts introduced when a Remote Client was being deployed into an AS instance with a different client API as that of the RHQ Server's AS instance.
From Larry... I was able to perform the connect, login, logout, and disconnect operations within a MDB deployed to an EAP 4.3 CP08 instance. To do so, I had to do the following: In the MDB's EJB JAR I included a lib directory that contains the following JARs from the JON Remote Client/CLI installation: i18nlog-1.0.10.jar rhq-core-domain-3.0.0.GA.jar rhq-enterprise-comm-3.0.0.GA.jar rhq-remoting-client-api-3.0.0.GA.jar I ended up putting the following JAR in the lib directory of my EAP server profile: rhq-enterprise-server-3.0.0.GA.jar In my test case I used default so this ended up being ${JBOSS_HOME}/server/default/lib As you can see, I used JON 2.4 for my testing. But even this process is unstable. When I moved my test MDB and libs to EAP5 I ran into a new set of problems. Mostly this is because the JON Server itself is an instance of JBoss AS. Because the versions differ, remote client calls become an issue. This is due to the versions of the remote client libraries in EAP are newer then the versions in the JON Server.
closing due to inactivity, we'd need to re-test with newer versions.