import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

public class testRMISrv implements testRMI {
	public testRMISrv() {} 

	public String sayHello(java.sql.Timestamp aTime) throws RemoteException { 
	        return "Hello, world!" + aTime.toString(); 
	    } 
	         
	    public static void main(String args[]) { 
	         
	        try { 
	        	testRMISrv obj = new testRMISrv(); 
	            testRMI stub = (testRMI) UnicastRemoteObject.exportObject(obj, 0); 

	            Registry registry = LocateRegistry.getRegistry(); 
	            registry.bind("Hello", stub); 

	            System.err.println("Server ready"); 
	        } catch (Exception e) { 
	            System.err.println("Server exception: " + e.toString()); 
	            e.printStackTrace(); 
	        } 
	    } 
}
