setRollbackOnly() and what is thrown by commit()
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > setRollbackOnly() and what is thrown by commit()




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    setRollbackOnly() and what is thrown by commit()  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-13-06 01:09 PM

Hi,

in the JDO2-final spec 13.4.5
<spec>
Once a transaction has been marked for rollback via setRollbackOnly, the
commit method will always fail with JDOFatalDataStoreException. The JDO
implementation must not try to make any changes to the database during commi
t
when the transaction has been marked for rollback.
</spec>

whereas in the javadocs for javax.jdo.Transaction "setRollbackOnly" we have
"Sets the rollback-only status of the transaction to <code>true</code>. Afte
r
this flag is set to <code>true</code>, the transaction can no longer be
committed, and any attempt to commit the transaction will throw
<code>JDOUserException<code>."

So which exception should be thrown here ... JDOFatalDataStoreException or
JDOUserException ? probably the version in the spec.

Do you require a JIRA ?

--
Andy






[ Post a follow-up to this message ]



    Re: setRollbackOnly() and what is thrown by commit()  
Craig L Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-13-06 06:11 PM






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:51 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register