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
Post a Comment