Hi , From what I understand , ENC is a naming context local to the component deployed , you can co-relate the localness to the references (ejb-ref,resource-ref,resource-env-ref) in the ejb-jar.xml or web.xml . The reference names specified in these DD / annotations are apply to those components only . ENC uses the java:comp/env prefix automatically for its naming . Global JNDI names are specified by the deployer in a server implementation specific (maybe xml) file . The Global JNDI names should then be mapped to local ENC names by the deployer , in some cases the ENC references are resolved automatically by the server even if mapping between ENC & Global jndi doesnt exist.
I suppose ENC is used to make the application component independent of deployment time details . Hope this helps and is correct Guys please correct me if I'm wrong .