For a first WebLogic
test, I have setup a WAR project. Inside this WAR I have some
servlets, stateless and singleton beans, and an MDB. These work just fine.
However, as soon as I add a beans.xml file (empty apart from the root element) to the WEB-INF folder, most of this breaks:
- @EJB annotations inside my servlets don't work anymore. All fields annotated with @EJB remain null. If I switch those to @Inject I get the following error:
WELD-001408 Unsatisfied dependencies for type [TestDAO] with qualifiers [@Default] at injection point [[field] @Inject private nl.isaac.test.TestServlet.testDAO]
I can work around this by adding @ManagedBean to the servlets but that should not be necessary.
- My MDB stops working completely. The sending code doesn't fail, but the MDB is never triggered again. My MDB annotation:
My sending code:
My question: why do these two things break when I add a beans.xml file, and more importantly, how can I solve this.