[jboss-dev] Re: jbossas -beans.xml opt

Ales Justin ales.justin at gmail.com
Wed May 13 13:30:08 EDT 2009


> What are the SomeBeanProxy and OtherBeanProxy in these examples? 

Those are the lazy proxies generated by <lazy/>.

We try to use the best lazy mechanism available.
(1) Javassist (allows for class exposure in a proxy)
(2) JBossAOP (although currently if this exists, (1) should too)
(3) JDK dynamic proxies (needs interfaces)

I would need to check if we can avoid the explicit injection,
and use lazy nested directly:

<property name="someProp"><lazy bean"SomeBean"/></property>

> And when exactly are these "lazy" beans installed?

They have a dependency on the "bean", at Not_Installed state.
Meaning the minute "bean" is installed in MC, you can have lazy proxy 
for it.

> -Jaikiran
> Ales Justin wrote:
>> 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>
>> _______________________________________________
>> jboss-development mailing list
>> jboss-development at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-development
> 
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
> 



More information about the jboss-development mailing list