Package org.hotswap.agent.plugin.spring.testBeans

Examples of org.hotswap.agent.plugin.spring.testBeans.BeanPrototype.hello()


     * Plugin is currently unable to reload prototype bean instance.
     */
    @Test
    public void hotswapPrototypeTestFailWhenHoldingInstance() throws Exception {
        BeanPrototype beanPrototypeInstance = factory.getBean(BeanPrototype.class);
        assertEquals("Hello from Repository ServiceWithAspect Prototype", beanPrototypeInstance.hello());

        // swap service this prototype is dependent to
        try {
            swapClasses(BeanServiceImpl.class, BeanServiceImpl2.class.getName());
            assertEquals("Hello from ChangedRepository Service2WithAspect Prototype", beanPrototypeInstance.hello());
View Full Code Here


        assertEquals("Hello from Repository ServiceWithAspect Prototype", beanPrototypeInstance.hello());

        // swap service this prototype is dependent to
        try {
            swapClasses(BeanServiceImpl.class, BeanServiceImpl2.class.getName());
            assertEquals("Hello from ChangedRepository Service2WithAspect Prototype", beanPrototypeInstance.hello());
            throw new IllegalStateException("Reload prototype bean should not be correctly initialized.");
        } catch (NullPointerException e) {
            // BeanServiceImpl2 contains reference to different repository. Because existing reference
            // is not changed, this reference is null
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.