Bug 921704

Summary: upgrade jboss remoting
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: Communications SubsystemAssignee: Nobody <nobody>
Status: ON_QA --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.6CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 919199    

Description John Mazzitelli 2013-03-14 17:50:16 UTC
This is a tracker issue for when we want to upgrade JBoss/Remoting that RHQ uses.

AS7.1.1.Final (which is what RHQ 4.6 uses) and near term future releases of AS/EAP will be using Remoting 3.x. We should ultimately get on that.

Comment 1 John Mazzitelli 2013-03-14 17:50:48 UTC
I tried just upgrading to Remoting 2.5.4.SP4 (latest remoting 2 release) and hit a problem.

See Ron Sigal's post here: https://community.jboss.org/message/304721#304721 where he states the ObjectName of the invoker is now customized based on host/port whereas before we could just hardcoded it in the web.xml.

But we can't know what host/port the installer of RHQ will use so we can't hardcode it here. Not sure how to fix this.

Comment 2 John Mazzitelli 2013-03-14 17:52:04 UTC
as an example of the new ObjectName, here's what I see in JConsole connected to my RHQ Server that is running remoting 2.5.4 - the ObjectName is

jboss.remoting:service=invoker,transport=servlet,host=mazztower,port=7080,rhq.communications.connector.rhqtype=server

before, in remoting 2.2, it was just

jboss.remoting:service=invoker,transport=servlet

Comment 3 John Mazzitelli 2013-03-14 18:12:34 UTC
In the new remoting 2.5.4, here's the new code that builds and uses the new ObjectName:

org.jboss.remoting.transport.Connector.init()

   final ObjectName objName = new ObjectName(invoker.getMBeanObjectName());
   ...
      if (!server.isRegistered(objName))
      {
         server.registerMBean(invoker, objName);
      }

The method org.jboss.remoting.getMBeanObjectName() builds and returns the new ObjectName

Comment 4 John Mazzitelli 2013-03-15 19:43:42 UTC
I've got this working but I had to create our own subclass of JBoss/Remoting's ServletInvokerServlet so we can find the MBean. All unit tests and integration tests pass successfully. I ran server and agent (once with server using servlet: protocol and agent using socket: protocol, and then with server using sslservlet: protocol and agent using sslsocket: protocol - all works).

I also ran the CLI and it can connect and run successfully too.

Comment 5 John Mazzitelli 2013-03-15 20:12:31 UTC
git commit to master: b768148fd0db16a57616231b80963abebbce82ae

I'm closing this issue - if we need to upgrade to Remoting 3 in the future, that's another issue that should be raised.