• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Answers to mock questions

 
Vrinda Werdel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I came across some mock questions. Appreciate your inputs on my answers.

1. What are the benefits of server clustering??

a. replication
b. High security
c. Easy Manageability
d. Load Balancing
e. Fault Tolerance

ANS: d,e
IMHO choice 'a' is not really a benefit.

2. Both CMT and BMT may be used with Entity and Session Beans?

a.true
b.false


ANS: I am not an EJB expert. My take is 'a.'.

3. N Tier Applications show better performance than 2 tier applications because ther are modular in nature, which means they can b scaled easily by tuning containers and components individually.

a.true.
b.false

ANS: My take is b. Inspite of the fact that containers can be tuned, some two tier application can be more performant bacause of the absence of additional layers.

4.In which of the following EJBs are not a good fit?

a. small scale deployment
b. Lasrge scale deployment
c. Transaactional in nature.
d. no transactional nature

ANS: d.

IMO choice 'a' is incorrect as small scale deployments could be transactional in nature and hence entail the use of EJBs.

5. What happens when remove() method is called on the Home interface of the Entity bean?

a.Remote reference is invalidated
b. Bean instance is destroyed
c. Bean instance is passivated
d. data represented by the bean instandce is deleted from db
e. Bean Instance moves from pooled state to ready state

ANS: again not an EJB expert. My answer is a,b,c.

thanks

Vrinda
 
Frank Zeng
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q1: a, d, e
Replication is a benefit.

Q2: b
Entity bean only supports CMT

Q3: a
This is talking about general performance. N-tier is known for its scalability comparing to 2-tier.

Q4: a, d
Generally speaking a small scale deployment is not a good fit for EJB.


Q5. a, d
The remote reference will be invalidated, and the bean instance will be pooled instead of deleted when remove() method is invoked. The data represented by the entity will be removed from the database if database is the underlying persistence layer.
[ December 27, 2005: Message edited by: Frank Zeng ]
 
B.Sathish
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. d,e
Replication is a consequence of clustering, not a benefit. The two well known benefits of clustering are "Load Balancing" and "Fail Over". Fault Tolerance is just another word for failover capability.

2. b
Entity Beans cannot use BMT

3. b
Performance generally means speed and leser the tiers, greater the speed

4. d
You are right, small scale deployments may need to be transactional

5. d is the only right answer. When remove() is called on an entity bean, the entity is deleted from the db and is sent from Ready to Pooled state without passivation. Passivation and Removal are mutually exclusive (refer entity bean lifecycle)
 
Vrinda Werdel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frank, Sathish

Thanks for your inputs.

Vrinda
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic