-
1. Re: local or xa datasource
wdfink Apr 11, 2012 4:01 AM (in response to ashvish)1 of 1 people found this helpfulyou use the same DB for both DS right?
In that case I suppose that the DB is aware that both Tx are the same.
An XA-datasource will not help, it is just a protocol to enlist more than one resource in one transaction.
You might try a no-tx datasource, see config datasources.
Also you might rethink the design maybe you can use another isolation level, SERIALIZABLE will be very restrictive and might slow down your application.
-
2. Re: local or xa datasource
ashvish Apr 11, 2012 4:31 AM (in response to wdfink)Yes I am using the same DB for the same DS. I wonder if the issue has got something to do with the read call coming from a connection in a different pool? The same read call from the first connection pool doesn't face any problems, I wonder why?
-
3. Re: local or xa datasource
wdfink Apr 11, 2012 5:42 AM (in response to ashvish)I think it will be an issue of Tx demarcation. Depend on what connection, isolation level and DB (driver) you use the two connections are in the same or different Tx.
I'm not sure whether a no-tx-datasource will non-block read from a DB where a Tx is running with 'isolation serializable'.
So if you try to achieve a higher performance you should think about 'optimistic locking' that will be a common approach for high parallel access.
-
4. Re: local or xa datasource
ashvish Apr 13, 2012 4:28 AM (in response to wdfink)The interesting thing is that I did some load test using the 3 isolation levels serializable, repeatable read and read committed but couldn't notice any significant improvement in performance.
-
5. Re: local or xa datasource
wdfink Apr 14, 2012 1:48 PM (in response to ashvish)Such test are difficult, if you have no conflicts (e.g. change/read records in parallel) you will not see any difference.
unfortunately this can change if you go life and increase load or change the client behaviour.