• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make the RMI restart?

 
he qinfeng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone:
I register ActionEvent to the JButton for start the server,code is following:



if you indicate the right portNum and dbLocation first,then click the JButton,server runs OK;But if you indicate the wrong portNum and dbLocation first and click the JButton,of course server does't run,it's strange that I indicate the right portNum and dbLocation immediately and click the JButton again,server also does'n run and throws the RemoteException?Why?Can I specify portNum and dbLocation any time and run the server ok?
Thanks for your answer.

[Andrew: put the source code between [code] and [/code] UBB tags]
[ September 23, 2004: Message edited by: Andrew Monkhouse ]
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11914
209
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi He,

I have edited your post to put the code between [code] and [/code] UBB tags. Doing this ensures that indenting is preserved, which makes the code easier to read.

When you are writing your post, there are a number of buttons just below the edit pane, which will insert the tags for you, so you don't have to remember what they are.

If you would like to edit your original post so that you can see what I have done, you can click on the button that is just above your post.

The problem you are experiencing seems to be an issue with how RMI is implemented by Sun - it does not appear to be possible to change the port number / stop the registry after starting it.

Regards, Andrew
 
he qinfeng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, Andrew Monkhouse,I'll follow the UBB Code next time,and thanks for solving my puzzle.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic