users@glassfish.java.net

Re: OSGi EJB injection requires full JNDI path lookup

From: <forums_at_java.net>
Date: Thu, 2 May 2013 11:53:46 -0500 (CDT)

Fair enough. My problem came from the fact that I was deploying the
application as a straight-up WAR (through Eclipse, for ease of development),
instead of as an OSGi bundle. Thanks for smacking me on the side of the head
to realize that silly mistake :) Once I did the switch (and a few other
tweaks, like switching @EJB for @Inject, etc), I was able to start up the
application normally. Now I have a different problem: my JSF pagelets aren't
resolving CDI named beans (i.e. beans with @Named, accessed as #{bean}). JSP
pages have no problem. Evidently this works fine when deploying as a WAR. The
JSF component library I'm using seems to be working fine (primefaces), and
the problem shows up even on a plain JSF page that doesn't reference the
external library at all. To clarify: ${beanName.method} does what it's
supposed to inside a JSP page, while #{beanName.method} does not (even when
enabling deferred evaluation). Similarly, #{beanName.method} doesn't work
inside a JSF page. It seems that the deferred evaluation of #{} is the
problem. Perhaps I missed some JSF-centric tweak or setting, somewhere?

--
[Message sent by forum member 'drivera']
View Post: http://forums.java.net/node/896631