cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <>
Subject ObjectContext per thread or per app?
Date Wed, 16 Feb 2011 09:50:16 GMT

sorry, a dumb question:

do I need a ObjectContext per thread or per app?

In fact I wrote a spring bean (its a singleton) which creates one
single ObjectContext for all my app. In other terms, multiple threads
will use it to insert, read, commit etc.
Since ObjectContext offers the commit method, I am now doubting if
this was correct. I feel it might be good to have an ObjectContext for
each thread/user. Or does the ObjectContext know what happened as one

Can you advise?



View raw message