130 likes | 248 Vues
This guide outlines the development process of a Remote Method Invocation (RMI) based ATM software system, comprising client, server, and database components. It details the essential steps, including defining the remote interface, binding objects to the RMI registry, and compiling Java files. It highlights methods for user authentication, balance inquiry, and withdrawal operations. Additionally, it addresses potential issues encountered during deployment, particularly on Unix systems. A comprehensive understanding of Java RMI architecture and the proper configuration of the environment is crucial for successful implementation.
E N D
Distributed ATM Smita Hiremath CSC 8530
Topic Description ATM software has 3 components: • Client • Server • Database
Steps for Developing an RMI System • Define the remote interface • Between client and server object • Develop the remote object by implementing the remote interface • Simple unicast Remote Object • must bind its name to the registry • java.rmi.Naming class 3. Develop the client program • lookup the name of the server in the registry • server name is specified as URL in the form • rmi://host:port/name
Steps for Developing an RMI System 4.Compile the Java source files • Generate the stubs • rmic ATMServerImpl • Start the RMI registry Under Windows • start rmiregistry
Cont… • Start the remote server objects • java –Djava.security.policy=ATM.policy ATMServerImpl • Run the client • java -Djava.security.policy=ATM.policy ATMClient
Interface • public String Authenticate (String Acct_No, String Pin_No) throws java.rmi.RemoteException • public String Balance_Enquiry (String Session_id) throws java.rmi.RemoteException • public String Withdrawal (String Amt) throws java.rmi.RemoteException • public void Terminate ( String Session_id) throws java.rmi.Remote.Exception
Database Login_Info Cutomer_Info Balance_Info Withdrawal_History Session_Info
Session Id • Generates a unique session ID • Uses UID class in java • Uses 3 primitive values • Uniquely identifies the VM • Time - in millisec in comparison to UTC • Count – that is maintained in the VM for every UID generated
Problem Faced • Unix SunOS system on Cezanne machine in CSC department • The version of operating system on this machine was SunOS 5.7, Java version was 1.2 and database was Oracle8i • Issue – server side RMI getting hung at rebind call • Installing newer version of Java 1.5