如何在不重新启动服务器的情况下重新部署 EJB 项目
我对 JBoss Seam 和 Java Web 应用程序开发总体来说是新手。在阅读一些教程时我无法弄清楚的一件事是如何重新部署我在 EJB 项目中进行更改的 bean,而无需重新启动托管 JBoss Seam Web 项目的 JBoss 应用程序服务器(6.0),该项目使用豆子。 JBoss AS的启动时间大约需要2分钟,目前对项目进行更改和重新部署是很痛苦的。
我在网上读到的一些建议包括:
- 使用 jmx-console 例如。转到 http://localhost:8080/jmx-console/ ...好吧,但是怎么办呢?我到底该怎么做?
- 为 ant 创建一个 build.xml 文件,并进行某种自动部署...周围有什么好的例子吗?
其他更有经验的 JBoss Seam Web 应用程序开发人员如何更快地部署您的项目?
非常感谢任何帮助,谢谢。
I'm new to JBoss Seam and Java web app development in general. One thing that I cannot figure out while going through a few tutorials is how to redeploy beans that I've made changes to in an EJB project without having to restart the JBoss Application Server (6.0) that is hosting the JBoss Seam web project which uses the beans. The JBoss AS takes about 2 mins to start up, and it is painful making changes to the project and redeploying at present.
Some suggestions that I've read on the web include:
- Using the jmx-console eg. go to http://localhost:8080/jmx-console/ ... ok, but how? What do I do exactly?
- creating a build.xml file for ant, and get some sort of autodeploy thing going... are there any good examples around?
How do the rest of you more experienced JBoss Seam web app developers deploy your projects more rapidly?
Any help much appreciated, thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这可能是由于多种原因造成的:
您对 JBoss 配置进行过任何更改吗?这也可能导致热部署问题。
祝你好运。
This can be due to a number of reasons:
Did you make any changes to your JBoss configuration? This can also lead to hot deployment issues.
Good luck.
请注意,热重新部署可能会导致内存泄漏在一些库中(例如 Jasperreports)。如果是这样,请重新启动服务器。但很少需要重新启动 JBoss。
Just beware, hot redeploying may reveal memory leaks in some libraries (e.g. Jasperreports). If so, do restart your server. But you need to restart JBoss very rarely.
我被告知的另一个选择是使用 JBoss 中的“Touch Descriptors”按钮(类似于“快速重新部署”选项)。
Dev Studio 4.0 有它,但不确定早期版本。显然,它在服务器上创建了一个新的时间戳,并强制重新读取 web.xml 文件,从而重新部署。
Another option that I have been told is to use the "Touch Descriptors" button (which is like a "quick redeploy" option) in JBoss.
Dev Studio 4.0 has it, not sure about earlier versions though. Apparently it creates a new timestamp on the server and forces the web.xml file to be re-read, thus redeploying.