Bug 642674

Summary: RFE: support RHQ Remote Client API from JBoss AS container
Product: [Other] RHQ Project Reporter: Marc Shirley <mshirley>
Component: CLIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: low    
Version: 1.4CC: jshaughn, loleary
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-27 21:09:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marc Shirley 2010-10-13 14:41:09 UTC
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.

Comment 1 Larry O'Leary 2010-10-13 16:25:39 UTC
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.

Comment 2 Charles Crouch 2010-10-18 15:43:24 UTC
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.

Comment 3 Jay Shaughnessy 2014-06-27 21:09:09 UTC
closing due to inactivity, we'd need to re-test with newer versions.