Announcement Announcement Module
Collapse
No announcement yet.
Setting Dynamic RMI Registry Port Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting Dynamic RMI Registry Port

    Hi All,

    I have the following method that is calling without a problem but i had a problem where multiple instance are placed on the same instance which caused problem with the RMI port 1234

    <bean id="rmiServieBean" class="org.springframework.remoting.rmi.RmiService Exporter">
    <property name="serviceName" value="delivery-service"/>
    <property name="service" ref="deliveryService"/>
    <property name="serviceInterface" value="com.fp.common.model.bo.RmiMessageSending"/>
    <property name="registryPort" value="1234"/>
    </bean>

    The question is how we can make the "registryPort" dynamic, how can we assign a value to it from java for example???

    Any Suggestions??

    Regards,

  • #2
    Change Registry port

    Hi,

    I have not done it before but...
    The setter methiod of rmi.RmiServiceExporter is a public method which means you can set the port. So try this


    After loading appli***.xml file. get the bean named as "rmiServiceBean" and cast it to RmiServiceExporter. Then it will allow you to change the port.

    I have not tried yet... either try it or wait 1-2 days I will try and let you know.

    Regards,
    Tyagi

    Comment

    Working...
    X