Help for local repository usage

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help for local repository usage

Denis Kudriashov
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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: Help for local repository usage

Chris Muller-3
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 <[hidden email]> 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
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>
>
_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma