It does not matter how many times you fall,what matters is how many times you stand back.
SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
It does not matter how many times you fall,what matters is how many times you stand back.
The doubt i am having is if method1, method2 and method3 executes with 3 independent Transactions and only method 3 results in Runtime Exception. If we are discarding the bean we are discarding the effects caused by method1 and method2 as well. Ideally only effects caused by method3 should get rolled back.
Thanks and Regards
It does not matter how many times you fall,what matters is how many times you stand back.
SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
you'll get a reference to a new instance, so instance variable counter (its conversational state) will be set to 0.
It does not matter how many times you fall,what matters is how many times you stand back.
Originally posted by Juggy Obhi:
I believe that when you regain the reference (to the new bean), Container should be intelligent enough to return you a bean with counter=10 and Tx1 and Tx2 performed in method1 and method2 respectively committed in the database. In other words a bean exactly similar to the original bean right before method3().
SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
It does not matter how many times you fall,what matters is how many times you stand back.
This guy is skipping without a rope. At least, that's what this tiny ad said:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|