Re: Support for nested transactions

2018-08-10 Thread Dan Haywood
Hi Vladimir, That might well work, but double check if that also sets up a transaction also. I can't remember if there's also a similar doInTransaction (...)? Basically the design is usually a single transaction within a single session. HTH, Dan. On Fri, 10 Aug 2018, 14:19 Vladimir Nišević,

Re: Support for nested transactions

2018-08-10 Thread Vladimir Nišević
Hi Dan, we found that simply starting new Thread and using IsisContext works as well. Would be that also feasible approach? Regs Vladimir new Thread(() -> { IsisContext.getSessionFactory().doInSession(() -> doSomeStuffWithNewDatabaseTransactionHere); }).start(); Am Fr., 10. Aug. 2018 um

Re: Support for nested transactions

2018-08-10 Thread Vladimir Nišević
Hi Dan, thanks for the fast reply! Yes, we tried already with TransactionsService but this is not enough since this supports only one at the time. We will go for the solution using AbstractIsisSessionTemplate! Thanks Vladimir Am Fr., 10. Aug. 2018 um 10:06 Uhr schrieb Dan Haywood <

Re: Support for nested transactions

2018-08-10 Thread Dan Haywood
Hi Vladimir, A couple of ideas which might help. First, there's the Transactions device that allows you to commit the automatically created transaction and then start a new one. This lets you have multiple transactions within a given request/session. However, there's no support for catching