- Ant script for deployment
- Maven for package dependency, build and project management
The httpd-server
module for the Dynamic code downloading using Java RMI (Using the java.rmi.server.codebase
Property). This is optional for production use.
cd httpd-server
mvn clean package
A complete RMI application using the Maven multi module structure. The application adapts the tutorial from Java RMI Tutorial trail.
cd oracle-rmi-tute
mvn clean package
Basically, the RMI deployment steps involve 4 distributed components, each of them can be run in different machines or different processes on a single machine. In this example, the Ant script will create the possible deployment structure and will copy the artifacts in place for running the application.
ant clean deploy
Starting each components. Must be in order:
- Start httpd server (for Remote Interface and parametric objects)
- Start
rmiregistry
process - Start RMI server
- Start RMI client
cd deploy/httpd
start.bat (or start.sh)
cd ../registry
startregistry.bat (startregistry.sh)
cd ../server
start.bat (or start.sh)
cd ../client
start.bat (or start.sh)
- Note that the
httpd-server
component is optional. If there is a production web server available (e.g. elsewhere running Apache httpd) then the Remote Interface and parametric artifacts can be better deployed there and recommended for production. But in this case, thehttpd-server
implementation is back by Jetty for ease of development.