I have a .properties file in my application which contains dataSource properties. I set up a JNDI reference to this dataSource using the following code :
//
JNDI context are private to each webapp. Context created in one app can't be accessed by others.
Try to create an entry in GlobalNamingResources and links in both webapps using to see if it works.
I used this setup before to read from both apps but never tried to write from one. So not sure if it will work.