OSGI-休眠+ JBoss 接缝

发布于 2024-08-17 18:02:48 字数 231 浏览 1 评论 0原文

我正在运行 JBoss Seam Web 应用程序,并使用 Hibernate 作为持久性提供程序。我正在考虑迁移到 OSGI 以简化部署和更新。

我还没有任何使用 OSGI 的经验,所以我不知道这是否可以完成以及有什么限制。

例如,如果我更改实体类,并且希望 Hibernate 删除一些表并创建一些新表,这可能吗? hibernate是否需要与OSGI挂钩,以便它知道删除表a并创建表b?

沃尔特

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千寻… 2024-08-24 18:02:48

我不确定我是否完全理解你的问题。如果您选择使用 OSGi 来模块化您的应用程序,则该选择不会影响 Hibernate 的行为。当然,当您激活捆绑包来管理架构时,您可以调用 Hibernate 的 SchemaExportSchemaUpdate API,但 Hibernate 不会为您驱动该过程。你必须自己做。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文