Hello.
I use magma db for local usage. Should I use only single session?
I ask because now I use separate sessions for processing different kind of objects in my root dictionary. At application startup I open 4 sessions for each kind of objects. And I have many processes that operate objects by this sessions. Problem that sometimes strange magma exception MagmaAlreadyInTransaction happen. I cant understand reason because magma sessions is thread safelly.
Best regards, Denis
You should be able to use multiple sessions to the same repository in one image. They each see their own copy of the persistent model, so don't let the copies reference each other. Since Magma session employs its 'guard' on practically everything, it should be ok for multiple Processes to use one session.
These kinds of bugs can be hard to track down. Are you only doing commit: [] within each process or are #begin sends in separate places in the code from #commit? Can you simplify down to one Process per session? Just 4 processes, 4 sessions?
On Wed, Dec 8, 2010 at 1:53 PM, Denis Kudriashov dionisiydk@gmail.com wrote:
Hello.
I use magma db for local usage. Should I use only single session?
I ask because now I use separate sessions for processing different kind of objects in my root dictionary. At application startup I open 4 sessions for each kind of objects. And I have many processes that operate objects by this sessions. Problem that sometimes strange magma exception MagmaAlreadyInTransaction happen. I cant understand reason because magma sessions is thread safelly.
Best regards, Denis
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
magma@lists.squeakfoundation.org