Announcement Announcement Module
Collapse
No announcement yet.
jboss RMI timeout Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • jboss RMI timeout

    My client web application runs on tomcat and needs to invoke remote methods in JBoss. In the client side I'm using spring 2.5. There I've configured the my ejbRemote as follows.

    <bean id="ejbRemote"
    class="org.springframework.jndi.JndiObjectFactoryB ean" lazy-init="true">
    <property name="jndiName" value="MyEJBBean/remote"/>
    <property name="expectedType" value="com.my.MyEjbRemote"/>
    <property name="proxyInterface" value="com.my.MyEjbRemote"/>
    <property name="resourceRef" value="false"/>
    <property name="jndiTemplate" ref="jbossRemoteEnvironment"/>
    <property name="cache" value="true"/>

    </bean>
    <bean id="jbossRemoteEnvironment" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
    <props>
    <prop key="jnp.timeout">10000</prop>
    <prop key="jnp.sotimeout">10000</prop>
    <!-- <prop key="jnp.connect.timeout">15000</prop> -->
    <!-- <prop key="sun.rmi.transport.connectionTimeout">10000</prop> -->
    <prop key="java.naming.factory.initial">org.jnp.interfac es.NamingContextFactory</prop>
    <prop key="java.naming.provider.url">jnp://xxx.xx.xx.xx:1099</prop>
    <prop key="java.naming.factory.url.pkgs">org.jboss.namin g:org.jnp.interfaces</prop>
    </props>
    </property>
    </bean>



    I'm trying to implement a failover mechanism at a 10 seconds timeout on remote method invocation. [This is required as my remote server can be down time to time. so I need to set a maximum waiting time for each invocation to failover action.]

    I've tried setting the jnp.timeout and the jnp.sotimeout in JNDITemplate environment properties and as well as jndi.properties in JBoss. But it always timeouts only after 60 seconds. It seems this default value is not overidden. What will be the correct way to override this default value?
Working...
X