Interesting... the picture is becoming clearer now...
So.. if the container does not provide synchronization, locking or clustering
(although it may provide clustering depending on the vendor), then I'm beginning
to wonder what ejb really adds to a setup.
Currently we're using a model 2 servlet/jsp setup, in which we instantiate our
own business objects from the database. We've written our own object persistence
code that implements the standard CRUD methods (using bean reflection) and also
does optimistic locking. (This was surprisinging simple - only 500 lines of
code). This seems to do *more* than the BMP stuff in EJB.
The only advantage of EJB above our current "simple" setup I can perceive is the
distributed transaction stuff (I am again assuming distributed transactions are
supported in EJB) - even that could be done via the JTS though.
Apart from that, what does EJB do?
Can anyone enlighten me? Much respect as I have for Sun - (and I am a staunch
Java supporter) I am beginnning to think it's a bit of red herring....
"Lahooti, Hamid" wrote:
> >From: Tim Fox [mailto:[EMAIL PROTECTED]]
> >Client A commits his changes to the underlying database.
> >How does ejb ensure that the in memory cached instance of "John Smith"
> >on server B is updated to reflect the changes made by Client A?
> EJB does not mandate clustering let alone synchronisation between components
> arranged in a cluster.
>
> >Does it fire off an "update" event to all the servers?
> No. Not mandated by EJB.
>
> >If so, and we have n servers then I image we have a scalability problem
> >of order n-1. (Ie the server has to notify every other server that the
> >update has happened)/
> >If it doesn't then how can I possibly use entity beans in a load
> >balanced environment?
>
> You have the following options:
>
> Go for Commit Option C and lose the benefit of bean instance caching
> Select a vendor that does support option A with multiple JVMs
> Combine Option A with your own database trigger driven update
>
> Regards,
> Hamid
>
> ===========================================================================
> 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".
--
Tim Fox (��o)
Hyperlink interactive
http://hyperlink.com
email: [EMAIL PROTECTED]
phone: +44 (0) 207 240 8121
===========================================================================
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".