my dog learned polymorphism*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX: suncertify.properties data 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 "NX: suncertify.properties data" Watch "NX: suncertify.properties data" New topic
Author

NX: suncertify.properties data

Chris Harris
Ranch Hand

Joined: Sep 21, 2003
Posts: 231
Hi all,
I have been working on the database section of the assignment, where I have discovered one data that may be possible to add to the suncertify.properties file.
1) The DB name
2) The DB charset
3) The TCP/IP address and port
4) The GUI look and feel.
Am I missing something?
I have also been thinking about adding a properties file to store error messages. With the aim to internationalise the error message displayed to the CSR. Is this over the top?
Thanks
Chris


SCJP 1.2, SCWCD, SCBCD
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

"Is this over the top?"
Guys what do you think my answer will be for this.
Um, Yes a little.
All you really need to store for the server is the db location, and maybe the port number.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Chris Harris
Ranch Hand

Joined: Sep 21, 2003
Posts: 231
Hi Mark,
How about storing the magic cookie value used at the start of the DB. This would allow me to use other DB as long as I knew the cookie value.
Chris
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Thats a good question Chris. Unfortunately the two assignments that I did, neither of them had the Cookie requirement, so I can't give you a definitive answer.
However, if this Cookie is "Security" related. meaning No Cookie, No Service. Then putting the Cookie value in a Properties file might be a breach of security, in the real world.
Mark
Arun Kumar
Ranch Hand

Joined: Aug 29, 2003
Posts: 67
From what i read in the instructions, the cookie value is just to check if you are opening the right data file. Its not for the kind of security mentioned in the above post.


SCJP (1.4), SCWCD, SCJD
Bharat Ruparel
Ranch Hand

Joined: Jul 30, 2003
Posts: 493
Hello Chris,
We used to do something similar in our client/server applications. However, we will encrypt the properties file. Our programs will then be able to decode it using secret algorithms.
Since this is a plain ASCII file, it may not be appropriate to store the Magic Cookie value in it.
What a number of us have done is to read the value of the Magic cookie using a reader program and then hard-code it in the Data class as a Constant. Then we check in the constructor if the value being read is the same the hard-coded constant, if it is not then, we throw a show-stopper exception and exit the system.
Hope this helps.
Bharat


SCJP,SCJD,SCWCD,SCBCD,SCDJWS,SCEA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NX: suncertify.properties data
 
Similar Threads
Passed SCJD with 373/400
properties file
Database Location - Bodgitt & Scarper
Singleton / Factory decision
RMI server IP/Port values