wood burning stoves 2.0*
The moose likes Spring and the fly likes Question about MethodInvokingFactoryBean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Question about MethodInvokingFactoryBean" Watch "Question about MethodInvokingFactoryBean" New topic

Question about MethodInvokingFactoryBean

Alex Armenteros
Ranch Hand

Joined: May 05, 2010
Posts: 69
I want to inject a value into an static field and found the workaround with the class MethodInvokingFactoryBean

on xml beans I think I must put this...

<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="staticMethod" value="foo.bar.SpecificDBUpdates.setDAO"/>
<property name="arguments">
<ref bean="theDAOReference"/>

But I don't understand how or when this method will be called. Enlighten me please.
subject: Question about MethodInvokingFactoryBean
Similar Threads
Spring 2.5 with Hibernate 3.0 error when creating dataSource for Hibernate SessionFactory
How to let Spring create all instances of beans without knowing what bean ids they will be
lookup for remote bean - failure (only from eclipse)
Dynamic and interdependent listboxes using spring ,dwr and jsp wont show new data.
DataSource null in DWR