After years of rolling my own ORM, I am loving Hibernate, CMP / CMT, etc: thanks for doing everything for me!
My application consists mostly of MDBs which process chunks of work in parallel. Since some chunks overlap, I fully expect many to fail with a StaleObjectState exception. That's ok -- my transactions are structured so that they shuffle through pretty quickly anyway. I have been leaning on message redelivery as a way of retrying transactions without writing any code.
In general things have worked fine, but I am left with some nagging doubts.
-- Is this an abuse of JMS? Is there some proper way I'm supposed to flag a transaction for retry without managing my own transactions?
-- If it's not an abuse, is there any way for me to catch and convert to warnings these StaleObjectState exceptions?
-- Are resources like JDBC connections released smoothly in the case of this kind of rollback?