Test case
Run the testcase
Notes
- How to set-up:
- First create two jdbc Resources in glassfish jdbc/test and jdbc/test2 pointing to separate connection pools
- Goto the testcase and check that the database is empty shortcut
- Goto the testcase and populate the database shortcut
- Goto the testcase and check that the database is populated shortcut
You should see four (4) first objects and no (0) second objects
- Goto the testcase and run the test shortcut
This should give the exception that is the issue. The cause of the issue is that the two datasources
are being joined into the same transaction in TestImpl.makeSeconds() even though we are only
performing read-only access on the First objects.
- Goto the testcase and check that the database is populated shortcut
You should see four (4) first objects and no (0) second objects since the exception claims that the transaction failed.
I see four (4) seconds. Somebody is lying about whether the transaction failed or not! secondary issue
- How to do the null test:
- First create two jdbc Resources in glassfish jdbc/test and jdbc/test2 pointing to the same connection pool
- Goto the testcase and check that the database is empty shortcut
- Goto the testcase and populate the database shortcut
- Goto the testcase and check that the database is populated shortcut
You should see four (4) first objects and no (0) second objects
- Goto the testcase and run the test shortcut
This should be no exception.
- Goto the testcase and check that the database is populated shortcut
You should see four (4) first objects and four (4) second objects.
- Observations:
- Only confirmed this test case with Derby. Need to check against other databases.
- Issue with multiple entity managers only happens when they point to different connection pools.