What you can do is just set

<transactionManager.... commitRequired="true">

And you'll never have to worry about it again.

Cheers,
Clinton

On 5/9/05, John Didion (JIRA) <ibatis-dev@incubator.apache.org> wrote:
Add ability to manually mark session dirty
------------------------------------------

         Key: IBATIS-125
         URL: http://issues.apache.org/jira/browse/IBATIS-125
     Project: iBatis for Java
        Type: New Feature
  Components: SQL Maps
    Versions: 2.0.9b
Environment: All
    Reporter: John Didion

We recently upgraded to 2.0.9b from 2.0.4. The one breaking change was that SqlMapSessionImpl's session field was changed from public to protected. While I understand and support this change, it makes it impossible for us to use stored procedures that do both an update and a select. Using update() means we can't return a result set, and using queryForObject/List means the transaction won't get committed (because setCommitRequired(true) is not called), so the update doesn't work.

It would be great if you could expose the following method on SqlMapSessionImpl:

public void setCommitRequired(boolean required) {
  this.session.setCommitRequired (true);
}

I think this is probably preferable to adding a queryAndUpdate method, since that type of operation is rare (and probably not encouraged).

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Reply via email to