嵌入式 Glassfish - EJB 3.1 - @Schedule

发布于 2024-09-15 14:49:17 字数 204 浏览 0 评论 0原文

我是 Java EE 6 的新手,正在努力让许多演示应用程序最终运行。

我有一个应用程序范围的 bean,上面有一个 @Schedule 注释,理论上应该每分钟触发该方法。但是,该方法似乎从未被调用。它只是将其被调用的信息写入日志。

我可以在嵌入式 glassfish 上使用 EJB3.1 吗?我需要做一些特别的事情才能让它发挥作用吗?

沃尔特

I am new to Java EE 6 and working on getting a number of demo applications running finally.

I have an application scoped bean that has a @Schedule annotation on it that should in theory trigger that method every minute. However, that method doesn't appear to ever be invoked. It simply writes to the logs that it was called.

Can I use EJB3.1 on embedded glassfish? Do I need to do anything special to make it work?

Walter

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

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

发布评论

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

评论(1

痴意少年 2024-09-22 14:49:17

(...) 但是,该方法似乎从未被调用过。它只是将其被调用的信息写入日志。

嗯...什么?

我可以在嵌入式 glassfish 上使用 EJB3.1 吗?我需要做任何特别的事情才能使其正常工作吗?

嵌入式 GlassFish 就像完整的 GlassFish,没有任何限制。因此,您可以将 EJB 3.1 与完整的 Java EE 配置文件实现结合使用,也可以将 EJB 3.1 Lite 与 Web 配置文件实现结合使用。我不确定 @Schedule 是否是 EJB 3.1 Lite 的一部分。

(...) However, that method doesn't appear to ever be invoked. It simply writes to the logs that it was called.

Hmm... What?

Can I use EJB3.1 on embedded glassfish? Do I need to do anything special to make it work?

Embedded GlassFish is like a full GlassFish, there are no restrictions. So you can use EJB 3.1 with the full Java EE profile imeplementation and you can use EJB 3.1 Lite with the Web Profile implementation. I'm not sure @Schedule is part of EJB 3.1 Lite tough.

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