| Scenario I: | |
| tx { | |
| Bean1 -> getConnection -> insert data into table -> call bean2 -> close connection | |
| Bean2 -> getConnection -> update above data -> close connection | |
| } | |
| tx { | |
| Bean1 -> new transaction query that data indeed got updated | |
| } | |
| --- | |
| Scenario II: | |
| tx { | |
| Bean1 -> getConnection -> insert data into table -> close connection -> call bean2 | |
| Bean2 -> getConnection -> update above data --> close connection | |
| } | |
| tx { | |
| Bean1 -> new transaction query that data indeed got updated | |
| } | |
| --- | |
| Scenario III: | |
| tx { | |
| Bean1 -> getConnection:c1 -> insert data into table -> getConnection:c2 | |
| -> insert some more data -> call bean2 -> close c1, c2 | |
| Bean2 -> getConnection -> update above data --> close connection | |
| } | |
| tx { | |
| Bean1 -> new transaction query that data indeed got updated | |
| } | |
| --- | |
| Scenario IV: | |
| tx { | |
| Bean1 -> getConnection:c1 -> insert data into table -> getConnection:c2 | |
| -> insert some more data -> close c1,c2 -> call bean2 | |
| Bean2 -> getConnection -> update above data --> close connection | |
| } | |
| tx { | |
| Bean1 -> new transaction query that data indeed got updated | |
| } | |