*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Something about property file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Something about property file." Watch "Something about property file." New topic
Author

Something about property file.

Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi ranchers,

I am nearly submit. One question about property file remains unclear to me.I only used:
AloneDBFile=props/db-1x3.db
ClientPort=5099
ServerDBFile=props/db-1x3.db
ServerIP=localhost
ServerPort=5099
As you can see, there are total 5 properties. Some of them may need to be changeable from gui. So what are they?


SCJP 1.4 SCJD
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
Originally posted by Zhixiong Pan:
Hi ranchers,

I am nearly submit. One question about property file remains unclear to me.I only used:
AloneDBFile=props/db-1x3.db
ClientPort=5099
ServerDBFile=props/db-1x3.db
ServerIP=localhost
ServerPort=5099
As you can see, there are total 5 properties. Some of them may need to be changeable from gui. So what are they?


Hi,
All of the properties mentioned above could change at some point and therefore should be editable.
Regards,
Mark.


SCJP<br />SCJD
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi guy,
Thank you.
BTW, need I add property of ServerAddress into the property file? If it is necessary, be pleased to show the reason.
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
Originally posted by Zhixiong Pan:
Hi guy,
Thank you.
BTW, need I add property of ServerAddress into the property file? If it is necessary, be pleased to show the reason.


My properties are

//local mode
local.filelocation

//network mode
network.host
network.post

//server mode
server.filelocation
server.port

I saw one person had a server.host property for the event that the server machine had multiple IP interfaces but I didn't use such a property myself.

Regards,
Mark.
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi Mark,
Should all the five properties be able to modified under the client UI, even if "ServerPort" and "ServerDBFile" are just business of the server.
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
Originally posted by Zhixiong Pan:
Hi Mark,
Should all the five properties be able to modified under the client UI, even if "ServerPort" and "ServerDBFile" are just business of the server.


No I would just show the properties relevant to the mode you are starting the app in. So just show a local client the location property, for a network client show the ip and port properties and for the server show the port and location properties.

Regards,
Mark
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi Mark,
Please take your time to think for a while on my following strategy.
In my package suncertify.client, I will create a ServerFrame to configure server related properties and start the RMI server.
In my ClientFrame under the same package, I want to add one more parameter for its constructor to sign whether remote or local.
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
Originally posted by Zhixiong Pan:
Hi Mark,
Please take your time to think for a while on my following strategy.
In my package suncertify.client, I will create a ServerFrame to configure server related properties and start the RMI server.
In my ClientFrame under the same package, I want to add one more parameter for its constructor to sign whether remote or local.


Looks good to me I had my server JFrame in a seperate package but other than that that is exactly how I constructed my server and client GUIs. You should also have another class with your main method to actually launch the application and create the appropriate JFrame.

Regards,
Mark
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi Mark,

How many packages do you have? I guess 4, such as db, business, client and server. May be your server package has the only content of server JFrame.
My previous way to put server JFrame in client package was a bit confused in sense.
BTW, I did have a MainRun app in client package for different launching according to parameter.Thanks any way.
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
Originally posted by Zhixiong Pan:
Hi Mark,

How many packages do you have? I guess 4, such as db, business, client and server. May be your server package has the only content of server JFrame.
My previous way to put server JFrame in client package was a bit confused in sense.
BTW, I did have a MainRun app in client package for different launching according to parameter.Thanks any way.


Actually my server GUI was in the same package as my client gui oops :roll: . I also had four packages db, local network and gui so it is pretty much the same as what you did.
regards,
Mark.
 
 
subject: Something about property file.
 
Similar Threads
Verifying the db file
URLyBird db file
Methods to implement suncertify.properties
submitting the assignment
Magic cookie value and database name