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.
In all my Spring applications, I never need to call getBean. I just use Spring to do dependency injections to inject beans into other beans. At the client level, it depends on the technology that I am using, but even with that all the technologies have some Spring integration to have beans injected into them without you ever calling getBean.
Where were you calling getBean? Can you give us an example>
yah, this is the general approach. usually there is some other spring consuming framework that takes care of all the beans.
in this context though, there is no other framework involved in the application. it is a server application based on jboss netty. the architecture is set up to have a service layer. as of now, they are all wired together in a ServiceLocator class, as all of these services are singletons and are instantiated once in a static initializer and that's it.
now though, a service cannot run as a singleton. and that's where i find it's easier to hand this task over to spring.
as for the service consuming classes, these can be message handlers that are triggered by the netty framework that need some services to perform their task.