You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by soussou97 <db...@yahoo.fr> on 2006/10/25 13:11:31 UTC

synchronization

Hi;

It is enough to declare the write methods (insert, delete and update) like
synchronize for resolving the problem of the concurence ?
The synchronization/multithreading is a complicated issue and simply making
everything synchronized doesn't necessarily solve problems and can to cause
of performance problem.

regards;




-- 
View this message in context: http://www.nabble.com/synchronization-tf2507011.html#a6990072
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: synchronization

Posted by Jeff Butler <je...@gmail.com>.
This *might* solve concurrence if your app is the only user of the database,
and you app is never deployed on a clustered server.  But it's a horrible
price to pay - don't do it.

Concurrence is difficult.  You'll have to read about some of the standard
patterns and decide which one suits your application the best.  A good place
to start is Martin Fowler's book "Patterns of Enterprise Application
Architecture".  He covers several concurrency patterns in the book.  Here's
a link to a short description of the patterns:

http://www.martinfowler.com/eaaCatalog/


Jeff Butler




On 10/25/06, soussou97 <db...@yahoo.fr> wrote:
>
>
> Hi;
>
> It is enough to declare the write methods (insert, delete and update) like
> synchronize for resolving the problem of the concurence ?
> The synchronization/multithreading is a complicated issue and simply
> making
> everything synchronized doesn't necessarily solve problems and can to
> cause
> of performance problem.
>
> regards;
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/synchronization-tf2507011.html#a6990072
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com<http://nabble.com/>
> .
>
>