Announcement Announcement Module
Collapse
No announcement yet.
Ibatis : having session to span multiple dao calls Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ibatis : having session to span multiple dao calls

    Hi,

    I'm currently evaluating IBatis, and struggling to see if it is possible to achieve prepared statements reuse between daos (subclasses of org.springframework.orm.ibatis.SqlMapClientTemplat e) calls.

    It seems you need to have the same ibatis session to achieve that.
    From what I can see, the only creation of session is in org.springframework.orm.ibatis.SqlMapClientTemplat e#execute.

    What I was expecting (or hoping for) is the ability to declaratively describe in my spring application context, the extent for an IBatis session (as we can do for a transaction).
    Is there any known way to achieve that ?

  • #2
    Not that I have much knowledge or experience with iBatis, what is it you are trying to do and why? Surely the only thing you need to span Daos is the transaction?
    Last edited by karldmoore; Feb 19th, 2007, 01:49 PM.

    Comment


    • #3
      I'm trying to make IBatis reuse prepared statements if the same DAO is called multiple times in a given transaction.

      But considering how IBatis / Spring interact and how IBatis implements the PreparedStatement cache, it seems it is needed to have the IBatis session be shared across the calls to the DAOs.

      Comment

      Working...
      X