private InitialContext getInitialcontext() throws NamingException
Properties env = new Properties();
System.out.print("Connection to the weblogic server is not there. " +
return new InitialContext(env);
this is how u get the InitialContext for doing the jndi lookup.
here we have hard coded the url as "t3://localhost:7001"
but there is some way through which we can dynamically
know the servername
I dont' know if this works in weblogic or not, but in other EJB servers, you can place a file in the same directory as your executable called jndi.properties, which is basically a properties file that sets the values that you are setting explicitly here.