Ask questions and see you at September, 2nd, 6.PM. CET: http://www.ustream.tv/channel/adambien
Also checkout recent episode:
Please keep the questions Java EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions.
Hi Adam, do you think it is possible to use database to check race condition? a request looking like :
begin transaction
Query query = em.createQuery(
"UPDATE Account SET amount=amount-:removedAmount WHERE id=:id and amount>:removedAmount");
query.setParameter("id", accountid);
query.setParameter("removedAmount",105);
int updateCount = query.executeUpdate();
transaction commit
if(updateCount==1){
return 'success';
}
do you think this could work?
Thanx a lot for your podcast :)
Fred