Ate Douma created RAVE-901:
------------------------------
Summary: Move database access to container provided JNDI resource
Key: RAVE-901
URL: https://issues.apache.org/jira/browse/RAVE-901
Project: Rave
Issue Type: Improvement
Affects Versions: 0.20
Reporter: Ate Douma
Assignee: Ate Douma
Fix For: 0.21
Currently we configure database access through the rave portal.properties and
rave.shindig.properties files deployed within their war application (portal and
ROOT).
This however should be more the responsibility of the admin deployer and be
managed at the container (application server) level. Typically this is done
through JNDI resource lookups.
This will also solve a current issue with the default H2 database engine, also
bundled with both web applications, as they (by default) point to the same
database and therefore can cause concurrent usage conflicts, causing exceptions
like this:
org.h2.jdbc.JdbcSQLException: Database may be already in use: "Locked by
another process". Possible solutions: close all other connection(s); use the
server mode
By moving to container provided JNDI resources, this problem can be solved as
we then can deploy the H2 database engine (jar) on container level (only) and
access will go through a single classloader without the above problems.
The consequence of this will be that existing projects will have to be updated
for the new configuration, meaning that the above mentioned property files will
no longer define the complete database connection configuration but only a NEW
property which I will call rave.dataSource.name, specifying the JNDI resource
lookup name, e.g. like
rave.dataSource.name=jdbc/ravePortalDB (for the portal.properties)
and
rave.dataSource.name=jdbc/raveShindigDB (for the rave.shindig.properties)
Through an updated cargo configuration, these JNDI resources will be
'automatically' configured and setup for the target container (Tomcat), using
Maven pom properties for the specific connection parameters (which then can be
overridden/customized in your custom projects).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira