The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

CatchSandeepVaid (23) [Avatar] Offline
#1
P-230 of EJB3 In Action Book states "If you want to use field-based access, you can declare all your POJO persisted
data fields public or protected"
P-231
"Even if you used field-based access, we recommend that you make the fields private and expose the fields to be modified
by getter/setter method."

The above 2 statements are contradictory... Can we mark our fields private and use them for field-based access ?
reza_rahman (456) [Avatar] Offline
#2
Re: Entity - Field-Based Access Vs Property Based Access
Sandeep,

This has been reported as errata already, please read previous posts. The statement should read: "Even if you used field-based access, we recommend that you expose the fields to be modified by getter/setter method".

Hope it helps,
Reza