----- Original Message -----
From: "Joe Herbers" <[EMAIL PROTECTED]>
> Hmm...could you elaborate on this a bit more? If I only
> mark the EB as TxReq and mark the SB as TxSup (or TxNotSup)
> then when the SB invokes several EB methods in a row, will
> each get its own tx? If so, then this doesn't really help,
> right? In other words, do I have to force a tx to be
> started in the SB by marking its methods with TxReq? As
> mentioned in a related response to this, I am worried about
> deadlock when there are various SBs accessing overlapping
> sets of EBs (possibly in different orders which is what has
> caused us deadlock in the past).
If your session bean is marked as Supports, the, yes, you will see the
behavior you describe. Another poster recommended using bulk
accessors/mutators on the entity bean if this is transaction marking is
necessary to your design. I'm not sure that it is.
I didn't find your post that you alluded to regarding deadlocks. The spec
states that access to entity beans will be serialized. There are two common
approaches to implementing this requirement.
1. Optimistic - the server creates an instance of the entity bean for each
concurrent client access. This approach provides high availability and
relies on the database to perform the necessary concurrency protection.
2. Pessimistic - the server "queues" multiple client requests for a single
entity bean.
I am under the impression that WebLogic (your server) uses the pessimistic
approach internal to its server. I can imagine that the deadlock scenario
that you refer to can exist given the serialized requirement of this server.
It may be possible to eliminate this deadlock by introducing a new session
bean (acting as a semaphore) that coordinates the sequence of using entity
beans. By studying the methods used to resolve threading deadlocks, you can
apply them to your bean design.
jim
===========================================================================
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".