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)?
the auto flush mode execute pending dml statements when:
- the current transaction committed
- when query might target entity table, that's current enqueued flushing
spring webflow has support long conversations.
Comments
Post a Comment