Aha, another thing you can use to optimize things.
It's the lazy install of OnDemand beans.
e.g.
<bean name="SomeBean" class="org.jboss.acme.Acme" mode="On
Demand"/>
<lazy bean="SomeBean">
<interface>org.jboss.acme.IAcme<interface>
</lazy>
<bean name="DependantBean" class="org.jboss.foobar.Foobar">
<constructor>
<parameter><inject bean="SomeBeanProxy"></parameter>
<constructor>
</bean>
If the bean doesn't have interfaces:
<bean name="OtherBean" class="org.jboss.acme.Acme" mode="On
Demand"/>
<lazy bean="OtherBean" exposeClass="true"/>
<bean name="DependantBean" class="org.jboss.foobar.Foobar">
<constructor>
<parameter><inject bean="OtherBeanProxy"></parameter>
<constructor>
</bean>