Question

I've been doing some research on using RMI and in pretty much every case they say you are expected to use a web, http, or ftp server to allow the class loader to load the classes needed.

In this article jGuru: Remote Method Invocation (RMI) it starts the part about installation and deployment by saying that the classes have to be available to the class loader, then it goes on to say why you need to have a http or ftp server.

So my question, is why must a I use a http or ftp server when I can place the classes that I want to share between my client and server in a jar file that is distributed with both portions of the application? From my understanding this would be making the classes available to both class loaders without the need of a http or ftp server, or am I making the wrong assumptions?

Was it helpful?

Solution

You don't have to use the codebase feature. If you can distribute all the required classes to the clients ahead of time, by all means do that. The codebase feature just gives you a way of not having to do that if you don't want to, or if you want an easy way to update the RMI-related parts of the client without redeploying the whole thing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top