Originally posted by Peter Yunguang Qiu:
How to stop rmi server programmatically?
Originally posted by Peter Yunguang Qiu:
Is it very neccessary to close the RandomAccessFile before shut down(System.exit(0) ?
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Right now I shut down the server by press Ctrl - C. Is it the same asYou cant. You can stop your service on the registry, but you cannot stop the registry itself.
Originally posted by Peter Yunguang Qiu:
1. Right now I shut down the server by press Ctrl - C. Is it the same as
System.exit(0)?
2. How to shut down programmatically?
3. How to stop RMI service? By using Naming.unbind(String name)?
4. Is rmitegistry always running on the machine and we cannot stop it? 5, should I stop server by a server GUI?
Regards, George
SCJP, SCJD, SCWCD, SCBCD
Originally posted by Peter Yunguang Qiu:
Right now I shut down the server by press Ctrl - C
Originally posted by George Marinkovich:
How do you make sure the database file is closed properly?
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
The method
public static Registry getRegistry(String host, int port)
throws RemoteException
Can get registry from other machine which is not where the server running?
I mean, the server and registry can reside in 2 machines? and the client at the third machine?
Thanks for you help. I just read Java API doc about "Runtime.addShutdownHook " It is the first time I read this method. I do not quite understand it and don't know how to use it and what is the benifits to use it and in what situation to use it.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Peter
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |