Are the database connections used by JSTL <sql:query> tag persistent?
- I mean if I use a lot of
<sql:query>tags on a page then will they
share the same database connection? - What about across the page
connections? Does JSTL provide a way to use persistent connections
likemysql_pconnect()in PHP?
In JSTL for SQL tags you can give the datasource which you want to use for DB connections. It is upto the datasource which decides the management of DB connections. A SQL tag gives the datasource information like this:
The datasource attribute value can be of the following types:
In case you have a SQL query tags inside transaction tag. All the queries inside the transaction share the same connection for transaction management.