Suppose I have a couple of spring beans:
<beans>
<bean name="A" ... />
<bean name="B" ... />
</beans>
"B" exposes a remote service that doesn't need "A". Assume that "A" takes a non-negligble time to load. What this means is that during a restart cycle, the application hangs the remote client, which can actually connect to the server but waits for a response until the spring container fully initializes.
What I'd like to be able to do is have the "B" remote service respond immediately, even if (based on the application state) it can only return NOT_READY or some such. The container, however, forces a wait until all of it's beans are initialized, even if you specify the beans as lazy-init and irrespective of load order.
I suspect that having "B" available immediately would mean that spring would have to make available a partially initialized container, which sounds bad. However, I'd appreciate any information anyone's got on the initialization order and whether you've found any reasonable workarounds.