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

Jaikiran Pai jpai at redhat.com
Thu May 14 04:38:58 EDT 2009


Is there any place (forum or wiki or anything else) where i can read 
about its usage or more about where these kind of lazy beans would come 
in handy?

-Jaikiran
Ales Justin wrote:
>> 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
>>
> _______________________________________________
> 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