I am experiancing some bizarre behaviour with Log4J and the NDC and (I think) the CMP 2.0 implementation.

We use the NDC heavily in our application as does JBoss(from what I've seen).

I have a session bean that invokes a setter on a certain CMP 2.0 entity bean. Before I invoke the setter I set the NDC to a given value. After I invoke the setter, the NDC is null(which means the NDC.remove() or NDC.clear() methods have been called down in the bowels of the container.