Vote count:
0
I a newbie and curious to know about software transaction memory in java. My research professor has asked me to understand about this concept and provide a simple hello world example. Though i have good understanding of core java i am not able to get through this software transaction memory.
Can anybody point me in the right direction to get this started? Here is a sample code that my professor shared
T r a n s a c t i o n t x = new T r a n s a c t i o n ( i d ) ;
b o o l e a n done = f a l s e ;
w h i l e ( ! done ) {
t r y {
t x . B e g i n T r a n s a c t i o n ( ) ;
/ / t x n l code
done = t x . CommitTransaction ( ) ;
} c a t c h ( A b o r t E x c e p t i o n e ) {
t x . A b o r t T r a n s a c t i o n ( ) ;
done = f a l s e ; }
}
asked 1 min ago
Aucun commentaire:
Enregistrer un commentaire