1. Setup Server and Client applications as described here.
  2. Setup data source in Tomcat as described here.

But, instead of putting myapp.xml under [lcds root]/tomcat/conf/Catalina/localhost, rename it to context.xml and put it in the META-INF directory of the myapp application WebContent folder.

Caveat: From what I read at Apache.org, what Tomcat should do is to check if there is myapp.xml in the [lcds root]/tomcat/conf/Catalina/localhost directory.  If not, then it should load your context.xml file and rename it to myapp.xml and store it in this directory.  The myapp.xml file will then take precedent to the context.xml file in your META-INF directory.  So, if you change context.xml in the future, make sure to check [lcds root]/tomcat/conf/Catalina/localhost directory and delete myapp.xml if exists so that Tomcat can reference the updated context.