datasource = (DataSource) initialContext.lookup("java:/MySqlDS");
If you look at the JNDIView in the jmx-console (the getting started doc shos how), you can see what JNDI names your beans are bound to
Got it to work. Thanks for your help.
theoretically u should ask for java:/YOURJNDINAME
I did but it doesnt work 4 me