Results 1 to 6 of 6

Thread: Spring RMI Alternative Recommendations

  1. #1
    Join Date
    Dec 2007
    Posts
    90

    Default 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
    Helena
    Last edited by Helena; Oct 1st, 2009 at 10:48 AM.

  2. #2
    Join Date
    Nov 2008
    Posts
    13

    Default

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

    hth

  3. #3
    Join Date
    Dec 2007
    Posts
    90

    Default 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.

    H

  4. #4
    Join Date
    May 2008
    Posts
    153

    Default

    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 at 05:55 PM.

  5. #5
    Join Date
    Dec 2007
    Posts
    90

    Default 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

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

    Code:
    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

    Code:
    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.

    thanks,
    Helena
    Last edited by Helena; Oct 12th, 2009 at 03:16 PM.

  6. #6

    Default

    Thanks for any feedback in advance

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •