"Herbers, Joe" wrote:

> Thanks for this and other responses to my post.  Yes, transactions will
> improve performance over EBs.  I didn't mention that initially we used tx
> across all our SBs and EBs.  However, this brought up a different problem:
> deadlock!  You have to be careful of situations such as SB1 touching EB1 and
> EB2 while SB2 touches EB2 then EB1 - this can result in deadlock and did for
> us.  Trying to untangle all possible scenarios of this is daunting so the
> first solution is to shut of tx.
>

This seems like a problem with your EJB Server (which I guess is Weblogic). WLS
is the only EJB Server I know that uses pessimistic concurrency for entity
beans. This is a design flaw, IMO, since you get deadlock problems, and since as
soon as your servers are clustered, you switch to optimistic concurrency.
All the other servers I know (IAS, iPlanet, SilverStream) use optimistic
concurrency. This means that you won't have deadlock, but that you must pay more
attention to your transaction and DB isolation settings, and that you might have
more transaction rollbacks.

JB.

>
> But probably the thing to do now is go back and try to add them in
> carefully.  But the possibility for deadlock looms since no one person (at
> least not on a large project) can know all the SBs that will access various
> EBs and the order they will do it in.  When asked about this, one WebLogic
> consultant's response was "all the systems I've seen have used only
> Stateless SBs with JDBC", hence my concern.  Guidnace on this is welcome.
>
> On Mon, 24 Jul 2000 10:22:25 -0700, Gene Chuang <[EMAIL PROTECTED]> wrote:
> >> We've seen that if people coded a sess bean to create a new EB and
> >> then call all the setters to define the content that the performance
> >> is terrible because the EB hits the DB for each setter.
> >
> >Not if you set the appropriate transactions!  For example, if your Session
> >bean is REQUIRES_NEW and your Entity bean is REQUIRED, then the db will be
> >updated just once:  at the end of the txn!  And on the same note, ejbLoad
> >will only be called once, at the beginning of the txn...  Hence the wise
> >usage of transaction management will give you wonderful performance gains!
>
> ===========================================================================
> 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".

--
Jean-Baptiste Nizet
[EMAIL PROTECTED]

R&D Engineer, S1 Belgium
Kleine Kloosterstraat, 23
B-1932 Sint-Stevens Woluwe
+32 2 200 45 42

===========================================================================
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".

Reply via email to