Apparently distributed transactions (cross EJB servers from different
vendors) do not work well, unless the transaction model is very simple
(i.e. no diamonds, or cross reference).
I use the generic term *distributed transactions* since this is not an
EJB only problem. RDBMS and e-commerce systems are also prone to this
issue. A transaction context can be propagated from A to B, but if it
can go from A to B and B to A (and possibly a C in the middle), you're
on your own.
An easy solution around this problem is to always go through server A,
never go to B directly. A may use B and B may use A.
By going through A you invoke an entity bean in A that actualy invokes
an entity bean in B. This entity bean implements locking, allowing A to
perform deadlock detection (whether or not B does the same).
arkin
> I have not noticed anyone discuss the HUGE problem with pessimistic
> concurrency, which is dead-lock. If I have two clients, one which
> accesses bean A and then bean B, and another which access bean
> B and then bean A, these two transactions will probably dead-lock
> the server.
>
> Detecting this dead-lock (particularly in the case of a distributed
> system, with A and B running in different EJB containers, possibly
> from different vendors) is extremely hard, to put it politely.
>
> Perhaps a solution here is transaction timeouts. I am curious if
> others have experience with breaking these types of deadlocks in
> real systems. (Not just in a database, where it is much easier to
> "know everything", but in a distributed system.) And, are people
> willing to wait for a timeout to expire to be able to continue using
> those beans. I doubt it.
>
> Again, we could easily add the feature you request, but I am not
> convinced you will be so happy when the system comes to a screeching
> halt.
>
> -jkw
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".