Re: 2.1 Spec: detached-dirty parameters to makePersistent() when DetachAllOnCommit=tru
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > Re: 2.1 Spec: detached-dirty parameters to makePersistent() when DetachAllOnCommit=tru




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: 2.1 Spec: detached-dirty parameters to makePersistent() when DetachAllOnCommit=tru  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-09-07 12:11 PM

Hi,
 
>
> Sounds great to me.  There's some fine print here, though:  Just
> because CopyOnMakePersistent is set to true, that doesn't mean that
> makePersistent() will *always* return copies.  For example, current
> specified behavior says that when DetachAllOnCommit=3Dfalse and calling
> makePersistent() with a transient parameter, the returned object will
> be the same instance, now transitioned to persistent-clean.  This
> behavior won't change because of our new option (regardless of
> whether it is set to true or false), and we don't want folks to be
> confused about that...

I prefer the name you suggested to the one I originally wrote. Comments :-

1. "DetachAllOnCommit" has no bearing on what makePersistent() does - it=20
defines what happens on tx.commit() only. makePersistent will (currently)=20
return the original object if persisting a transient and return a copy if=20
attaching.

2. How about calling it CopyOnAttach ? makePersistent has two roles ...=20
persisting new, and attaching detached. I don't ever see a need to add=20
control to the operation of persisting a new object, so the=20
name "CopyOnAttach" distinguishes to just the attach process.




=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:55 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register