This discussion is archived
3 Replies Latest reply: Jan 15, 2013 5:35 AM by 841361 RSS

Taking Backup of Java Object instance

984684 Newbie
Currently Being Moderated
How to take back-up of Java instance and use slave instance across,with out disturbing master backuped copies.
  • 1. Re: Taking Backup of Java Object instance
    TPD-Opitz-Consulting-com Expert
    Currently Being Moderated
    Welcome to the forum.

    could you please use more words to describe your problem?

    bye
    TPD
  • 2. Re: Taking Backup of Java Object instance
    gimbal2 Guru
    Currently Being Moderated
    981681 wrote:
    How to take back-up of Java instance and use slave instance across,with out disturbing master backuped copies.
    Java instance? I'll assume you mean object instance since that is in the title of your post.

    In such a case a 'backup' is a clone, which you can do with the Cloneable interface in Java. In your case I'm guessing it should even be a "deep clone" which is not so easy. But now you know what to Google.
  • 3. Re: Taking Backup of Java Object instance
    841361 Newbie
    Currently Being Moderated
    >
    How to take back-up of Java instance and use slave instance across,*with out disturbing master backuped copies.*
    >
    You need a deep copy of your object as also mentioned by gimbal2
    you can create this by the use of object output streams and object input streams , provided the belonging class is serlizable.
    You can write the object on memory or file system, read it back and save it as a master copy.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points