Frage

A class is a stateful session bean with a loginUser property. B class is a stateless session bean with a method addAUser. how does the interceptor check wether A.loginUser is null when B.addUser method be used. thank u .

War es hilfreich?

Lösung

This problem cant be solved by injecting statefull into stateless. Because this is a EJB anti-pattern. Have a look at CDI. It provides session-scoped beans like Spring. the only limitation is that its available only since JEE6.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top