Question

I am running a JBoss Seam web application with Hibernate as the persistence provider. I am considering migrating to OSGI to simplify deployment and updates.

I don't have any experience yet with OSGI, so I don't know if this can be done and what the limitations are.

For instance, if I change entity classes and I want Hibernate to drop some tables and create some new ones, will that be possible? Does hibernate need to have hooks into OSGI so it knows to drop table a and create table b?

Walter

Was it helpful?

Solution

I'm not sure I fully grasp your question. If you choose to use OSGi to modularize your application, that choice has no impact on the behavior of Hibernate. You can, of course, make calls into Hibernate's SchemaExport or SchemaUpdate APIs when you activate bundles to manage your schema, but Hibernate won't drive that process for you. You'll have to do it yourself.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top