Mike, I tried to use this approach, but that approach does 'not' give me reference to either of the following:
1. CDI @SessionScoped bean (which references the Stateless @EJB via @EJB annotation) 2. Stateless @EJB but there is hope, as Jose recommended/advised. See my next response to Jose's last response. On Sat, Apr 13, 2013 at 2:05 PM, Mike Kienenberger <mkien...@gmail.com>wrote: > Yes, that's how I linked my database layer to my converters in JSF 1.x > -- using the Java > API to pull the database beans out of the JSF context. > > On Sat, Apr 13, 2013 at 1:04 PM, Howard W. Smith, Jr. > <smithh032...@gmail.com> wrote: > > On Sat, Apr 13, 2013 at 1:00 PM, José Luis Cetina <maxtorz...@gmail.com > >wrote: > > > >> When i dont want to use codi I use jndi lookup, it is to easy to use and > >> portable. I create a simple method for retrive my ejbs without using > codi > >> instead i use jndi using only the name of the ejb class. > >> > > > > Recently, I added the following after listening in on that other/earlier > > topic/thread on myfaces or openejb list. The code below allowed me to > > remove CODI dependency. :) > > > > /* > > * > > > http://docs.oracle.com/javaee/6/api/javax/enterprise/inject/spi/BeanManager.html > > * > http://struberg.wordpress.com/2012/03/20/why-is-openwebbeans-so-fast/ > > */ > > @SuppressWarnings("unchecked") > > public <T> T getBean(Class<T> type) { > > Bean<T> bean = (Bean<T>) > > beanManager.resolve(beanManager.getBeans(type)); > > CreationalContext<T> creationalContext = > > beanManager.createCreationalContext(bean); > > > > return (T) beanManager.getReference(bean, type, > creationalContext); > > } >