Prevent of commit

From: Jan Lendholt (jlendhol..otmail.com)
Date: Tue Jul 31 2007 - 09:26:51 EDT

  • Next message: Michael Gentry: "Re: Prevent of commit"

    Hey Folks,

    another question:

    I created an object via context.newObject(Service.class);

    Before I do a context.commitChanges() I check if there are any input errors
    in the input fields that should be set to the object. If we encounter an
    exception, we abort the creation / editing of the current object.

    Now, in the meantime, I take another window to create another object, like
    context.newObject(Person.class) and call the context.commitChanges().

    Now, the old object, at which the check of the data failed, ist committed as
    well.

    Is there any method that prevents the commit of an object?
    I just found context.unregisterObjects... is this the only possibility to
    prevent a commit?

    Background:

    We have a swing-app using the objects and passing them in constructor calls.
    If we encounter any problems upon editing this passed object and commit
    changes on another object, all party changed things will be committed as
    well, which is unliked by us.

    I hope I could explain clearly.

    Bye, Jan

    _________________________________________________________________
    Haben Spinnen Ohren? Finden Sie es heraus – mit dem MSN Suche Superquiz via
    http://www.msn-superquiz.de Jetzt mitmachen und gewinnen!



    This archive was generated by hypermail 2.0.0 : Tue Jul 31 2007 - 09:27:25 EDT