Home arrow Java & J2EE arrow Page 4 - Using RMI with Apache Jserv

Conclusion - Java

One of the greatest advantages which Jserv brings to Apache is ability to leverage the large number of API's available to Java. Remote Method Invocation (RMI) delivers several significant benefits to the servlet solution. The primary benefit of using RMI with servlets is that it significantly expands the variety of datasources which Apache can serve to the browser. Furthermore, RMI's simplifies code on the client side of the RMI connection (the servlet), and also allows for load distribution.

TABLE OF CONTENTS:
  1. Using RMI with Apache Jserv
  2. Design the Remote Interface
  3. Create the client program (the servlet)
  4. Conclusion
By: Richard Yumul
Rating: starstarstarstarstar / 5
January 21, 2000

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

As you can see, RMI allowed us to host the Directory service on a machine separate from the web server. Not only does this allow us to load balance applications, but it also allows your Apache Jserv box to connect to data sources hosted on different machines with different OS's. For example, in a two tier approach, a WinNT or Solaris server could host the the database or application server, and your Linux Apache-Jserv machine would then access the data sources via RMI.

The code on the client side is fairly straightforward. The servlet only knows about the Directory interface, and all the code dealing with the data storage & retrieval is hidden behind that interface. The RMI service implementation, server.AddressBook is a simple example, using a HashMap to store the data. A more robust Directory implementation data would store its data in a database or LDAP server. For the servlet (RMI client), it doesn't matter where the data is coming from; it's happy as long as the service implementing the directory.Directory interface is available from the RMI registry.

Resources



 
 
>>> More Java & J2EE Articles          >>> More By Richard Yumul
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

JAVA & J2EE ARTICLES

- More Java Bugs Lead to More Attacks
- Oracle's Java One Brings News, Surprises
- Oracle Patches Java Runtime Environment
- Apple Syncs Java Update with Oracle
- Spring 3.1 Java Development Framework Compat...
- Jelastic Java PaaS Availability and Pricing ...
- NetBeans 7.1 Released, Supports JavaFX 2
- SolarWinds Releases Newest Version of Java M...
- Free Monitoring Tool for Java Apps on Heroku
- Heroku Adds JCloud Platform Support, Java 7 ...
- Java SE 8 Speculation in Full Swing
- Java SE 7 Now Available
- New JVM Language and Java Reporting Tool
- Java 7 Release Update and New Eclipse Toolkit
- The Best Java Netbeans IDE Plugins

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: