-
Bug
-
Resolution: Done
-
Critical
-
EAP 5.0.0, 4.3.0.GA_CP07
-
None
-
JBoss-EAP-4.3_CP7, MySQL 5.0.84, MySQL JDBC Driver Version 5.1.10 , JDK-1.6.0_17
-
Documentation (Ref Guide, User Guide, etc.), Compatibility/Configuration
Unable to execute read-only query when UserTransaction set to setRollbackOnly() . This does not appear to be a problem associated with transactions but JCA. A change of status from active to rollbackOnly within the same transaction is not in itself sufficient grounds to require the rejection of the second sql statement, since it does not endanger the ACID guarantees. Executing further operations on a tx that is going to rollback is arguably a waste of effort, but won't actually result in data inconsistency even if some of them are updates - they will all be reverted when the tx rolls back.
Test code :
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
Connection connection = null;
try
catch (SQLException ex)
{ ex.printStackTrace(); } catch (NotSupportedException ex) { ex.printStackTrace(); }catch (SystemException ex)
{ ex.printStackTrace(); }catch(NamingException e)
{ e.printStackTrace(); }finally
{ if(out != null) out.close(); closeConnection(connection); }}
- is related to
-
JBAS-7195 On executing readonly query, WrappedConnection.checkTransactionStatus throws exception when transaction is marked for roll back
- Closed