Hello,
I export my services with RMI like that :
Code:
<bean id="remoteAuthenticationManagerExporter" class="org.springframework.remoting.rmi.RmiServiceExporter">
<property name="serviceName" value="remoteAuthenticationManager"/>
<property name="service" ref="remoteAuthenticationManager"/>
<property name="serviceInterface" value="manager.IRemoteAuthenticationManager"/>
<property name="registryHost" value="${rmi.host}"/>
<property name="registryPort" value="${rmi.port}"/>
<property name="servicePort" value="${rmi.service.port}"/>
</bean>
<bean id="logoutEventExporter" class="org.springframework.remoting.rmi.RmiServiceExporter">
<property name="serviceName" value="logoutManager"/>
<property name="service" ref="logoutManager"/>
<property name="serviceInterface" value="manager.ILogoutManager"/>
<property name="registryHost" value="${rmi.host}"/>
<property name="registryPort" value="${rmi.port}"/>
<property name="servicePort" value="${rmi.service.port}"/>
</bean>
It works fine.
Now i want secure one of my services whith SSL. So add the following properties in remoteAuthenticationManagerExporter bean:
Code:
<property name="clientSocketFactory">
<bean class="javax.rmi.ssl.SslRMIClientSocketFactory" />
</property>
<property name="serverSocketFactory">
<bean class="javax.rmi.ssl.SslRMIServerSocketFactory" />
</property>
But when i launch my server, i have the following exception :

Originally Posted by
tomcat
ERROR org.springframework.web.context.ContextLoader.init WebApplicationContext(203): Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'logoutEventExporter' defined in URL [jar:file:/***/update/WEB-INF/lib/***.jar!/rcpSecurityApplicationContext.xml]: Invocation of init method failed; nested exception is java.rmi.server.ExportException: Port already in use: 33000; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
Caused by:
java.rmi.server.ExportException: Port already in use: 33000; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
....
where 33000 is value of "rmi.service.port" property.
Any idea ?
Regards.
Gronono