-
Apr 6th, 2011, 07:54 AM
#1
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,
-
Apr 12th, 2011, 05:48 AM
#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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules