Java provide keyword "synchronized" to avoid conflict access and its grain-level could be decided as you need except objects are dispersed in ditributed places.
So has the transaction contains the same function?If it is,I don't know such idea is correct:if we need transaction within a bean object,we could use synchonized,if we need do transaction among serveral servers,we should use JTS.
-
Concept confusing between transaction isolation and synchronized (2 messages)
- Posted by: Jerry Zhu
- Posted on: September 28 2000 22:25 EDT
Threaded Messages (2)
- Concept confusing between transaction isolation and synchronized by Pankaj Vij on September 29 2000 09:24 EDT
- Concept confusing between transaction isolation and synchronized by Jerry Zhu on September 29 2000 21:30 EDT
-
Concept confusing between transaction isolation and synchronized[ Go to top ]
- Posted by: Pankaj Vij
- Posted on: September 29 2000 09:24 EDT
- in response to Jerry Zhu
Hi
Transactions are more concerned with backend ; I mean databases ; rather than the code.If you define a transation isolation level ; it will be used by the underlying database to restrict access to tables as defined .Synchronised also performs the same type of operations ; though on the code ; so that no two threads enter the code that u want to be threadsafe.
Hope this helps
Pankaj -
Concept confusing between transaction isolation and synchronized[ Go to top ]
- Posted by: Jerry Zhu
- Posted on: September 29 2000 21:30 EDT
- in response to Pankaj Vij
Pankaj:
I think the transaction represent an atomic business operation ,maybe include resources as database,port,file...,maybe not include resources but just only some business computation.I think synchonized is one of implementations of transation,but the oringinal target of synchronized is not for transaction,but for threadsafe.