I am very new to Spring-> I am extremely impressed with its ease of use, and I want to use it to create a REST API, as well as an RMI service.
What I want to know is, is it possible to deploy a single java web app that exposes the RMI service as well as the REST API? If this can be done, what (if any) considerations do I have to keep in mind to avoid conflicts/problems b/w the REST and the RMI services?
It’s absolutely possible, feasible and safe. RMI and REST protocols are completely independent and fundamentally different from the technical stack perspective. REST uses HTTP and XML or JSON while RMI is based on Java serialization and Java naming registry. The both work on different ports.
In theory you can even take the very same class and expose it using two interfaces – but this might be hard to maintain in the future so go for two simple facades dedicated to each protocol.