We've run systems like this, using EJBs heavily (and interlinked EJBs, at
that). Depending on your server - we use Orion - the performance is pretty
good. EJBs don't have a performance hit every invocation, unless they're not
cached - and most EJB containers have mechanism by which you can tell them
that they have exclusive access to the data store (thus, if you've already
loaded a given primary key, access to it *again* is VERY quick, comparable
to accessing an object via HashMap.)
Another benefit is abstraction. Pooling connections is all well and good,
but you're talking about moving functionality to the application - which
means maintenance. You also lose scalability, because a pure bean isn't
distributable - whereas an EJB, by definition is. (Find that you load down
your container with a bean that takes a lot of CPU/RAM? Move it to another
machine. Your application code won't notice.)
>From: "M. Simms" Reply-To: [EMAIL PROTECTED] To:
>[EMAIL PROTECTED] Subject: Re: MVC, EJBs and Oracle Date: Fri, 25
>May 2001 18:13:55 -0400
>
>1) You of course "stress tested" with implementation with something like
>Mercury's tools and such that would simulate 1000+ users hitting the submit
>button at the same time ?
>
>2) You of course compared this design to an MVC servlet/JSP implementation
>using regular Beans and a pooled connection to the database ?
>
>if not, then: a) perform #1 for 100, 1000, 10000 simulated users b) perform
>#2 for 100, 1000, 10000 simulated users c) compare testing results of #1 to
>#2
>
>THEN YOU CAN COME TO SOME VALID CONCLUSIONS.
>
>BTW: You of course are not deploying EJB's for read-only queries, right ?
>
> > -----Original Message----- > From: A mailing list about Java Server
>Pages specification and reference > [mailto:[EMAIL PROTECTED]]On
>Behalf Of Nevarez, Benjamin > Sent: Friday, May 25, 2001 4:36 PM > To:
>[EMAIL PROTECTED] > Subject: MVC, EJBs and Oracle > > > Hello, > >
>I am writing an MVC application accessing an Oracle database. I am using a
> > servlet as controller, JSP only for presentation (view) and EJBs for >
>accessing data. > > I have seen that even with just a few records in the
>database the > performance of the application is really good. So maybe it
>is a good idea > using EJBs even for small applications. In this way you
>will not have to > rewrite code if your application or data grow and it is
>already scalable. > > Somebody asked before about when to re-query the
>database. Of > course we need > to re-query the database every time and, as
>expected, the > response times are > very short after the first request.
>For example, the first time I > do a query > took 140 milliseconds, the
>next times it took 50, 40, 40, 40, etc. > > Of course you also get the
>benefits of MVC like cleanest separation of > presentation, control and
>data. > > Please let me know if you have any comments, > > Benjamin > >
>================================================================== >
>========= > To unsubscribe: mailto [EMAIL PROTECTED] with body:
>"signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with
>body: "set > JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can
>be found at: > > http://java.sun.com/products/jsp/faq.html >
>http://www.esperanto.org.nz/jsp/jspfaq.html >
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP >
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets >
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
>JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at:
>
>http://java.sun.com/products/jsp/faq.html
>http://www.esperanto.org.nz/jsp/jspfaq.html
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets