I have come across use cases where we need to dynamicaly create a bean and register it to the Application Context rather than creating it through xmls during initialization.
This api doc helps to do that
http://static.springsource.org/spring/docs/2.5.6/api/org/springframework/context/support/StaticApplicationContext.html#registerSingleton%28java.lang.String,%20java.lang.Class%29
Usecase Ref:
http://forum.springsource.org/showthread.php?t=76490
Useful Blog
http://www.carlobonamico.com/blog/2008/01/22/how-to-dynamicallyprogrammatically-define-spring-beans/
Friday, October 23, 2009
Dynamic registring of the Spring Bean to the Application Context
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment