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

URLyBird: questions about RMI and server startup

 
Tiago Fernandez
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I'm almost finishing my SCJD project, and I have a couple of doubts I want to know what you think:

1. Since I'm using Java 1.5, I'm using also the new concurrency API (ReentrantLock). I saw somewhere this could rise problems when using RMI, because the ReentrantLock class locks threads, and RMI produces different threads for requests, so unlocking could be a problem maybe. Does this have a point, is it true?

2. About the application startup: since the only command line allowed for running the server/client is "java -jar path_and_filename mode", how will the client know about the remote host (if applied)? Should I initialize the suncertify.properties file with default values? I guess so, right?

3. Concerning "You must provide all classes pre-installed so that no dynamic class downloading occurs". Does it mean I have to built in my JAR file the classes generated using the RMI compiler?

4. "The mode flag must be either 'server', indicating the server program must run, 'alone', indicating standalone mode, or left out entirely, in which case the network client and gui must run". Does it means when no arguments is passed, I have to start the server and the client, or simply bypass the network mode? Does standalone means the same?

Thanks in advance.
Regards,
[ March 18, 2006: Message edited by: Tiago Fernandez ]
 
Jonathan Moore
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tiago,

Sorry I can't answer question 1, but

2. Properties such as remote host, port number and database file location are settable in your gui(s). Default values can be taken from the suncertify.properties, and new values saved, but I don't think you should assume that there will always be a properties file.

3. Yes

4. If you leave out the mode flag it should start the client but attempt to connect to a server (which should already be running). The location of the server should be specified using the gui as described in 2 above. Standalone means the client opens the database file itself and doesn't connect to a server.

Hope that helps
Jon
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic