List of usage examples for org.springframework.beans.factory.config AutowireCapableBeanFactory configureBean
Object configureBean(Object existingBean, String beanName) throws BeansException;
From source file:org.molasdin.wbase.jsf.spring.web.SpringBeansRewireListener.java
@Override public void sessionDidActivate(HttpSessionEvent httpSessionEvent) { HttpSession session = httpSessionEvent.getSession(); WebApplicationContext ctx = WebApplicationContextUtils .getRequiredWebApplicationContext(session.getServletContext()); AutowireCapableBeanFactory bf = ctx.getAutowireCapableBeanFactory(); for (String entry : IteratorUtils.asIterable(IteratorUtils.asIterator(session.getAttributeNames()))) { if (bf.containsBean(entry)) { Object bean = session.getAttribute(entry); bean = bf.configureBean(bean, entry); session.setAttribute(entry, bean); }//from w w w . ja va 2 s. co m } }