在 JBoss 上热部署 - 我如何让 JBoss“看到"?改变? [英] Hot deploy on JBoss - how do I make JBoss "see" the change?

查看:18
本文介绍了在 JBoss 上热部署 - 我如何让 JBoss“看到"?改变?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 Java EE 应用程序,我在开发过程中在本地 JBoss 安装上反复部署该应用程序.我想通过将我的应用程序直接热部署到 [JBOSS]/server/default/deploy/myApp

I am developing a Java EE application that I deploy over and over again on a local JBoss installation during development. I want to speed up the build by hot deploying my application straight into [JBOSS]/server/default/deploy/myApp

它似乎有效 - 但在硬部署和 JBoss 开始使用新类之间似乎也有一些随意的延迟.我对 JBoss 不是很熟悉,但我认为它缓存类,这就是导致问题的原因.

It seems to work - but there also seems to be a somewhat arbitrary delay between the hard deploy and when JBoss starts using the new classes. I am not very familiar with JBoss, but I assume it caches classes, and that this is what causes the problem.

我是否正确,如果正确,我该如何让 JBoss 刷新它的缓存?

Am I correct, and if so, how do I make JBoss flush it's cache?

推荐答案

我的包中遇到了同样的问题:(Eclipse IDE + JBoss 服务器适配器)+ JBoss AS 7.0.1(社区项目).

I had the same problem in my bundle: (Eclipse IDE + JBoss server adapter) + JBoss AS 7.0.1 (community project).

我的解决方案非常简单 - 您应该转到 JBoss 管理面板(默认为 localhost:9990),在配置文件设置中打开 Core - Deployment Scanners.打开 Autodeploy-Exploded(设置为 true),根据您的意愿,您可以将扫描仪时间(默认为 5000 毫秒)设置为适合您的(我设置为 2000,以便在我对项目进行更改时在 Eclipse 中进行更快的增量发布).而已.现在 JBoss 不仅对 HTML(JSF、XHTML 等)文件进行了 HOT 部署,而且还负责处理 POJO 类(beans 等)文件.

My solution is very simple - you should go to JBoss administrative panel (by default localhost:9990), there in profile settings open Core - Deployment Scanners. Turn on Autodeploy-Exploded (set to true), and by your wishes you can set scanner time (by default 5000 ms) to appropriate for your (I set to 2000, for more fast incremental publish in Eclipse when I make changes to projects). That's it. Now JBoss makes HOT deploy not only for HTML (JSF, XHTML and so on) files, but also takes care of POJO classes (beans and so on) files.

这篇关于在 JBoss 上热部署 - 我如何让 JBoss“看到"?改变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆