|
From: <jue...@we...> - 2004-03-04 08:18:48
|
There indeed is:
=20
<bean name=3D"MyRegistry" =
class=3D"org.springframework.beans.factory.config.MethodInvokingFactoryBe=
an">
<propety =
name=3D"staticMethod"><value>com.datacodex.MyRegistry.getInstance</value>=
</property>
</bean>
=20
Method arguments would have to be specified as "arguments" property (an =
Object array).
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Cameron Braid
Gesendet: Do 04.03.2004 08:54
An: spr...@li...
Betreff: [Springframework-developer] How to provide a singleton instance =
as a bean in spring
Is there an existing bean factory implementation that allows me to =
expose any bean that uses the singleton pattern to my application =
context ?
=20
For example I would like to do something like this :
=20
<bean name=3D"MyRegistry" class=3D"singletonFactoryBean">
<propety =
name=3D"signiture"><value>com.datacodex.MyRegistry.getInstance()</value><=
/property>
</bean>
|