I think this is a problem in spring and wicket working together. This is in
1.4.7.
In spring:
<bean id="portalResources"
class="gov.usdoj.afms.afmsportal.application.AFMSPortalResources"
init-method="init" scope="singleton">
<property name="portalService" ref="portalService"/>
<property name="env" value="${environment}" />
<property name="version" value="${version}" />
<property name="localDev" value="${localdev}" />
<property name="production" value="${production}" />
<property name="localDevUserName" value="${localdev_username}"
/>
</bean>
This bean is injected into a wicket page with @SpringBean. Using
breakpoints I can see spring insantiating this bean, and setting the
properties. The values are there. This happens on application startup.
But when I got to get the injected bean, the constructor fires again, but
the init method and the setting or properties are NOT called, and despite
the scope=singleton, a second completley different instance is being
instantiated and injected. And it's empty, which is no good.
Any ideas on this?
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/SpringBean-and-properties-file-tp4664377.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]