Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPilot,, Java ranch exam question ID: 28

 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Find out two true statements from the following.

A.Rearly used data should be represented as entity bean.

B.Session beans should be used for transaction controlled business logic.

C.Session Beans are good for logic that's shared outside of the limited context of a single application.

D.It's a good practice to put business logic into data objects.

E.Stateful session beans may serve many clients during their lifetime.

F.Entity beans may not have a unique property.

Correct answer is C.

Could somebody explain C?
And why is A not correct? If you have a custumore database of 1 milion records, you make an entity bean, because that data represents "Rearly used data"?

Miki
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could somebody explain C?

If the business logic is, say, in a well-written JavaBean which might already be used in another application, then you get reuse by having the session bean invoke the methods of the JavaBean. The JavaBean's methods will run in the session bean's transaction context.
And why is A not correct?

It would be an unjustified cost to use a complex solution for rarely used data. All that is needed is JDBC calls from a session bean.
 
Adrian Pang
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the question said there are 2 true statements, what's the other correct statement?

I would guess b...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic