I think you can, because CUBA just works with a JDBC DataSource published in JNDI.
However you can have issues with Studio as it relies on a specific content in Tomcat’s
context.xml. So I would suggest using the default pool in development and provide a custom
context.xml when building WAR: