Themuppeteer
Programmer
Hello,
Can anyone tell me what happens when you do the following thing in J2ee (in jboss for instance)
I have 2 session beans with the first a function f1 and second the function f2, each calling the same 2 entity beans.Each function runs in a transaction as usual in J2ee
f1()
{
a.changeIt();
b.changeIt();
}
f2()
{
b.changeIt();
a.changeIt();
}
f1 and f2 run at the same time.
a and b are entity beans.
Normally you would have a deadlock situation here.
Will a and b be locked from the start of the function ?
or will it just create the deadlock and then break it with an exception and rollback (so nothing will have happenned ?
What exactely will go on here ?
Thanks.
Greetz,
NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
"Those who say they understand chess, understand nothing"
-- Robert HUBNER
Can anyone tell me what happens when you do the following thing in J2ee (in jboss for instance)
I have 2 session beans with the first a function f1 and second the function f2, each calling the same 2 entity beans.Each function runs in a transaction as usual in J2ee
f1()
{
a.changeIt();
b.changeIt();
}
f2()
{
b.changeIt();
a.changeIt();
}
f1 and f2 run at the same time.
a and b are entity beans.
Normally you would have a deadlock situation here.
Will a and b be locked from the start of the function ?
or will it just create the deadlock and then break it with an exception and rollback (so nothing will have happenned ?
What exactely will go on here ?
Thanks.
Greetz,
NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
"Those who say they understand chess, understand nothing"
-- Robert HUBNER