Dependends on the version of Tapestry. Earlier versions included an automatic commit.
On Thu, Jun 26, 2008 at 7:44 PM, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi, > > As what I understand now that transaction has to be committed to persist the > objects, following is a diapatcher, there is no commit, but the new PageLog > got persisted too, any idea? thanks, > > Angelo > > > public class LoggingDispatcher implements Dispatcher { > > private final HibernateSessionManager sessionManager; > > public LoggingDispatcher(ApplicationStateManager asm, RequestGlobals > requests, HibernateSessionManager sessionManager, IPLookup ipLookup) { > this.sessionManager = sessionManager; > } > > public boolean dispatch(Request request, Response response) throws > IOException { > > PageLog log = new PageLog(); > sessionManager.getSession().save(log); > > return false; > } > -- > View this message in context: > http://www.nabble.com/T5%3A-Hibernate-and-services-tp18147187p18147187.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]