Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI remote command prompt

 
Hugh Johns
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am testing my RMI section for local and remote calls (on the same machine therefore remote IP is just localhost), I am using a connector (factory class to get either the remote or local data access object.
When I call the local version, the calls excetute fine and then I get the command prompt back in DOS shell. Using the remote version the calls execute but I do not get the command prompt back. I have to ctrl C to get the prompt back.
Is this normal behaviour?
Regards
Hugh
 
Javini Javono
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You usually do not get the command prompt back until the application
has finished. A short, HelloWorld.class application finishes and then
you immediately get back the command prompt.
However, a server will not finish until you write a relatively straightforward
user interface to allow you to tell it to shut down.
If you do not want to open another command window to issue your next
command, you can do the following:
windows:
start java path/ApplicationName
unix:
java path/ApplicationName &
Thanks,
Javini Javono
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hugh,
Originally posted by Hugh Johns:
When I call the local version, the calls excetute fine and then I get the command prompt back in DOS shell. Using the remote version the calls execute but I do not get the command prompt back. I have to ctrl C to get the prompt back.
Is this normal behaviour?

Is this a test that you are running or is it your application? Normally, I would expect the user to exit the application and then you would be back at the command prompt in the DOS shell. If you're running some sort of client test code that makes some database calls and then exits, then I would expect such a client to behave the same whether it was connecting in local mode or connecting in remote mode. If you're referring to the server, then yes, unless you give it a GUI (which you should anyway to allow the user to enter the configurable parameters) and allow the user to shut it down, you'll have to use CTRL-C to get the command prompt back in the DOS shell. The server waits for input until you tell it to stop waiting.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic