Michael Korotin [
https://community.jboss.org/people/michael_jboss] created the discussion
"Pessimistic lock outside singleton bean."
To view the discussion, visit:
https://community.jboss.org/message/811411#811411
--------------------------------------------------------------
Hello!
I am using pessimistic lock in jpa 2 and ejb3.1. When i call find method for my entity(
* BalanceEntity balanceEntity = em.find(BalanceEntity.class, 1L)*
), after that i call line 2:
* em.refresh(balanceEntity, LockModeType.PESSIMISTIC_WRITE);//*+line 2+
* //*+change *balanceEntity*+**
The +line 2+ does not work in Stateless bean, but it works in singleton bean.
Can i use pessimistic lock outside singleton bean?
Thank you.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/811411#811411]
Start a new discussion in EJB3 at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]