bq. WeldServletLifecycle Is this class intended to provide a "CDI 2" setup?
If you are asking whether this starts Weld, then yes,
bq. This method JavaDoc signature is off. The method either throws an error, or returns true.
It can return [{{false}} as well|https://github.com/weld/core/blob/d8a8cb64f3a9751dcac07c8d9eda0dd3a0e682b8/environments/servlet/core/src/main/java/org/jboss/weld/environment/servlet/WeldServletLifecycle.java#L164] But you are right that the exception thrown if registration with JSP didn't work isn't documented.
bq. ... even though this file is optional accroding to the specs.
Note that CDI specification deals with Java EE setup and from 2.0 with SE. Servlet support is not covered and what Weld offers is beyond CDI specification as is said in Weld docs, 18.3. Servlet containers. Anyway, you will need to have {{beans.xml}} present in case of servlet - and this should probably be documented in our docs as well. - EDIT: Actually this is already documented in the end of the aforementioned chapter. It says: ??In general, an implicit bean archive does not have to contain a beans.xml descriptor. However, such a bean archive is not supported by Weld Servlet, i.e. it’s excluded from discovery.??
bq. When configuring an embedded setup the docs states that "resteasy.injector.factory" isn't needed with v3 container...
This isn't Weld doc and we haven't authored or tested that I am afraid. You may want to report this with resteasy guys.
bq. The only thing that made Weld to properly work, is to use this gradle source set setup:
This part I don't understand. How does this remedy the {{beans.xml}} trouble you had?
bq. Looking at AbstractDiscoveryStrategy.java#L119-L139 it appears that as long as there were no beans.xml found (since WebAppBeanArchiveScanner is used), line 138 will never get called.
This discovery isn't servlet specific, it is used in EE and SE as well hence not all parts of code and necessarily relevant for servlet environment.
bq. P.S there is a repo I setup illustrating my implementation of the stack mentioned here.
Thanks, I will glance at it later. |
|