130 likes | 242 Views
Distributed ATM. Smita Hiremath CSC 8530. Topic Description. ATM software has 3 components: Client Server Database. Activity Diagram. Steps for Developing an RMI System. Define the remote interface Between client and server object
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