but if you just use static fields then the only thing you have to do in your app is when the Application.init() is called you just set them once through a static setter on that component. (or reflection)
So you have to do all your injection over your components onces at startup of your application. You just inject class instances not object instances johan On Thu, Feb 19, 2009 at 11:27, Christian Helmbold < christian.helmb...@yahoo.de> wrote: > > a static service inside a component? > > > Why not? Services are typically singletons and I can't see a problem to > share an instance. From the dependency point of view it is equal to use > * static Service svc, > * transient Service svc or > * Service svc > > I think the disadvantage of my solution is the inversion of inversion of > control ;-) > > But even if I start to use the Spring annotation, I'm interested in > possible disadvantages of using static members to avoid serialization. Maybe > there will be a use case where dependencies are not important ... > > Thanks. > > Christian > > -- > http://www.groovy-forum.de > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >