• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Chapter 5 - HF Sark study group

 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For discussion of Head First EJB's Chapter 5.

Other Chapter discussions:
1 2 3 4
 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just so that we are clear with the concept of Entity/Bean/Instance difference:

 
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sharpen pencil page 580

INSERT: create()
DELETE: remove()
UPDATE: setters called
SELECT: findby methods
 
Marc Peabody
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Leena's answers. I also wish to add that the findByPrimaryKey method is a capital 'B' and your other finder methods aren't restricted to begin with findBy (I think 'find' is required though) but it looks like good practice.
[ February 23, 2005: Message edited by: Marc Peabody ]
 
Marc Peabody
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brain Power page 269
(Name the better suited interface to...)

Make a new customer - Home
Change an existing customer's phone number - Component
Find all customers in Pleasantville - Home
Delete all customers previously declared 'inactive' - Home
Delete a specific customer - Component
Get the street address of a specific customer - Component
 
Marc Peabody
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found it helpful to review pages 98 & 99 for refreshing my mind with what is going on in the entity bean architecture and how it differs from session beans.

-----------------

Notice on 279, the second-from-last star bullet that home business methods can NOT throw RuntimeExceptions. From what I remember in the other Java tests I've taken, I'd expect to see a question that has a home business method throw UnsupportedOperationException, ClassCastException, or some other exception that isn't blatantly obvious at first glance as a RuntimeException.

Direct known subclasses of RuntimeException (from api javadoc):
ArithmeticException, ArrayStoreException, BufferOverflowException, BufferUnderflowException, CannotRedoException, CannotUndoException, ClassCastException, CMMException, ConcurrentModificationException, DOMException, EmptyStackException, IllegalArgumentException, IllegalMonitorStateException, IllegalPathStateException, IllegalStateException, ImagingOpException, IndexOutOfBoundsException, MissingResourceException, NegativeArraySizeException, NoSuchElementException, NullPointerException, ProfileDataException, ProviderException, RasterFormatException, SecurityException, SystemException, UndeclaredThrowableException, UnmodifiableSetException, UnsupportedOperationException
 
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Marc Peabody:
Brain Power page 269
(Name the better suited interface to...)

Make a new customer - Home
Change an existing customer's phone number - Component
Find all customers in Pleasantville - Home
Delete all customers previously declared 'inactive' - Home
Delete a specific customer - Component
Get the street address of a specific customer - Component



I think the last one is Home int. Can anyone clarify
 
Deepa Korecherla
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone respond??
 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
################################################
Get the street address of a specific customer
##############################################

The component interface is correct because we want address of a specific customer. May be in component interface you have getAddress() method that can be called.

Why you think thats home int is correct.

sawan
SCJP,SCWCD,SCBCD
 
Did you miss me? Did you miss this tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic