Code example for XmlBeanFactory

Methods: getBean

0
        assertEquals("not the correct class", "oracle.jdbc.pool.OracleDataSource", bean.getClass().getName());
        assertTrue("caching not enabled", !((OracleDataSource)bean).getConnectionCachingEnabled());
    } 
 
    public void testUsernameProxyDataSourceDefinition() throws Exception {
        Object bean = this.beanFactory.getBean("proxyDataSource");
        assertEquals("not the correct class", "org.springframework.data.jdbc.support.oracle.ProxyDataSource", bean.getClass().getName());
    } 
 
    public void testUsernameProxyDataSourceDefinitionWithoutContext() throws Exception {
        try { 
            this.beanFactory.getBean("proxyDataSourceWithoutContext");
            fail("Instantiation without ConnectionContextProvider should fail");
        } 
        catch (BeanCreationException bce) {
            assertTrue(true);            
        } 
    } 
 
    public void testUsernamePasswordProxyDataSourceDefinition() throws Exception {