Hi,
Injection of an enterprise bean in a non-managed POJO is not possible.
If you're trying for something say
@EJB
private SampleSessionLocal sessionLocal;
in a simple
java class, which comes after your
servlet takes the input from the client,
then the container would obviously throw a Null Pointer Exception.
As far as I know, an enterprise bean can be injected into the following managed java objects:
1. Another Enterprise Bean ( EJB 2 or EJB 3 compatible).
2. A Servlet
3. JSF class.
I am not sure about the JSF thing, but the first two things are for sure.
Regards,
Akshay Sahu