• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ans for some Mock test questions

 
T Ram
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone pls clarify the answers for the following questions...

1. Which statements describe Publish-Subscribe Messaging and which describe Point To Point Messaging?

APublish-Subscribe Messaging is a message queue system.
BPublish-Subscribe Messaging = One sender and one receiver.
CPoint To Point Messaging = N senders and one receiver.
DPublish-Subscribe Messaging = 1 sender and n receivers.
EPoint To Point Messaging is a message queue system.
FPoint To Point Messaging = One sender and one receiver.


Ans : Choices D and F are correct.

Concern : What abt E... Point to point is a message quese system.. is it correct...


2. Your have been contracted by a company to upgrade their online shopping application. Their site sells health care insurance to customers at huge discounts. The process of buying insurance is complicated. They have however tried to simplify it as much as possible for the customer. When the customer arrives at their site to register, they fill out a 40-question questionnaire covering basic health and lifestyle information. The answers are then used for selecting the most appropriate level of insurance. (Each customer does NOT get a custom health care insurance agreement; they get the most suitable one out of a choice of 30). The customer then has the opportunity to purchase the insurance within seven days before the quote becomes void. Based on the rough description of the system which of the following is the most suitable design?

Note: This question should be based upon the EJB 2.0 specification.


AThe Customer should be an Entity Bean
BThe business logic should be represented with a Stateful Session Bean.
CThe business logic should be represented with a Servlet.
DThe system should use CMT.
EShould use BMT.
FThe Health Plan should be an Entity Bean that supports local clients.
GThe Health Plan should be a Stateful Session Bean.
HThe Health Plan should be a Stateful Session Bean that supports local clients.
IThere is no need for Customer Bean as there is no need to store the customers details just the Health Plan they bought.
JThe Customer should be an Entity Bean that supports local clients.



Ans : Choices B, D, F and J are correct.

Concern : We need to have lots of assumptions for concluding these answers.
Please give some tips for answering these type of questions.......

Thanks in advance,
 
B.Sathish
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the second question, it should be A,D,F and J. If J is right, then A also should be right.

I think there is no need for a stateful session bean. It can be managed with a stateless session bean. There is no conversation required with the client in this case. There is a standard questionnaire that has the same questions for all cusomters. You can provide that to the customer as a GUI page. When the user fills and clicks the submit button, you can have a servlet validate it and send it to a stateless session bean that can analyse the user's inputs and select a suitable plan, update the database (through the entity bean) and return the plan information back to the client in just 1 method call. Hence a stateless session bean would suffice as no conversation is needed. Also, for these requirements, the purchasing part can be designed in such a way that you can have a GUI form that takes the user's credit card details and a single stateless session bean method call can validate the details (through the Customer Entity bean), validate the 7 day limit (again through the Customer Entity Bean), make the purchase, update the database in 1 transaction and return the details of the purchase to the client. So it is possible to meet the requirements only with stateless session beans thus providing better scalability.

As far as option D is concerned, there is no obvious need to use BMT in this scenario.

You have to assume that the relationship between Customer and Health Plan Entities is many-to-many and bi-directional. A customer can have many Health Plans and a Health Plan can have many customers who have opted for it. As you are using EJB 2.0, you would want the container to manage the relationships. For CMR, you need local interfaces for both entity beans to participate in a bi-directional relationship. So you need local interfaces for both the Entity beans Customer and Health Plan. Hence F and J are right

Do you agree with my answer?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic