Hi! CDI is typesafe! You usually lookup your beans via the type + qualifiers. The lookup per name is most times only used for Expression Language.
The programmatical lookup can be done via the BeanManager. Sadly the CDI spec doesn't (yet) define a bootstrapping API. This is planed for CDI-1.1 (JSR-346) but not yet in place. So this part is container dependent, or you use some stub like the one from cdi-advocates or the owb-test project. LieGrue, strub --- On Wed, 6/8/11, Ranga S <[email protected]> wrote: > From: Ranga S <[email protected]> > Subject: Re: Examples - CDI > To: "[email protected]" <[email protected]> > Date: Wednesday, June 8, 2011, 10:09 PM > Thanks! > > I wanted to first get a simple stand-alone example up and > running. I was wondering how to get access to the OWB > container to lookup a "Named" bean. If a standalone example > is out-of-the scope of this project, please let me know and > I shall look at integrated examples. > > > - Ranga > > > ________________________________ > From: Mark Struberg <[email protected]> > To: [email protected]; > Ranga S <[email protected]> > Sent: Wednesday, June 8, 2011 12:59 PM > Subject: Re: Examples - CDI > > hi! > > You could look at the maven archetypes for Apache MyFaces > CODI [1] which is a CDI extension. > > $> mvn archetype:generate -DarchetypeCatalog=http://myfaces.apache.org > > It creates a small OWB + MyFaces +CODI based example stub. > Just add OpenEJB on top (e.g. for the database service > layer) and you're done ;) > > LieGrue, > strub > > [1] http://myfaces.apache.org/extensions/cdi/index.html > > --- On Wed, 6/8/11, Ranga S <[email protected]> > wrote: > > > From: Ranga S <[email protected]> > > Subject: Re: Examples - CDI > > To: "[email protected]" > <[email protected]> > > Date: > Wednesday, June 8, 2011, 6:52 PM > > Hi > > > > > > I would like to take a crack at coming up with some > > examples for CDI. Let me read some documentation on > it. Once > > I have something concrete, I shall send a note to > this > > list. > > > > > > - Ranga > >
