File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes SCEA Part1 EPractize Labs - some answer seems incorrect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "SCEA Part1 EPractize Labs - some answer seems incorrect" Watch "SCEA Part1 EPractize Labs - some answer seems incorrect" New topic
Author

SCEA Part1 EPractize Labs - some answer seems incorrect

Nimit Shah
Ranch Hand

Joined: Jul 02, 2007
Posts: 53
Q: you have an application that requires high performance and high scalability without transactional requirements.
which JEE technology would you choose?

My Answer: Web centric Design

EPractize Ans: Stateless session bean with dao.

I cant understand that if transaction or any container service not required then why my answer is shown as incorrect?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

The question doesn't say it is a web application. You assumed that.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ganesan Ponnusamy
EPractice Labs Support
Ranch Hand

Joined: Nov 07, 2005
Posts: 249
The application requires high performance and scalability, hence it makes sense to use stateless session bean.

Scalability - Because stateless session beans are able to service multiple clients, they tend to be more scalable when applications have a large number of clients. When compared to stateful session beans, stateless session beans usually require less instantiation.

Performance - An EJB container will never move a stateless session bean from RAM out to a secondary storage, which it may do with a stateful session bean; therefore, stateless session beans may offer greater performance than stateful session beans.

Good luck for your preparation !!!


Ganesan Ponnusamy Java Certification | Test Generator | OCAJP | OCPJP | OCEJWSD | EJB Certification
OCEJPAD | SCJD | SCWCD | SCBCD | SCDJWS | OCMJEA | Web Services Certification | SCMAD
Nimit Shah
Ranch Hand

Joined: Jul 02, 2007
Posts: 53
Ganesh,

Thanks for your reply.

As an architect you have to make the best choice out of few available correct choices.

In this case, agreed that web application requirement is not mentioned, but neither EJB nor business ties mentioned.
As an architect the cost effective, scalable, and performat design web centric design also qualify.

Can you please explain How come web application is incorrect answer or inferior choice for the given case.

NOTE: it is clearly mentioned that transaction service is not required.
Ganesan Ponnusamy
EPractice Labs Support
Ranch Hand

Joined: Nov 07, 2005
Posts: 249
Nimit Shah,

Web-centric design may not scale as compared to EJB based applications.

Experiment the following test cases in both designs (Web centric and EJB) and see the difference:

>> 100 concurrent access of a simple data access
>> 100 concurrent access of a simple data update.

You may use Grinder to load test a web application.

You will definitely get high performance and scalability in EJB design.

The following contents are taken from http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/app-arch/app-arch4.html

As a result, unless special efforts are taken, Web-centric design does not scale well with increasing software complexity.

There is a trade-off between the two approaches. The Web-centric approach can enable a quick start for small applications with few transactional needs, while the EJB-centric approach is better for building a large-scale enterprise application where code and performance scalability are prime factors. The Web-centric approach, while more prevalent, has limitations for building large-scale, complex applications. Applications built with a Web-centric approach can rapidly become too complex and difficult to maintain.

Thanks
Nimit Shah
Ranch Hand

Joined: Jul 02, 2007
Posts: 53
Ganesan,

Thanks for your reply and extended research.

You referred to the below para in sun's documentation

"In a Web-centric design, Web tier components using container services such as the JDBC API can communicate directly with the enterprise information system resources that hold application data. In this approach, Web tier components are responsible for almost all of the application functionality. They handle dynamic content generation, content presentation, and user requests. They must implement core application functionality, such as order processing and enforcing the application's business rules. Finally, the Web tier components must also manage transactions, such as by using JTA, and connection pooling for data access. Because it must handle so many functions, Web-centric application software can easily become monolithic. As a result, unless special efforts are taken, it does not scale well with increasing software complexity."

When we consider web centric approach do we mean that services such as
- connection pool not available ? (With tomcat we can have connection pooling within container)

It mentions that the the web centric approach does not scale well when complexity grows. But, for the given question where transaction is not required what approach is better?
Ganesan Ponnusamy
EPractice Labs Support
Ranch Hand

Joined: Nov 07, 2005
Posts: 249
Dear Nimit Shah ,

Please find my answers:

When we consider web centric approach do we mean that services such as
- connection pool not available ? (With tomcat we can have connection pooling within container)


No, it is available. Note that with continuous improvements and changes in Java EE APIs, latest web container also supports running minimal EJB services.

Java EE 6 web container supports running EJB directly in WAR file without creating EJB jars.


It mentions that the the web centric approach does not scale well when complexity grows. But, for the given question where transaction is not required what approach is better?


Though the requirement does not require transaction the application need to scale, hence stateless session bean is the right choice.

I developed many Java EE application for our organization and the decision to use EJB or NOT is fully depends on scalability needs, of-course we also need to consider transaction.

Most of my intranet applications (low scalability) are web-centric and customer based applications (high scalability) are EJB based.

Take a look on the following applications:

http://www.123testlab.com - EJB Centric design
(Online exam application. We tested to support 2000 concurrent users and it can scale to any number of concurrent users.)

http://www.123testlab.com/gift - EJB Centric design
(Gift center application. We tested to support 500 concurrent users and it can scale to any number of concurrent users)

http://www.123testlab.com:8080/epl - Web Centric design
(Our project management tool. Since our employees count is very minimal (limited number of concurrent access) we decided to use web centric design.)

http://www.123testlab.com/epllic - EJB Centric design
(Our license management tool.)

Good luck for your preparation !!!
 
wood burning stoves
 
subject: SCEA Part1 EPractize Labs - some answer seems incorrect
 
Similar Threads
Has anyone purchased Whizlab new simulator for scea 5
Cannot understand Why this happens
Is this JWhiz thread question wrong?
SCEA 5 Certification Training lab
Why SCJP 6 Certification Training Lab?