[SCJP2, SCWCD1.3, SCBCD]
[SCJP2, SCWCD1.3, SCBCD]
Originally posted by gayle craig:
I thought the code on 318 should also have an ejbHomeUpdateAll() too, based on the home business method you see on p 314? Is that wrong?
[SCJP2, SCWCD1.3, SCBCD]
[SCJP2, SCWCD1.3, SCBCD]
Originally posted by gayle craig:
p 335 Brain Power
Returning the Customer object is not necessary here. So only returning the Primary Key which was generated is necessary. However, I don't understand why the PK we return will always be null(p 333).
Originally posted by gayle craig:
p 335 Brain Power
2. Why do both ejbCreate<method> and ejbPostCreate<method> have the same arguments?
Maybe they have the same arguments in case verification is required? Otherwise, it seems like its unnecessary because you should have this information as member data.
[SCJP2, SCWCD1.3, SCBCD]
[SCJP2, SCWCD1.3, SCBCD]
Originally posted by gayle craig:
p 361 Exercise
ejbSetEntityContext (EntityContext)
ejbUnsetEntityContext ()
[SCJP2, SCWCD1.3, SCBCD]
Gayle-- ( make both a public abstract version and public version of these next three... does this work?)
Gayle -- Do not put in your abstract Bean class:
- finder methods
- ejbLoad/ejbStore
[SCJP2, SCWCD1.3, SCBCD]
Originally posted by Leena Diwan:
why not ejbLoad and ejbStore methods? I feel it is must. It is one of the callbacks in EntityBean interface which the bean must implement. The class is abstract because of the other methods, not these.
Regards,
Leena
Originally posted by Leena Diwan:
Read carefully. The method names are different. Otherwise the class will not compile. One of my post at the top of the page have a question about it about its choosing method names in real life situations.
[SCJP2, SCWCD1.3, SCBCD]
2. Im a little confused about the name of the getters and setters in the code - The abstract setters should be like the columns in the database. So if I have a 'Name' column, getName() and setName() should be abstract.
And the method exposed through the component interface should be of different name. May be like - getTheName() and setTheName() - right?
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
|