Bug 779948 (SOA-2308) - DB schema tool needs to account for ModeShape DB configuration.
Summary: DB schema tool needs to account for ModeShape DB configuration.
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-2308
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: EDS
Version: 5.1.0.ER1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.1.0.CR1
Assignee: Van Halbert
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-10 20:43 UTC by Ken Johnson
Modified: 2011-02-04 19:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
RHEL 6, JDK 1.6
Last Closed: 2011-02-04 19:55:39 UTC
Type: Task


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-2308 0 None None None Never

Description Ken Johnson 2010-09-10 20:43:32 UTC
Affects: Documentation (Ref Guide, User Guide, etc.), Compatibility/Configuration
project_key: SOA

The schema tool that facilitates switching databases for SOA-P components should also support ModeShape.  ModeShape can store its content in various RDBMSs - the same as supported by SOA-P.  However, since ModeShape is optional - it will only be present when a user purchases EDS, not just the base SOA platform, the tool should first determine if MS is present before performing any configuration.

Comment 1 Van Halbert 2010-09-16 20:25:56 UTC
Parent: Added: SOA-2271


Comment 2 Julian Coleman 2010-09-17 14:08:30 UTC
This needs more consideration.  In summary, the schema script changes the
database for all the components that use a database, and it makes them all
use the same database.  However, this is too restrictive for ModeShape, which
will normally use multiple data sources.  Also, some ModeShape data sources
(non-database ones) make no sense for the other components.


Comment 3 Randall Hauch 2010-09-17 15:16:16 UTC
ModeShape will likely be configured in SOA-P to have a single repository that uses a single database. That will be sufficient out-of-the-box; changes can be made to that by customers if needed, but more likely they will leave the configuration for that repository alone (and maybe add other repositories). So the tool could definitely manipulate the specific fragment in the ModeShape configuration file that corresponds to this out-of-the-box repository source.

The question is whether the ModeShape repository content should be stored in the same database with other data. (I don't know what that other data entails, so it certainly might make sense.) All of the tables in the ModeShape schema should start with "MODE_" or "DNA_" (for legacy reasons), but I'm not sure whether our index names use a prefix. Hopefully there won't be a name conflict with other tables in the shared database.

ModeShape does come with an executable JAR that will generate the DDL script for a particular database, if that's required or useful. (See http://docs.jboss.org/modeshape/latest/manuals/reference/html_single/reference-guide-en.html#jdbc-storage-connector for details.)

Comment 4 Van Halbert 2010-09-17 15:17:49 UTC
To use the schema tool to update modeshape repository appears to be complex, because the modeshape config file can be updated by users (adding other repositories) and therefore a template can't be used to replace the database properties (as is done with the others).   We could build a complex UI so the user can choose what to replace (the most flexible) or use the schema tool to only replace the config when only 1 repository is defined.   If more then one exist, then alternative  (manual)  measures must be taken by the user.


Comment 5 Van Halbert 2010-10-07 13:41:30 UTC
Parent: Removed: SOA-2271 


Comment 6 Van Halbert 2010-10-11 23:43:15 UTC
Link: Added: This issue is duplicated by SOA-2398


Comment 7 Van Halbert 2010-12-03 21:30:08 UTC
First step is to change the DB schema  templates to have a substitution variable:   @JNIDNAME@  that will be substituted for when tool is run.    Doing this will allow modeshape to reuse the templates to create its -ds.xml file that have its defined JNDI name.

Comment 8 Van Halbert 2010-12-06 16:36:40 UTC
Committed changes so that the modeshape-eds-store-ds.xml will be replaced with new settings that were applied to the template.

Comment 9 Van Halbert 2010-12-06 16:37:44 UTC
Changes were applied to the soa build project and should be in the ER5 release.

Comment 10 Jiri Pechanec 2011-01-06 08:28:49 UTC
DataSource is reconfigured but modeshape-config.xml file still contains incorrect dialect configuration - like mode:dialect="org.hibernate.dialect.HSQLDialect

Comment 11 Van Halbert 2011-01-06 14:13:47 UTC
This could be problematic, because the config file can't templetized because we can't be sure what the user has already changed.   They now could have multiple sources that use HSQLDialect.   Do we, by default, change all occurrences?   Maybe, when the db schema tool is run, and modeshape is determined to be deployed, we add a prompt telling the user that they will need to update the config file with this "DIALECT".    Suggestions?

Comment 12 Jiri Pechanec 2011-01-06 14:43:24 UTC
I'd say modify the file in that way that only dialect for eds-store JpaSource is modified, rest is untouched.

Comment 13 Van Halbert 2011-01-09 20:14:06 UTC
Added logic to replace the dialect for the eds-store in the modeshape-config.xml

Comment 14 Van Halbert 2011-02-04 19:55:39 UTC
The db schema-tool has be fixed to update the appropriate files (i.e., config file and -ds.xml) so that all references are updated accordingly.


Note You need to log in before you can comment on or make changes to this bug.