• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

starting the application

 
Nathan Daniels
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have read a couple of threads (but can't find them now) which talks about starting the application with a gui that gives the user the option to connect locally or remotely, and based on that choice, another gui comes up asking for the url and/or database location. Does this mean that if the client chooses remote mode and enters the required information that you are starting the remote server from the client, something like RMIServer.openConnection() where the registry is created and bound to the naming service? Wouldn't this mean that the client and server are on the same JVM? I'm confused here.
I thought, and please do correct me, that if you are going to be running remotely that you would start the server(which creates the registry and binds the remote object to the naming service). Then on the client, you would know which mode the app is running and would do either a lookup for the service or get a singleton of the Data class. But if you want to run locally, then we shouldn't start the server because they are on the same JVM, right? Is this a matter of documenting the instructions on how to start the app or am I missing something? Are we suppose to support switch of modes on the fly?
Could anyone please set me on the right track?
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3753
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

.You need not change the modes at run time.
.The requirements clearly say that you can take a few parameters (host, port, securityfile name etc) on the command line which will let the app decide whether it has to contact a remote server or just load up the db itself.
.In remote mode the client and server are in a deperate JVM (that's why it is remote!)
. Of course, in remote mode you need to have the server running first. If you are using RMI, you can also use the activatation framework to automatically start your server class. Just read up the RMI tutorial for this.
HTH,
Paul.
------------------
Get Certified, Guaranteed!
(Now Revised for the new Pattern)
www.enthuware.com/jqplus

Your guide to SCJD exam!
www.enthuware.com/jdevplus
Try out the world's only WebCompiler!
www.jdiscuss.com
 
Nathan Daniels
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick reply. I'll look into the activation framework you mentioned. Could you point me to a RMI tutorial that talks about the activation framework?
[This message has been edited by Nathan Daniels (edited May 04, 2001).]
 
Doug Melzer
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The server may have already been started (whether via activation or just via the command line) and all you want to do is to provide the client with a startup GUI to let them specify the server connection data instead of having them do it using a command line argument.
My solution employed a GUI to allow them to specify local or remote startup data.
I don't believe you need to use activation to satisfy the project's requirements, but it would be worthwhile for you to learn about it.
 
Doug Melzer
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The server may have already been started (whether via activation or just via the command line) and all you want to do is to provide the client with a startup GUI to let them specify the server connection data instead of having them do it using a command line argument.
My solution employed a GUI to allow them to specify local or remote startup data.
I don't believe you need to use activation to satisfy the project's requirements, but it would be worthwhile for you to learn about it.
 
Doug Melzer
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The server may have already been started (whether via activation or just via the command line) and all you want to do is to provide the client with a startup GUI to let them specify the server connection data instead of having them do it using a command line argument.
My solution employed a GUI to allow them to specify local or remote startup data.
I don't believe you need to use activation to satisfy the project's requirements, but it would be worthwhile for you to learn about it.
 
Doug Melzer
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The server may have already been started (whether via activation or just via the command line) and all you want to do is to provide the client with a startup GUI to let them specify the server connection data instead of having them do it using a command line argument.
My solution employed a GUI to allow them to specify local or remote startup data.
I don't believe you need to use activation to satisfy the project's requirements, but it would be worthwhile for you to learn about it.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic