File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes how to back up the data when system restarts using java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "how to back up the data when system restarts using java?" Watch "how to back up the data when system restarts using java?" New topic
Author

how to back up the data when system restarts using java?

manu chandra
Greenhorn

Joined: Oct 08, 2012
Posts: 15
Hi i am new to java.
I need to make an online examination application in java. The requirement is that while exam is going on If the system restarts the after logging in the exam must start from where it had stopped. I thought of log4j but don't know whether its correct or not. I am not getting any ideas . Can any one please help me with this?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Well, normally what you would do in an online application would be to make the user sign in, and then use their user ID to access a database entry to read something from a database in which you keep track of the relevant information. Or if you aren't making the user sign in, then perhaps something like a cookie or the user's IP address would work instead.

This is just ordinary web application programming, though. I'm not aware of any open-source projects which would help with that (and log4j definitely wouldn't help in the least).
manu chandra
Greenhorn

Joined: Oct 08, 2012
Posts: 15
actually if it was a web application i didnt have any problem . The clients need a desktop application. so i am using swings .
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Okay, so not on-line after all. But the answer is the same. Keep track of how far the user has proceeded by writing something to a disk file, or a database, or something like that. I'm being intentionally vague because you haven't provided a lot of details about your requirements, but that's the general idea.
manu chandra
Greenhorn

Joined: Oct 08, 2012
Posts: 15
Thanks for the reply. i will try to store the user operation for every 15 sec to a database.

The requirement is to build a desktop application using swing or core java. Consider an user will take the exam of 50 questions and when the exam is going on if the power fails or system restarts , then after again logging in the user must continue the exam from where he left off.the question are most likely multiple choice.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Every 15 seconds? What for? When the user answers a question, record that fact in the database. Don't try to make the problem more complicated than it is.
manu chandra
Greenhorn

Joined: Oct 08, 2012
Posts: 15
k i will try it. thanks for the reply
 
Consider Paul's rocket mass heater.
 
subject: how to back up the data when system restarts using java?
 
Similar Threads
how to stop printing log in console?
Help! I am getting strange and unusual Eclipse Warnings
I would like to develop a code for date base rollover of log files....
Reading Log created by Log4j
Log4j Configurations