Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDI lookup via JNDI - missing minimum requirement #274

Closed
florianlieb opened this issue Jun 22, 2016 · 2 comments
Closed

CDI lookup via JNDI - missing minimum requirement #274

florianlieb opened this issue Jun 22, 2016 · 2 comments

Comments

@florianlieb
Copy link

Omnifaces (tested with v2.3) tries to connect to CDI via JNDI, which is ok for JavaEE containers, but that dependency is not obvious from the documentation.

I tried running a JSF application as a self-contained-application in an embedded container (Jetty in my case), and Omnifaces failed because "CDI was not available" (as documented on http://omnifaces.org/cdi/). The actual reason was that CDI was not found via JNDI.

I have several suggestions:

  • Add a Note about missing JNDI requirement on http://omnifaces.org/cdi/
  • Throw a different Exception when JNDI lookup fails in org."omnifaces.config.BeanManager"
  • Try resolving CDI via "javax.enterprise.inject.spi.CDI.current()" instead of / on top of JNDI - that API was already available in CDI 1.1 afaik.
@BalusC
Copy link
Member

BalusC commented Jun 22, 2016

As per #243, OmniFaces 2.4 don't require JNDI anymore when Weld is used. Please try 2.4-RC1 on your Jetty and let me know.

CDI.current() is planned for later. As of now, beans.xml is still conform CDI 1.0 for better backwards compatibility with TomEE 1.7.x. But as TomEE 7.0 is already final now, I will certainly revise it for OmniFaces 2.5.

@florianlieb
Copy link
Author

Cool, will try that :) Thanks for the quick reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants