• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

J2EE Applicability

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A mock test question on J2EE Applicability:
"On XXXX site,people check the weather forecast. If the company can expect between 50-100 concurrent hits in to their site, which of the following Java based technologies may be best suited for their needs?
(a)Servlets and JSP for presentation with Java classes encapsulating all database access.
(b)Servlets and JSP for presentation and CMP Beans for retrieval.
(c)Servlets and JSP for presentation and Session Beans with DAO for retrieval.
(d) Applets for presentation and either Entity or Session Beans for retrieval.
(e)servlets and JSP for presentation and BMP Beans for retrieval.
I answered (b), but the answer said it was (a).
I dont understand why Java Classes has to be used for encapsulating all d/b access ?
I think (b) is right since EJB entity beans are used for concurrent d/b access, am I right ?
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings:
I have taken and passed the J2EE architect exam. It was a pretty difficult test, but fun nonetheless. Anyway, enough about me:
The reason that A) is the correct is answer is because typically you want to surround your database access logic with a DAO, or Data Access Object. Further, you don't want to introduce EJB into the architecture unless it is warranted (Transactions, Security, Concurrancy, etc.).
In this case, you want as much speed as possible and have no need to use Entity Beans. Entity beans are not required because you are not changing the underlying data and therefore have no need to implement any business logic. All of your accesses are going to be read-only and thus having the overhead of the EJB should be avoided. In this case, an EJB would be a bottleneck.
I hope that I've made things more clear. :-)
Paul
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic