It can happen that a managed bean class has a session bean annotation (e.g. @Stateless) when the class does not satisfy the requirements for the session bean class (see EJB spec., 4.9.2 Session Bean Class).
For example, the following class is a managed bean as it is not public:
However, a warning should be raised by the application server at the first place.
|