[webbeans-dev] Re: Updated EJB SPI

pmuir at redhat.com pmuir at redhat.com
Wed Mar 18 09:02:12 EDT 2009


Actually, if the mc can do dynamic (or runtime, dunno the right word)  
dependencies we can even depend on specific mc beans as all resolution  
for these goes through the wb spi. When a resolveXXX occurs, we  
express the dependency on it being started. This is super easy for  
ejbs as we can stick the mc bean name in the descriptor at discovery  
time. PUs we have to do by name I guess and same for @Resource.

Actually I have a scope broadening issue with PUs ATM. I wonder if I  
should have a PU discovery, then match the pu to the descriptor and  
resolve that - which can then enforce the scope...

--
Pete Muir
http://in.relation.to/Bloggers/Pete

On 18 Mar 2009, at 10:49, Pete Muir <pmuir at redhat.com> wrote:

>
> On 18 Mar 2009, at 09:42, Ales Justin wrote:
>
>>>> I still haven't seen a design that can actually work in AS.
>>>> It all boils down the the MicroContainer integration. You can't  
>>>> resolve an EJB at any point in time, you can only resolve it  
>>>> using EjbServices interface after the EJBs are actually started.  
>>>> So first you must resolve your metadata to come up with a  
>>>> dependency item for the WB. This *must* be addressed.
>>> Yes, I agree - I have this JIRA issue for it - https://jira.jboss.org/jira/browse/WBINT-3 
>>>  - this is also a general issue for any container that wishes to  
>>> integrate WB I think.
>>> I'll talk to Ales tomorrow and see how he thinks we should best  
>>> expose this info from WB (which is not MC based).
>>
>> I guess we need to add proper dependencies on the WB bootstrap bean,
>> making sure EJBs are started before bootstrap is installed.
>>
>> Carlo or ALR, how do I get the EJB's names from DeploymentUnit?
>> JBossMetaData or something even smaller?
>>
>> Afaik WB can ref EJBs from other deployments.
>> How does this issue work for those EJBs?
>> Since we probably only know which EJB is refed by examining WB bean?
>> e.g. examine each WB bean --> add external EJB-start dependency?
>
> This is what I thought while trying to get to sleep last night.
>
> WB knows all EJBs it is interested in (currently the all EJBs in the  
> DU), so we can depend on them. Tangentially, I should alter the  
> bootstrap so that we do EJB discovery (and class discovery) in the  
> initialize phase I think, this just makes this better defined.
>
>> Apart from EJBs, any other WB components that would need this too?
>
> * JMS (not yet impl'd in WB so...)
> * PersistenceUnits
> * stuff injected via @Resource
>
> --
> Pete Muir
> http://www.seamframework.org
> http://in.relation.to/Bloggers/Pete
>
> _______________________________________________
> webbeans-dev mailing list
> webbeans-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/webbeans-dev



More information about the weld-dev mailing list