Announcement Announcement Module
Collapse
No announcement yet.
problem with Spring load Beans Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?
Working...
X