[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] IdAS update proposals

>>> Jim Sermersheim 4/16/07 10:10 AM >>>
>>> Valery Kokhan <vkokhan@xxxxxxxxxxxxxx> 4/15/07 5:12 PM >>>
>Right now I'd prefer option 3 because I'm a little bit confused with
>the option 3.a. However I have to notice that if we introduce
>transactional support like IContext.commit() we should also provide a
>way like IContext.rollback() to restore local context state if
>transaction fails for some reason.
IContext.commit("Atomic") does just this.  The semantics are that if the transaction fails for some reason, all changes are rolled back (not committed).

>With regards to option 3a I have two point of confusion.
>My first point of confusion is proposed semantic of add*
>methods. The description of IDigitalSubject.addAttribute method says
>that when null is passed as attr parameter, "the digital subject
>returns an empty IAttribute (one with no values)". My question is which
>type of attribute will be returned if digital subject could contains
>two types?
I think I see what you're asking.  My intent was that it would return an IAttribute instance which had neither a type, nor any values.  We could optionally or also make addAttribute take a type argument so that the returned IAttribute has a type associated with it.

>My second point of confusion with option 3a is proposed
>TransactionSemantics parameter. My question is what will happens when
>first we call few methods with the semantic parameter set to
>"OnCommit" and then we call another method with the semantic parameter
>set to "Immediate"?
All updates which set it to "OnCommit" are held by the CP until IContext.commit is called.  All updates which set it to "Immediate" are committed immediately.  So, yes, you could mix these calls if you wanted.

>I'm thinking about option 3x where we rather refactor then remove
>build methods.
That what I intended with 3.a "... we remove the build* methods..."

>With regards to use cases I think we need to split use case 1 (add new
>subject). One is when the type of digital subject is know (i.e. we
>know what types of attributes could be added to the subject) and another
>when the type of digital subject is unknown.
Yes, let's do this.  I'm pretending not to work until this afternoon, I'll update the page then.