We recommend using the no-arg InitialContext constructor. As long as appserv-rt.jar
is in the classpath, the correct naming provider will bootstrap automatically in the client JVM.
Since you're writing a non-portable stand-alone client, you need to explicitly specify the
global JNDI name of the EJB. Based on the code snippet that would be :
new InitialContext().lookup("ejb/CodeFormat_Bean");