Search code examples
javajakarta-eespringrmi

Exposing multiple objects with RMI in Spring


How do I expose multiple objects with RMI using Spring?

I start with what is written here.

What if I want to expose more objects, must I declare another instance of RMIServiceExporter?


Solution

  • Yes you need to declare an instance of RMIServiceExporter for each service you wish to expose. Each RMIServiceExporter can only be associated with a single service instance and service interface.