Hi,
> Sounds like a classical deadlock to me. The usual principles apply (lots
> of books cover this topic).
>
> What do you mean ?
> Where did I mess, and what do I have to do ( or read, or perhaps
> understand.... :( )
> to make my application run better.
Deadlock=if transaction 1 uses A then B and transaction 2 uses B then A,
then it is possible that 1 is waiting for 2 to release B and 2 is
waiting for 1 to release A at the same time. Nothing will happen since
they're waiting for each other, and you have what is called a deadlock.
There are many different kinds of solutions to this problem. In your
case you could try always using the accounts in the same order, i.e. if
account A has primary key "1234" and B has pk "5678" then you should
always use "1234" before "5678" since the pk is "smaller". This will
ensure a natural order in the way they are used and will thus avoid
deadlock.
You should also try to use transactions as seldom as possible since they
will increase the possibility for deadlocks.
/Rickard
--
Rickard �berg
I'm afraid I'd replied too fast : I got the same problem when I choose to do
it
without Transaction.
In fact if the method in the session use one method of an entity, I've no
problem.
But as soon as I try to use 2 methods of an entity in the method of the
session,
my program stop and sleep ?
It seems strange to me .
Do you have an idea of what th eproblem may be?
Thanks,
Olivier
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]