java - Open Session In View (OSIV) and Hibernate Session flush -


following hypothetical situation on spring 3.x , hibernate3.x

i have service layer in spring invokes 3 daos construct model. daos transactional(@transactional) , have lazy loaded hibernate collections.
service method causes few updates ,along fetch of data.

a typical dao method follows -

public o create(i entity) throws genericexception {     getorcreatesession().save(entity);     return (o)entity; } 

i have following questions around osiv -
1.how many times session flushed(database update) in default auto mode?
2.can osiv made extend session beyond single request (to conversation)?

  1. the auto flush mode execute pending dml statements when:

    • the current transaction committed
    • when query might target entity table, that's current enqueued flushing
  2. spring webflow has support long conversations.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -