Re: [Zope-dev] Refresh trashes acquisition

2002-07-25 Thread Myroslav Opyr

Gary Speer wrote:

  I strongly encourage you to switch to the [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailing list

Why?

  as this one is dedicated to next-generation product enhancement as
  opposed to peer user assistance.

Reason rejected... Question was technical and was dedicated to zope-dev
list.

  The approach you are taking seems a bit convoluted and I, for one, do
  not understand the business/project objectives reason to construct the
  objects as you do and create the acquisition cvhallenge you hope to 
solve.

Of course there are questions of software design and questions of
implementation. There is probability that design is not perfect but
technical question remains. Even with poor (Ross, note, I do not tell
that it is now)design there should not be technical problem with
implementation.

Perhaps you can elaborate on the goal you hope to accomplish so
  others can suggest the better tools and object containment structure
  to use.  It seems earlier design decisions have taken you to solving
  issues that might not exist with an alternative,
  more-naturally-zope-like approach.

As the question appears they should be solved and Ross asked community
to help.

m.

P.S. It is really interesting what X-Spam-Status this message will get
;) the one of Gary had 3.2 :) Maybe there is a sense to lower threshold
from 5.0 to 3.0 ;)
-- 
Myroslav Opyr
zope.net.ua http://zope.net.ua/ ° Ukrainian Zope Hosting
e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
cell: +380 50.3174578



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Refresh trashes acquisition

2002-07-24 Thread Matthew T. Kromer

Ross Boylan wrote:

I find that when I refresh my product it destroys some of the
containment relationships.  Things start failing, and as far as I can
tell the only recovery is to completely rebuild the object.

This is a big problem, and if anyone could explain what is going on
and how to avoid it I would appreciate it.

Here is the result of aq_chain before the refresh:
[RankQuestion instance at 8dd5620,
OriginalSuborder instance at 8c9f8d8, EMailBallot instance at
8dfc870, __FactoryDispatcher__ instance at 8e73770,
ProductDispatcher instance at 83f0618, Folder instance at 8d5733

and after
[RankQuestion instance at 8dee2d0]
  

[...]

  


Hmm, while what you're referring to is refresh in the sense of a 
product reload, it's important to first state that *no* acquisition is 
expected to survive between transactions.

Each transaction must separately acquire its objects; if you try to pass 
wrapped objects between transactions or threads you're going to end up 
in trouble.

Secondly, when a product is refreshed, the extensionclass module will 
probably create new base classes for any ExtensionClass derived class 
file.  I dont *think* you can get much mileage out of knowing the id 
(address) of a class now, but be aware that a refresh will likely cause 
that address to change.  I have seen some bizarre errors where module 
constants changed because of a reload, and is tests broke because 
is tests the object address.

None of this is explicitly what you're asking about -- but I think what 
you're trying to do is in violation of the no wrapped objects should be 
stored past a transaction boundary rule.

However, I may be misreading your question too -- which is why I mention 
those two rules above so YOU can see if they make sense in your context.

-- 
Matt Kromer
Zope Corporation  http://www.zope.com/ 




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Refresh trashes acquisition

2002-07-24 Thread Florent Guillaume

Matthew T. Kromer [EMAIL PROTECTED] wrote:
 Hmm, while what you're referring to is refresh in the sense of a 
 product reload, it's important to first state that *no* acquisition is 
 expected to survive between transactions.

But subtransactions are ok, no? get_transaction().commit() is alright?

Florent
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )