JDBC resource shared between webapps in Tomcat -


i have such configuration of database in tomcat instance (h2):

<resource name="jdbc_ttds" auth="container"             type="javax.sql.datasource"             driverclassname="org.h2.driver"             url="jdbc:h2:***;ifexists=true"             username="**"             password="**"             maxactive="20"             maxidle="5"             maxwait="-1" /> 

i want have 2 applications in instance, connect through jndi. h2 thread-safe, file locked during tomcat running.

am able have 2 jndi connections inside tomcat 2 different apps? is safe, because 1 of applications insert/drop db, while select it. however, both have concurrent connections db.

if impossible or unsafe, best idea run h2 in server mode?


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -