I wrote a client to get EJB's deployed in JBoss. I referred to examples in internet. Almost all of them use Properties class to define the URL and initial context factory. I want to know why properties is preferred over hashtable as here we are not storing it to file or reading from it? One sample in internet is -
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
props.put(Context.PROVIDER_URL, "file:///");
// Create the initial context from the properties we just created
Context initialContext = new InitialContext(props)