| Honestly Scott Marlow, I find IJ not allowing access to the Connection when the txn is marked rollback-only very surprising behavior. Yes, it is generally a bad idea to continue to process things with the database when the txn is marked thus, but nothing in any spec I know of requires this. Its just a behavior IJ chooses to implement. I think Sanne Grinovero's is correct and we will need to support this in some fashion. IMO IJ should simply return us the Connection. But short of that, I guess we will have to add handling for this case. My concern with us handling this though is that I am not sure we can properly distinguish this from any other case where the Connection simply is not available - aka I'm not sure we can discern this case from cases where we really do need to throw an exception. |