You also use setters in your unit tests to inject your dependencies. Of course, you can use constructor-based dependency injection in HiveMind to avoid the setters. Typically, the setters aren't exposed via the service interface, so it's no big deal. I personally like setter-based rather than constructor-based, but that's really just a personal preference I guess. Most IDEs these days will generate your setters for you. But, it just makes for more code to maintain.
-----Original Message----- From: Jean-Yves Sironneau [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 25, 2006 5:44 PM To: [email protected] Subject: services without setters Hello, I think it can be interesting for hivemind to bypass setters for setting services properties, because in a lot of cases setters are just declared for hivemind to be able to set a property but should not be used otherwise for example : public int getPublisherActivationPeriod() { return this.publisherActivationPeriod; } public void setPublisherActivationPeriod(int publisherActivationPeriod) { this.publisherActivationPeriod = publisherActivationPeriod; } This would be possible to not have to declare the second method by bypassing the setters method (if the security configuration of the JVM allow it). Of course it's just in the implementations so it's just a verbosity issue, and a way to see what is "settable" and what is not. What do you think ? Jean-Yves --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
