I remember readin an article sometime back that EJB annotations can only be used at the server side and not at the client side. This would mean that client code would still have the JNDI lookup code. why hasn't sun taken care of this ?
Originally posted by Merrick Schincariol: Java EE clients support dependency injection into static fields. So a remote EJB client can inject the bean reference without having to use JNDI.
In the scenario above who is responsible for the naming and directory services?
well, the client still needs to do the lookup, but the actual implementations are hidden in the framework you're deploying as part of your application.
Originally posted by Jeroen T Wenting: well, the client still needs to do the lookup, but the actual implementations are hidden in the framework you're deploying as part of your application.
I meant that the client does not have to write the lookup code.
Is it correct to say that the Service Locator pattern is in this way introduced in the framework that is being deployed, whereas previously this design choice was left completely in the hands of the developers?
Originally posted by Alexandros Stivaktatis: Is it correct to say that the Service Locator pattern is in this way introduced in the framework that is being deployed, whereas previously this design choice was left completely in the hands of the developers?