ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Twelve Best Practices For Spring XML Configurations
Subject:   Good Citizen
Date:   2006-02-01 06:41:03
From:   kinko
Response to: Good Citizen

I would agree that constructor injection is advantageous in a number of circumstances. Especially when you are looking for strict encapsulation i.e. Immutality. Often the config using setters is clearer but you are potentially breaking encapsulation for no other reason than to configure.