• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

JPilot,, Java ranch exam question ID: 28

 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since the question said there are 2 true statements, what's the other correct statement?

I would guess b...
 
Did you just should on me? You should read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic