As i have googled what i am able to find , i have cached the JavaM pointer in the JNI onload function and then using that javaVM pointer to get the JNI env in the callback function.
It is working fine until the pointer reference is not getting changed for JavaVM?