• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI remote command prompt

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic