|
You're right, the transaction boundary in the consumer isn't correct either. I suspect that's because of
HSEARCH-640
, at that time we introduced OptionallyWrapInJTATransaction to actually connect to JTA.
Some background: the original MassIndexer as I was using it, wasn't affected by any transaction timeouts. It was working fine in JBoss 4 (which is what I was using at the time). It turns out I didn't have any timeouts problems because I didn't "link" the transaction to JTA properly. Then in JBoss 6 the container would detect that you were doing something suspicious, and its DataSource would prevent you to open a JDBC connection.. so at that point we "fixed" it by connecting to JTA. I guess that's when we started seeing people complaining about timeouts.. but indeed, as you say the integration with JTA is using an unreasonable scope.
The Session is cleared periodically though, the code doing it just a bit hidden 
Would be great if you could automate such a test.
|