Results 1 to 3 of 3

Thread: tomcat restart issue with jmx

  1. #1

    Default tomcat restart issue with jmx

    Hi,

    I have two applications communicating each other using jmx. For example

    application 1 ==> Source application
    application 2 ==> deployed under tomcat that communicates to "application 1" using jmx as follows
    <bean id="clientConnector" class="org.springframework.jmx.support.MBeanServer ConnectionFactoryBean>
    <property name="serviceUrl"
    value="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/test"/>
    <property name="environment">
    <props>
    <prop key="jmx.remote.jndi.rebind">true</prop>
    </props>
    </property>
    </bean>

    Whenever application 1 is restarted (without being tomcat(application 2) restarted) the connection becomes stale in application 2. Is there any way to get around this. For RmiProxyFactoryBean we have some thing like refreshStubonConnectFailure. Is there any similar thing for jmx..

    Thanks for your help!!!
    Regards,
    Sreedhar

  2. #2
    Join Date
    Jun 2005
    Posts
    4,241

    Default

    The closest analogy to RmiProxyFactoryBean in JMX is the MBeanProxyFactoryBean (which unfortunately has no direct equivalent of refreshStubOnConnectFailure, but maybe you can sort of fake it by manipulating the server property of the FactoryBean). Would it be better to use that? How exectly are you using the server connection supplied by the ConnectionFactoryBean?

  3. #3

    Default

    Thanks for the reply. I am getting connection as follows

    public JMXClient(MBeanServerConnection jmxConn, String mBeanObjectName) throws Exception {
    this.jmxConn = jmxConn;
    this.mBeanObjectName = new ObjectName(mBeanObjectName);
    initialise();
    }

    private void initialise() throws Exception {
    clientRes = new MYJMXClientResult(jmxConn);
    beanInfo = jmxConn.getMBeanInfo(mBeanObjectName);
    operationInfos = beanInfo.getOperations();
    }
    Regards,
    Sreedhar

Posting Permissions

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