I also now have true read only transaction that set the underlying jdbc
connection to read only and FlushMode.Never for the session. And yes the
read only transactions are also committed so you do not spam your database
logs with rollback information.
2013/8/27 Martin Kersten
> Hi there,
>
>
>
On Sun, May 27, 2012 at 7:18 PM, Fight Ice wrote:
> Thx, I use HibernateSessionSource.create(). Is this thread safe?
Are sessions thread safe? No.
Kalle
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additi
Thx, I use HibernateSessionSource.create(). Is this thread safe?
On Sun, May 27, 2012 at 2:33 AM, Fight Ice wrote:
> java code:
> Transaction ts=session.beginTransaction();
> Criteria criteria=session.createCriteria(Item.class);
> criteria.add(Restrictions.idEq(product.getItem().getId()));
> criteria.setLockMode(LockMode.PESSIMISTIC_WRITE);
> Item item=(Item)cr
On Sun, 27 May 2012 06:33:09 -0300, Fight Ice wrote:
java code:
Transaction ts=session.beginTransaction();
Criteria criteria=session.createCriteria(Item.class);
criteria.add(Restrictions.idEq(product.getItem().getId()));
criteria.setLockMode(LockMode.PESSIMISTIC_WRITE);
Item item=(Item)criter