SavePoint Pattern

Discussions

J2EE patterns: SavePoint Pattern

  1. SavePoint Pattern (18 messages)

    There are two ways to use SavePoint pattern. 1. 'SavePointIndexBased' and 2. 'SavePointLabelBased' Both have different type of container inside it having capability to store different objects of its own at different stages wherever required by user for later ussage. You just need to extend your class with either 'SavePointIndexBased' or with 'SavePointLabelBased' and you can bookmark/save object's current state by calling respective 'savePoint' method. In order to retrieve the saved object, user need to call respective 'getSavedPoint' method. There is also facility to roll back the object with any of saved point. It can be done by calling respective 'rollBack' method. SavePointIndexBased: ===================== It has Vector container to store objects by index based. So that user can save object's states on different stages to get exact level of bookmarked object's state. SavePointLabelBased: ===================== It has Hashtable container to store objects by label based. So that user can label the save point for the later use to get exact labeled object's state. Both classes facilitate the user to store object in different stages for the save point. For example if you are managing some transaction and you are playing with some object. You will need to rollback in case of any failure and in such cases databases and drivers provide the facility and this class will provide you facility to do the same behaviour with your own java object.

    Threaded Messages (18)

  2. Re: SavePoint Pattern[ Go to top ]

    Kindly visit SavePointPattern.zip to download code for JAVA.
  3. Re: SavePoint Pattern[ Go to top ]

    Hi - It seems like the url to grab teh code is not working. Can you plz send teh file at bulandaltaf_pk at yahoo dot com or just give teh working url from where I can get the file.
  4. Re: SavePoint Pattern[ Go to top ]

    Kindly recheck, it is working fine now.
  5. Re: SavePoint Pattern[ Go to top ]

    link is working now for code of this pattern
  6. Re: SavePoint Pattern[ Go to top ]

    Isn't this Memento?
  7. Re: SavePoint Pattern[ Go to top ]

    Its a New Pattren for Transaction Handling on middle and presentation Tier.
  8. Re: SavePoint Pattern[ Go to top ]

    its a new pattren.
  9. Re: SavePoint Pattern[ Go to top ]

    It's an implementation you can use to wrap and store objects in a collection. I would not call it a pattern.
  10. Re: SavePoint Pattern[ Go to top ]

    its a new pattren.
    No, it's not. It's not a new pattern either.
  11. is some thing like this exist already[ Go to top ]

    its a new pattren.


    No, it's not. It's not a new pattern either.
    article didnt mention that it is not based on collection but it will solve a problem by using some already existing collection. if you say its not a pattern then tell me is there any thing like that exist before
  12. its a new pattren.


    No, it's not. It's not a new pattern either.


    article didnt mention that it is not based on collection but it will solve a problem by using some already existing collection.

    if you say its not a pattern then tell me is there any thing like that exist before
    First of all, I don't see how this does anything the Memento pattern doesn't do, it's much more trivial. Whether it's for a tiered system or not is completely irrelevant. It's also just too obvious a solution to call it a pattern. It's just a solution that's been done a million times before. What do you believe is novel about this?
  13. What do you believe is novel about this?
    Well I think the obvious response is...well right now it is called Pattern :)
  14. What do you believe is novel about this?


    Well I think the obvious response is...well right
    now it is called Pattern :)
    A pattern is not just an obvious solution. It's a solution that has been proven effective over time and generally isn't immediately obvious. You don't need a book or article to know how to do things that are obvious. Usually Pattens are derived from an obvious solution but refine it to minimize the issues that arise from the obvious approach or to make it more effective. Also, a pattern is a general approach. It's code targeted at a specific language. The Memento solves this same problem and details how to take this from the obvious solution to one that is more effective. If we are going to take every use of a Collection and call it a pattern, there would be a basically infinite number of patterns.
  15. What do you believe is novel about this?


    Well I think the obvious response is...well right
    now it is called Pattern :)


    A pattern is not just an obvious solution. It's a solution that has been proven effective over time and generally isn't immediately obvious. You don't need a book or article to know how to do things that are obvious. Usually Pattens are derived from an obvious solution but refine it to minimize the issues that arise from the obvious approach or to make it more effective. Also, a pattern is a general approach. It's code targeted at a specific language.

    The Memento solves this same problem and details how to take this from the obvious solution to one that is more effective.

    If we are going to take every use of a Collection and call it a pattern, there would be a basically infinite number of patterns.
    I know about the Momento Pattern but momento also based on list which is a collection. Momento address a little different domain of the problem then savepoint pattern. i think momento is a subset of savepoint pattern. collection are used as reuseable components in language and now a days collections are standrad in major languages savepoint give simple implentation using reuseable parts with more friendly problem solving approch. i think "sovling any problem with collection is not called pattern" i dont know this rule. is this a rule? :)
  16. I know about the Momento Pattern but momento also based on list which is a collection.
    It doesn't need to use a list but could.
    Momento address a little different domain of the problem then savepoint pattern.
    Elaborate, please. What's different?
    i think momento is a subset of savepoint pattern.
    How? If you want to think this is a new pattern, I can't stop you. But I don't think many other people will think it is and that makes it useless terminology.
  17. It's simply a memento[ Go to top ]

    I can't help but agree with James on this. It's just an implementation of the existing memento pattern. There is no reason to introduce another name to a pretty much the same thing. One of the goals that patterns aim at is to simplify communication between different people by giving names to common solution. You are doing an opposite thing - giving a different name to the same solution.
  18. I can't help but agree with James on this. It's just an implementation of the existing memento pattern. There is no reason to introduce another name to a pretty much the same thing. One of the goals that patterns aim at is to simplify communication between different people by giving names to common solution. You are doing an opposite thing - giving a different name to the same solution.
    I'm happy to see my concept of 'pattern' is not alone :) but I guess it's sexy to publish you've identified and formalised a new pattern... Better luck next time, Faisal
  19. May be sounds like a simpler version of Memento pattern.. :) ~Rajesh.B