Pete Muir 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?
I wanted to have it in a VDF component
attachment
(JBossSessionBeanMetaData), but nobody knows what a VDF component is.
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=145178
So you'll have to look into the JBossMetaData attachment. But this will
only give you the EJBs of the current deployment unit. If I have for
example @EJB SomeInterface bean; it can come from anywhere.
>
>
> 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.
We're looking
into making the EJB container start on demand, so you
should only depend on an EJB endpoint in described state. Hmm, actually
you probably need to depend on the JNDI name, because the proxy itself
will make sure the EJB container starts up.
> Apart from EJBs, any other WB components that would need this too?
* JMS (not yet impl'd in WB so...)
* PersistenceUnits
org.jboss.jpa.resolvers.PersistenceUnitDependencyResolver, but
it also
ties into the injection framework.
* stuff injected via @Resource
Ehr... yes, this isn't
fleshed out yet. I think the mapped reference
resolver deployer might take care of some bits.
Carlo