[ 
https://issues.apache.org/jira/browse/RAVE-901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ate Douma updated RAVE-901:
---------------------------

    Comment: was deleted

(was: Configuring multiple global JNDI resources, aliased against a single 
'global' JNDI datasource (as needed for H2) turns out to be not so easy, with 
Cargo that is.
It would require manually (or through) script modifying the Tomcat server.xml 
and then additional resource links in separate context.xml files for the 
shindig (ROOT) war and portal war.
Although the configuration allows for different database backends for shindig 
and the portal, in the default configuration they share the same datasource 
anyway, so for the time being I'll settle for a single JNDI datasource as well.
Anyone who wants to separate these out in a custom setup can still easily do 
this by customizing the properties files and the application context 
definitions.  )
    
> 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

Reply via email to