This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I created a simple java project in NetBean 7.0 and added jar file sqljdbc4.jar for MS SQl support.
I created a class where i have created a datasource (code below) for MQ SQL.
It connects database using the datasource and gets record count (504) successfully. (I have a Product table which has 504 records)
But it throws error when tried binding to Context. Could someone help me to suggest what should i enter to fill up the "???" in the code (red) below?
/* Bind the DataSource to JNDI so that we can look for the datasource by the name given**/
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY," ??? ");
env.put(Context.PROVIDER_URL, " ??? ");
Context ctx = new InitialContext(env);