Announcement Announcement Module
Collapse
No announcement yet.
Dynamic setting of properties on factory beans Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamic setting of properties on factory beans

    What is the best approach for the following scenario:
    We have an RMIServiceFactoryBean, which obviously returns an RMIService. The url for the service is chosen by the user from a dropdown list. The issue is:When we get the RMIServicebean from the context, it's already too late to set the url which the user has selected. By that time, the service will have been instantiated, either with no url or (probably) a different one than we want.

    Of course, we could get the factory itself from the context ("&factoryBean"), and then try to set the url on this before getting the service from the factory - but is there a better way? It would seem that if we do that the service is no longer managed by Spring,(eg automatic reconnect etc).

  • #2
    Do you just need to make the factory lazy init'd?

    Comment

    Working...
    X