This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

Injecting dynamic dependencies unspecifiable in the configPage Title Module

Injecting dynamic dependencies unspecifiable in the config

Aug 15th, 2005, 10:14 AM

Two part newbie question:

I have a set of business logic beans dependent upon a Principal-like object stored in the HttpSession. When I'm retrieving the beans using Spring, I'll need to pass this object into Spring's BeanFactory somehow so it will return a bean applicable to my user's session context.

1) Can this be done using AutowireCapableBeanFactory's applyBeanPropertyValues?

2) If so, when I apply a Prinicpal-like object's properties, will I need to synchronize this process so if two different users request a business logic bean at the same time, the second user will have to wait until the first user's Principal object is applied and a business logic logic bean is returned to him before applying the second user's Principal?