This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am new to the EJB3. Can anybody tell me what is the difference between field Injection and Setter Injection. I got the Field Injectionn but not the Setter Injection. What is the use of the settert Injection and why we need that?
There is field-based persistence and property-based persistence. In feild-based persistence, annotations are applied directly on instance variable, while in property-based persistence, annotations are applied on getter methods.
I think its all upon your personal taste. Field-based persistence is easier to use but property-based persistence allows data hiding. So its upto you.