Hi there,
I've got the following intent (similar to the JIRA/Confluence/Jenkins
Homes):
* Server starts with a property "myapp.home" pointing to a writable
directory on the filesystem
* Each module can get a data area "<myapp.home>/<module>"
* One module provides a H2 database whereas the database files will be
stored within the modules data area (f.e. "<myapp.home>/database")
What I need is this:
* Update DataSource setup according to the dynamically provided info
* Run a migration process (I'm using Flyway here instead of OpenEJBs
builtin ImportSql attempt)
* Setup JPA framework (EclipseLink in my case)
Righ now the problem is that the Datasource is configured within the
tomee.xml which requires the location of the db files directory which is
unfortunately available at a later point:
<Resource id="ratiDS" type="DataSource">
JdbcDriver = org.h2.Driver
JdbcUrl = jdbc:h2:test
JtaManaged = true
</Resource>
I've tried to use an in-memory url ahead hoping to update the URL later
on but the configured URL is stored within the 'DriverConnectionFactory'.
Does someone here has an idea of a nice solution for this or am I simply
overseeing something ?
Best regards
Daniel Kasmeroglu