Ben Engber wrote:
> Does anybody have an idea whether it's appropriate to try and use EJBs in
> an Internet application?
Well, there's no such thing as THE Internet application. If security and
transaction properties are important such as in e-business applications EJB
come in handy, if you just want to browse data the benefit may be limited, if
you use the wrong pattern EJB may be counter productive.
> >From people I've talked to, most high traffic sites have given up CORBA
> based appservers for direct database access because they just didn't
> perform at traffic levels of more than a few hundred thousand page views
> per day. I've been building a large application based on EJB, and am
> concerned about performance.
Well, CORBA is a powerful tool, when you use it right - but I have seen lots of
badly designed IDL. I guess that's where those folks are coming from.
CORBA allows to build sophisticated caching mechanisms, do very well with
mult-threading etc. I have seen people keeping all the data for browsing such
as financial news in an in-memory cache. Memory is cheap after all.
> I guess my question is what do EJB's buy me? It seems that they offer a
> simplified programmatic interface for transactions, but at the expense of
> performance. If that's the case, then I'd rather stay away from them.
That's probably somewhat true. You can use stateless session beans but they
don't buy you much.
> On the other hand, it seems like Entity Beans could handle in-memory
> caching of data, greatly reducing SELECTs on the DB. But my implementation
> (WebLogic) doesn't do this implicitly, which makes me wonder again, what
> are they for?
Entity beans are specifically targeted towards transactions. Caching is a value
add of CMP implementation BMP prevents you from caching.
> Similarly, I've been reading with interest the recent discussion about
> moving entity bean finder methods over to session beans. It makes a lot of
> sense to me. Can someone tell me the advantage of having these methods in
> a session bean rather than in a regular Java class?
I have such an example in my book. It reduces the overhead creating (many!) EJB
instances which you may never want to touch.
Cheers,
Andreas
--
"Programming with Enterprise JavaBeans, JTS and OTS" is now available. Collect
all three!
www.wiley.com/compbooks/vogel
===========================================================================
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".