"Kenneth D. Litwak" wrote:
> I didn't follow the start of this thread, but I'd like to make a suggestin if
> it's relevant. I caught the end of a very good EJB presentation at JavaOne last
> June and the speaker said thatfor performance reasons, you wouldnot want an
> applet to directly interact with an EJB. Using a pieceof middleware would be
> much more effecient thanpassing entity bean info backa nd forth from EJB server
> to client and back again. Plus, of course, the less coupled the client
> (whatever it is) is to a specific middle tierimplementation, the better. That's
> not because I dislike EJBs. I think they're a great idea. It's simply an issue
> of code maintenance. I'd always vote for a client sending a command object to a
> tier twoprogram to ask it to do work on the client's behalf. Just my $.02.
Not sure what you mean here. If you're talking about clients doing lots
of set* calls instead of setData-type calls, sure, the overhead is more
or less linear with the nr of calls, so you'd want to minimize those.
One of the best way to do this is to use this technique (=use
data-objects):
http://www.javaworld.com/javaworld/jw-11-1999/jw-11-ejb.html
But I think you have misunderstood why you shouldn't call an Entity
directly from a client (client being an applet or application for
simplicity). Part of the answer is in the above article, but part of it
is in the notion that your client should contain as little intelligence
as possible. By moving this into session beans on the server you (often)
automatically minimize the nr of calls needed to accomplish a specific
task. By doing this you also make it easier to put a new frontend on
your application. Changing from an applet-client to a servlet-client is
much easier if you from the beginning has made sure that the applet only
contains GUI code.
I hope that made sense...
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684
===========================================================================
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".