JAVA CDI: sometimes injection stays null when injected into EJB and interceptor in request scope

201 Views Asked by At

I wrote an EJB that have an interceptor assigned to its methods. for exchanging data between them I inject an object in request scope, so the same object is injected into both the EJB and the interceptor, and its data can be shared.

It usually works well, but the problem is that when running large number of such flows concurently (not very large - a few dozens), sometimes the injected object stays null. it can happen in the interecptor or in the EJB. I can't see any pattern.

do you have any clue to this behaviour and how to avoid it?

0

There are 0 best solutions below