02-10-2006 02:34 AM
02-10-2006 04:44 AM
<bean id="myBeanID" class="org.mycompany.MyBeanClass">
<property name="personService">
<ref bean="personService" />
</property>
</bean>
/**
* @param personService The personService to set.
*/
public void setPersonService(PersonService personService)
{
this.personService = personService;
}
02-10-2006 05:44 AM
WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
then I get some services (nodeService, contentService, authenticationService ….) from serviceRegistry.02-10-2006 05:50 AM
WebApplicationContext wc = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
PersonService personService = (PersonService)wc.getBean("personService");
Any named bean can be retrieved from the WebApplicationContext - that is the hook into the Spring managed bean factory.02-11-2006 10:08 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.