I found an example that said: (JEE tutorial from Sun, the application is the lottery-annotation-client)
Here's an example of a plain Java client that runs outside of a Java EE container. In this case, it does a global JNDI lookup
since dependency injection is not available outside of a Java EE component.
So the example use InitialContext for lookup:
So is what Mike said above. But... what is
Java EE client container?
And after I saw the security-stateless-appclient. That is a client that use @EJB annotation!
So... why example 1 cannot use annotation and the example 2 can? It's the
Java EE client container?