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

Altered behaviour for JNDI lookup #270

Open
zeitiger opened this issue Oct 22, 2018 · 1 comment
Open

Altered behaviour for JNDI lookup #270

zeitiger opened this issue Oct 22, 2018 · 1 comment
Labels
bug cdi Impact: Low Severity: Major v8 Issues or PRs for Vaadin 8 version of the add-on

Comments

@zeitiger
Copy link

zeitiger commented Oct 22, 2018

I tried to integrate version 3.x and failed because of the altered behaviour. In reference to weld documentation of integration within a plain Tomcat (and same thing match also to Jetty)

Tomcat only allows you to bind entries to java:comp/env, so the BeanManager will be available at java:comp/env/BeanManager

I know the spec of EE define that it should be java:comp/BeanManager, but within plain servlet container its different. The old custom logic matched this state of reality.

https://github.com/vaadin/cdi/blob/2.0/vaadin-cdi/src/main/java/com/vaadin/cdi/internal/CDIUtil.java#L30

But with the replacement of DeltaSpike 1.7.x this logic now breaks for me.

https://github.com/apache/deltaspike/blob/ds-1.7.2/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/provider/BeanManagerProvider.java#L306

@kumm
Copy link
Contributor

kumm commented Oct 23, 2018

There are more workarounds in deltaspike for looking up the BeanManager. By JNDI is just one.
For example BeanManagerProvider is a CDI extension also, so it should receive a BeanManager on an event handler.
I think we should investigate further why all the workarounds are fail for you.

I've setup a sample project, and it runs fine on tomcat8.5, and 7. I've used weld integration method from here. Sample project is https://github.com/kumm/tomcatweld.

@pleku pleku added the v8 Issues or PRs for Vaadin 8 version of the add-on label Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cdi Impact: Low Severity: Major v8 Issues or PRs for Vaadin 8 version of the add-on
Projects
Status: 🔖 Normal Priority (P2)
Development

No branches or pull requests

5 participants