Вопрос

I've got stateful EJB and injected to it application scope CDI bean. Findbugs gave a warning, because my CDI bean was not serializable. Should the CDI bean be serializable in this case? In my opinion it shouldn't, in order to avoid passivation. Is making this field 'transient' enough, and is this a proper solution?

Это было полезно?

Решение

I wouldn't worry about it honestly. You're probably getting a PassivationCapable proxy in reality and FindBugs certainly doesn't know that.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top