This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
This will get you the InitialContext to lookup the JNDI object if and only if the Java Class that has this line of code deployed onto the Application server.
This will not work without supplying the InitialContextFactory and Provider URL ( Please check JBoss specific parameters and their values) if you have this line of code in a Java class that is running outside Server JVM.
Joined: Jan 24, 2009
thank you for the reply.
am i supposed to specify this class name in the environment variable inside the DataSource descriptor(mysql-ds.xml) file?
actually i am doing this for the first time.
as you can see, i have given the JNDI name as MySqlDS.
so what i dont understand is in the code-
what is this env variable. or shall i code it simply as-
please give me an example if possible.
sorry to bother,
thank you again.