-
Jun 1st, 2006, 05:18 AM
#1
problem with Spring load Beans
i have two applicationContext xml files like this:
1.applicationContext_securityresource.xml
<beans>
<bean id="securityresource" class="SecurityResource">
<property name="resource_public">
<list>
<value>/welcome.do</value>
<value>/logon.do</value>
<value>/test2.do</value>
</list>
</property>
</bean>
</beans>
2.applicationContext_security.xml
<beans>
<bean id="SecurityProcessor" class="cn.com.sony.vsop.framework.security.VSOPSec urityProcessor">
</bean>
<bean id="SecurityResourceGen" class="SecurityResourceGenerImpl">
<property name="resource">
<ref bean="securityresource"/> <!--here it refers to applicationContext_securityresource.xml-->
</property>
</bean>
</beans>
they are both configed in web.xml ,and will be loaded afer webapp server start.whenever i write ...getBean("SecurityResourceGen"),it will return the same instance.
now i want to maintenance applicationContext_securityresource.xml without restarting webapp server
so in my application i write this:
ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(new String[] { "conf/applicationContext_securityresource.xml" });
Object o = ...getBean("SecurityResourceGen");
will it do some change to "o" ,when i modify the applicationContext_securityresource.xml?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules