Atomikos Forum |
|
Here is the environment:
Postgres + tomcat + Spring + Atomikos. Here is the flow: Start a transactional method. Suspend the transaction and create a table in a NOT_SUPPORTED method. Continung the transaction and check if the table exists (not committed yet). I got random results. Sometimes, the table is visible and sometimes it is not. Is this the expected behavior? In mysql, creating table implies auto commit so the table will be visible for sure. I thought maybe the problem was because the connection objects for table creation and checking are different, causing the table invisible if they are different and visible if they are the same. But there are cases that the table is visible even when the connection objects are different. I will change the NOT_SUPPORTED method to use "RequiresNew" which works fine. I just want to know what I should expect with NOT_SUPPORTED within a transaction. Should I see the DB updates from this "NOT_SUPPORTED" block or not in when transaction resumes. Thanks! |