|
/** |
|
public static boolean foo(Object s) throws IOException{ |
|
|
|
Throwable throwable = null; |
|
Context context = ContextDelegator.getInstance(); |
|
boolean commit = true; |
|
boolean result = true; |
|
for( int i=10 ; i>0 ; --i) |
|
{ |
|
context.init(atomicBlockId, metainf); |
|
try |
|
{ |
|
result = foo(s,context); |
|
} |
|
catch( AbortTransactionException ex) |
|
{ |
|
context.rollback(); |
|
throw ex; |
|
} |
|
catch( TransactionException ex) |
|
{ |
|
commit = false; |
|
} |
|
catch( Throwable ex) |
|
{ |
|
throwable = ex; |
|
} |
|
|
|
if( commit ) |
|
{ |
|
if( context.commit()){ |
|
if( throwable != null) |
|
throw (IOException)throwable; |
|
return result; |
|
} |
|
} |
|
else |
|
{ |
|
context.rollback(); |
|
commit = true; |
|
} |
|
} |
|
throw new TransactionException(); |
|
|
|
} |
| */ |
--
You received this message because you are subscribed to the Google Groups "Deuce-STM developers" group.
To post to this group, send email to deuce-stm-...@googlegroups.com.
To unsubscribe from this group, send email to deuce-stm-develo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/deuce-stm-developers?hl=en.