• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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...
 
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic