Mark Spritzler wrote:If radius of a Tire can be different then it isn't going to be a property that you want to set in your configuration.
Mark Spritzler wrote: And for Car as a Singleton in configuration, you only get one car, so that car will have just one radius to its tires.
Mark Spritzler wrote: And in your xml you posted you have an error.
Mark Spritzler wrote:Well, to me your objects you have there are domain objects, and I don't configure domain objects in a Spring configuration. I will put my Service, Repository, Controller, Utility, Helper, TransactionManager, DataSource classes in my configuration where I want just one instance of those and they are stateless and don't hold state.
prateek sharmaa wrote:ok so do you mean to say that you will NEVER use scope="prototype" property in your bean configuration?
thanks,
pratz
Mark Spritzler wrote:
prateek sharmaa wrote:ok so do you mean to say that you will NEVER use scope="prototype" property in your bean configuration?
thanks,
pratz
never is a harsh word, but yes I try to avoid using it unless absolutely necessary, and I have yet to come across a situation/use case where I needed that.
Mark
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |