There is probably something simple that I am missing here. I am at a loss of what I am doing wrong.
I have the following proxy bean in my appconfig.xml:
I put in the second property test to see if I could get that to work but it doesnt either. The first time I get the userInfo object from the applicationContext these properties are not set (for that matter they are never set). When I do the following:Code:<bean id="userInfo" class="com.xactsites.shared.userinfo.UserInfo" scope="session"> <property name="translator" ref="translator" /> <property name="test" value="Did this work?" /> <aop:scoped-proxy /> </bean> <bean id="translator" class="com.xactsites.shared.Translator" scope="singleton"> <property name="messageSource" ref="messageSource" /> </bean>
trans1 gets the singleton bean that I want to be wired into userInfo. However trans2 and even test are null. Am I missunderstanding something? I have used this for a while without wiring in properties to the proxy bean and it has worked wonderfully. I just can't figure out why I can wire in some singleton beans. Thoughts?Code:UserInfo userInfo = (UserInfo)appContext.getBean("userInfo"); Translator trans1 = (Translator)appContext.getBean("translator"); String test = userInfo.getTest(); Translator trans2 = userInfo.getTranslator()


Reply With Quote