mounting obj to more than one zodb location
whats happens when you create a persistent object and mount it to multiple points on your zodb. do you get a shared ref or multiple copies of the object? kapil
whats happens when you create a persistent object and mount it to multiple points on your zodb. do you get a shared ref or multiple copies of the object?
..shared ref if you do it like you say you are :-) I'd love to see ObjectManagers support this. ...yes, there are security implications (the object has two or more security paths, depending on how you access it) but if you take that into account, it provides for some pretty impressive flexibility. However, you can quite often do something funky with a __bobo_traverse__ method to get around the need for this :-) cheers, Chris
ender wrote:
whats happens when you create a persistent object and mount it to multiple points on your zodb. do you get a shared ref or multiple copies of the object?
It depends on the product you use for mounting, but generally you'll get a shared database with independent connections. So it will work, but if you make conflicting changes, the transaction should fail. This is only an artifact of the current implementation, though. Shane
Shane Hathaway wrote:
It depends on the product you use for mounting, but generally you'll get a shared database with independent connections. So it will work, but if you make conflicting changes, the transaction should fail.
Oooo... was this thread about mounted databases? Sorry, I got the wrong end of the stick ;-) Chris
participants (3)
-
Chris Withers -
ender -
Shane Hathaway