It's possible. Spring config just parsed by the IoC container and necessary actions are performed. You can do that manually as well.
E.g. if you have the following bean definition:
HTML Code:
<bean id="accountService" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
<property name="serviceUrl" value="rmi://HOST:1199/AccountService"/>
<property name="serviceInterface" value="example.AccountService"/>
</bean>
it's possible to get the same bean as a result via the following actions:
Code:
RmiProxyFactoryBean factoryBean = new RmiProxyFactoryBean();
factoryBean.setServiceUrl("rmi://HOST:1199/AccountService");
factoryBean.setServiceInterface(example.AccountService.class);
factoryBean.afterPropertiesSet();
example.AccountService service = factoryBean.getObject();