Hi,
I'm trying to achieve the same thing: bind my exported service to JBoss RMI registry. My configuration goes as follows:
Code:
<bean id="SPRING_REMOTING_SENDER_STRATEGY_ENABLED" class="org.springframework.remoting.rmi.RmiServiceExporter"
lazy-init="true">
<property name="serviceName" value="RemoteEventSourceSVC" />
<property name="service"
ref="my.framework.event.consumer.source.mdb.remote" />
<property name="serviceInterface"
value="my.framework.event.consumer.source.mdb.IRemoteEventSource" />
<property name="registryPort"
value="1098" />
</bean>
I get an NoSuchObjectException during context loading (bean creation). These are the lines that cause the exception,
RmiServiceExporter >> getRegistry()
Code:
synchronized (LocateRegistry.class) {
try {
// Retrieve existing registry.
Registry reg = LocateRegistry.getRegistry(null, registryPort, clientSocketFactory);
testRegistry(reg);
return reg;
}
catch (RemoteException ex) {
logger.debug("RMI registry access threw exception", ex);
logger.info("Could not detect RMI registry - creating new one");
// Assume no registry found -> create new one.
return LocateRegistry.createRegistry(registryPort, clientSocketFactory, serverSocketFactory);
}
}
In particular the testRegistry() method which invokes list() on the registry object.
Any clues on what should I do to achieve this binding? Is it at all possible to reuse JBoss RMI Registry?
In the official docs there's a recommendation not to do so, but it doesn't say it's not possible (http://static.springsource.org/sprin...l#remoting-rmi)
--EDIT--
I'm using IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64), JBoss 4.3 EAP and Spring 3.1.0.RELEASE.
--EDIT--
Thanks for your help