users@glassfish.java.net

Re: Can't lookup bean

From: Gerald Holl <gerald_at_holl.co.at>
Date: Wed, 31 Oct 2007 09:40:20 +0100

glassfish_at_javadesktop.org wrote:
> MyBeanImpl implements MyBean, not MyBeanImpl extends MyBean.
>
> Do not look up inside JSFBean constructor. Do it in a @PostConstruct method.
>
> Consider using injection in JSFBean
> @EJB(beanName="MyBeanImpl")
> private MyBean myBean;

Yes, it was my mistake, MyBeanImpl implements MyBean because it's an
interface.

Since the war file didn't contain the right directory structure the
lookup failed. So I packaged it the right way (see
https://glassfish.dev.java.net/javaee5/persistence/persistence_faq.html#9)
and now it works.

cheers,
Gerald
-- 
http://holl.co.at