Announcement Announcement Module
No announcement yet.
Spring RMI Alternative Recommendations Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring RMI Alternative Recommendations

    I implemented a solution to get and view current stats of ActiveMQ brokers. They are all standalone/enterprise configuration and since I configured failover, the JMS server may be on another (in production, load-balanced) server.

    I reluctantly used RMI but I only require a light weight solution and wish to modify this. Does anyone have recommendations for alternates? I have read the 2.5/3.0 Spring docs for alternates but am still gathering information.

    Thanks for any feedback in advance
    Last edited by Helena; Oct 1st, 2009, 11:48 AM.

  • #2
    why not try spring remoting. Actually there are few analysis doen over net which say spring http remoting is faster than RMI.



    • #3
      Remoting to Brokers

      I have remoting for most of the client but I think remoting on top of http might be an unnecessary layer when you want to set up a channel with brokers. Thanks for the feedback, I will keep it in mind.



      • #4
        I've had good results as well, with spring's HttpInvokerServiceExporter as well -- almost zero extra development effort required, testable, and the security model is automatically compatible with any web technology.

        This part was unclear to me
        unnecessary layer when you want to set up a channel with brokers
        Are you implementing JMS or just a simple service to collect JMX type statistics from your broker (if so I _think_ jmx had something for this purpose).
        Last edited by honeybunny; Oct 5th, 2009, 06:55 PM.


        • #5
          RMI exposing the broker

          I have implemented JMS and code to expose brokers for monitoring the status of queues, load, and so forth by creating proxies from various broker view interfaces (DestinationViewMBean, BrokerViewMBean, ConnectionViewMBean connectionViewMBean, JmsConnectorViewMBean), packaging the data in a POJO named BrokerStatistics, and remoting it to the client on demand. But all those connections...not at all a good design and I want to simplify my strategy.

          Very stripped down, I basically do a

          MBeanProxyInstance.getProxyInstance(BrokerViewMBean.class, getObjectName("Broker"));
          which essentially does for local or remote brokers:

          MBeanServerConnection mbsc = MBeanConnection.getLocalMBeanServerConnection(port, hostName);
          TypeSafeMBeanProxy.newMBeanProxy(mbsc, objectName, intfClass);
          Depending on whether the local broker on the same server is up or has failed over to a remote broker, I generate a JMXServiceURL in the general form of

          new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+hostName+":"+port+"/jmxrmi");
          which creates the mbeans to populate BrokerStatistics. I had read about the HttpInvokerServiceExporter and will give that a try.

          Last edited by Helena; Oct 12th, 2009, 04:16 PM.


          • #6
            Thanks for any feedback in advance