aspose file tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Doubt in ePratice Exam Question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Reply Bookmark "Doubt in ePratice Exam Question" Watch "Doubt in ePratice Exam Question" New topic
Author

Doubt in ePratice Exam Question

Rahul Mishra
Ranch Hand

Joined: Jan 22, 2006
Posts: 211
Hello Ranchers,

I came across the following question on ePractice exam [Form 1] and it stumped me..

Your organization is interested in building an application that will allow users to query and read volumes of statistical data for analysis. They anticipate high volumes of traffic and want the most scalable solution. This application will be distributed in a cluster and deployed as an enterprise archive. Components should be designed so that they can be accessed remotely by other Java applications.

What Java EE component type and remote access technology is correct for this architecture?

  • Servlet accessed using HTTP.
  • Message-driven bean accessed using JMS.
  • Stateless session bean accessed using RMI.
  • Stored procedures and DAO's.(Correct Answer as mentioned in the exam)


  • I fail to understand how can a DAO and stored procedure be used remotely by other java applications (as mentioned in the question)...is the answer incorrect? insights please...

    OCMJEA/SCEA, SCDJWS, SCBCD 1.3, SCJP 1.4
    My SCEA experience:http://javalogue.blogspot.com/
    Cameron Wallace McKenzie
    author and cow tipper
    Saloon Keeper

    Joined: Aug 26, 2006
    Posts: 4967

    I agree. That's a bad answer.

    -Cameron McKenzie


    Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
    Nikhil Jain
    Ranch Hand

    Joined: May 15, 2005
    Posts: 383
    The correct answer is (c)


    SCJP 1.4, SCWCD 1.4, SCBCD 1.5
    Rahul Mishra
    Ranch Hand

    Joined: Jan 22, 2006
    Posts: 211
    That's what i marked..
    peter cooke
    Ranch Hand

    Joined: Mar 16, 2004
    Posts: 310
    because it is primarily read.
    I would expect a rest based servlet webservice using a DAO to talk to the DB would out perform a SLSB to one or more enties.

    Scaling handled by adding another tomcat server.


    CIAO Peter M. Cooke
    Bigwood Liu
    Ranch Hand

    Joined: Feb 26, 2003
    Posts: 240
    Stored procedure might have better performance, but it is part of solution in C, and it is bad on scalability and remote access.

    I prefer C
    peter cooke
    Ranch Hand

    Joined: Mar 16, 2004
    Posts: 310
    Bigwood Liu wrote:Stored procedure might have better performance, but it is part of solution in C, and it is bad on scalability and remote access.

    I prefer C


    cool preferece your preference of c

    I just got my cup of coffee and want to debate. so let's debate merrits and problems with solution. I don't mean any offense.

    Performance: (transactions/second)
    Can we both agree that a tomcat webcontainer will out perform a full blown comercial EE containter (weblogics, websphere, oracle app server)? It has been a long time since I used tomcat, but tomcat was only a web container, but may have added on. I also have not used weblogics since 8 but the commericial servers above always started both servlet and ejb container. It is my understanding that when EE6 rolls out that the server can decide what not to launch. So if we use option C- there is no need for the web container. Then why spend the cpu cycles to spin up and maintain the web container when those cycles can be used to handle requests.


    Vertical Scaling:
    remains the same in either case. throw faster cpu's, more memory, faster disk, a seperate ethernet for the servers to communicate to the DB on.

    Horizontal scaling:
    1) adding multiple instances: once again add another tomcat or weblogics container. In my opinion the same thing.

    2) It has been a long time since I read the spec. but containers must appear to be running 1 instance of SLSB's or servlets. They can choose to run multiple copies of SLSB's to handle requests. Ok you may have me on servlets. Servlets there is only 1 instance, SLSB's can spin up multiple instances if the container vendor has implemented that feature, problem it is an optional feature


    Remote Access:
    A http request to a servlet is a remote request by it's nature. I have rarely seen any firewall that blocks port 80. So A servlet webservice provides remote access.

    So the remote issues we are trying to decide is, " which is faster to serialize an object graph. Use a servlet with JSON or XML, OR a SLSB serializing with XML or standard java serialization." If both are serializing with XML it should be equal. If the SLSB is serializing useing "RMI-IIOP" still probably equal to convert to corba format. I would think that serializtion would be faster if serialization was "RMI" only.

    I until you get to 100+ requests a second serializing large graphs. I doubt serialization time would play much of a factor in your decision, and then at that point you should be writing custom serialization objects



    Well I am looking forward to response. Perhapse there is some aspect I have not considered. sleep time
    ForLuck Yang
    Greenhorn

    Joined: Jul 14, 2008
    Posts: 10
    as far as i am concerned, i'd prefer C.


    ForLuck
    Making new friends...
    Chaminda Amarasinghe
    Ranch Hand

    Joined: May 17, 2006
    Posts: 402

    I prefer to C. B and A are also bit closer.

    Anyway I can't agree on D

    Thanks
    Gopinath Kondapally
    Greenhorn

    Joined: Dec 25, 2002
    Posts: 8
    I prefer c too. Nowhere in the question it is mentioned that the client is a web based client and mentioned "enterprise archive" does this mean to use ear?
    Coming to servlets and RMI. My experience says RMI's binary objects will be faster over network than huge HTML text.
    We can make many assumptions about using combination of technologies to solve. But with a bare eye c looks correct .


    D is not the answer for sure. as it says "What Java EE component type and remote access technology is correct for this architecture? "
    Neither Stored procedures nor DAO are enterprise components . DAO is a pattern.

    Please correct me if I am wrong

    Gopi
     
    I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
     
    subject: Doubt in ePratice Exam Question
     
    Similar Threads
    Info on objective 10.3
    Applicability of EJB in a particular scenario
    long post IBM.158
    SCEA Question answer confirmation
    Test 484 ... LONG POST