OpenLiberty offers the wonderful feature of shared libraries that can be deployed in the server once and then (very skinny and fast-redeploying) WARs can access them at run-time. On the other hand, CDI provides a mechanism to reduce the bean scanning, for example:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee">
<scan>
<exclude name="com.mycompany.nonecdi.**"/>
</scan>
</beans>
My questions are - how do the two interact:
- Is Openliberty CDI scanner going to inspect the shared libs for beans upon WAR deployment, in the complete absence of CDI scanner restricition?
- Can the CDI scanner reference packages from the shared libs?