[jboss-jira] [JBoss JIRA] (WFLY-1186) Create JPA service callback for invoking database migration
Anil Arora (JIRA)
jira-events at lists.jboss.org
Mon Jun 3 12:09:55 EDT 2013
[ https://issues.jboss.org/browse/WFLY-1186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778936#comment-12778936 ]
Anil Arora commented on WFLY-1186:
----------------------------------
I personally think it might be easier to implement this in the persistent unit class vs a separate service. As long as I have access to the datasource object, it's all good. Even throwing an event would be useful...maybe an observer to listen to DB datasource creation events, etc. I'm sure there are clean ways of doing this.
Of course, to add a wrinkle to this, it would be useful to let Hibernate validate the schema post migration to ensure that the database was migrated properly. Useful for development time.
> Create JPA service callback for invoking database migration
> -----------------------------------------------------------
>
> Key: WFLY-1186
> URL: https://issues.jboss.org/browse/WFLY-1186
> Project: WildFly
> Issue Type: Feature Request
> Components: JPA / Hibernate
> Reporter: Anil Arora
> Assignee: Scott Marlow
>
> Looking for a simple callback/listener mechanism so that we can invoke a database migration script before JPA persistent unit starts up and runs the Hibernate schema validation mechanism.
> Ideally, there would be a property within the persistence.xml that indicates which class to call. It would also pass in/inject the datasource that is being used for the persistence unit.
> Essentially, this would solve the lack of migration support in Hibernate itself.
--
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
More information about the jboss-jira
mailing list