JBoss 是否缓存类文件?
我正在努力解决一个奇怪的问题:当我对本地主机 JBoss 实例中的 POJO 或 Seam 组件进行更改、重新启动它并加载页面时,更改是可见的。然而,在我们的服务器上,运行相同版本的 JBoss,当我停止实例、删除 WAR 文件、上传最新版本并重新启动 JBoss 时,它不会显示一些新的服务器端功能。
具体来说,更改是对实现 javax.faces.validator.Validator 类的 POJO 类。然后它在 XHTML Facelet 中使用,如下所示:
<h:inputText value="#{outsideaccount.accountOrganizationEmail}" maxlength="50"
id="txtOrganizationSupportEmail"
validatorMessage="Organization Support Email is not valid. It must be in the pattern 'some_id@some_domain.com'.">
<f:validator validatorId="AnyEmailValidator"/>
</h:inputText>
我能够在本地主机 JBoss 上正确使用电子邮件验证器;在开发服务器上,它在同一页面上使用同一电子邮件引发验证错误。很奇怪。 JBoss 是否在某处缓存了类文件?如何清除 JBoss 开发服务器缓存中的所有内容?
我本地使用的是Win XP Pro;开发服务器在 JVM 版本 1.5.0_16-b02 上使用 JBoss 4.2.3.GA,采用 Unix SunOS 5.10。谢谢。
I'm wrestling with a strange problem: When I make a change to a POJO or Seam Component in my localhost JBoss instance, restart it, and load the page, the change is visible. However, on our server, running the same version of JBoss, when I stop the instance, delete the WAR file, upload the latest version, and restart JBoss, it won't show some of the new server-side functionality.
Specifically, the change is to a POJO class which implements javax.faces.validator.Validator class. It's then used in the XHTML Facelet like this:
<h:inputText value="#{outsideaccount.accountOrganizationEmail}" maxlength="50"
id="txtOrganizationSupportEmail"
validatorMessage="Organization Support Email is not valid. It must be in the pattern 'some_id@some_domain.com'.">
<f:validator validatorId="AnyEmailValidator"/>
</h:inputText>
I'm able to use the email validator on my localhost JBoss correctly; on the development server, it throws a validation error using the same email on the same page. Very strange. Is JBoss caching the class files somewhere? How do I clear everything out of the JBoss development server cache?
I'm using Win XP Pro locally; the development server is using JBoss 4.2.3.GA on JVM Version 1.5.0_16-b02, with Unix SunOS 5.10. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
JBoss 有 work 和 tmp 目录,您可以删除它们以确保一切都是干净的。内容可以缓存在那里,因此如果遇到问题,您可以在部署时清除它们。还有一个 设置< /a> 强制这在 JBoss 端自动发生。如果您的问题是缓存清除问题,这将有助于解决它。
另一种可能性是您在 JBoss 上部署了该 war 的两个副本,尽管在生产中部署时这可能会给您带来一些错误。
JBoss has work and tmp directories that you can delete to make sure everything is clean. Things can get cached there, so you can clear them out on deploy if you are having problems. There is also a setting to force that to happen automatically on JBoss's end. If your problem is a cache clearing problem, this will help solve it.
Another possibility is that you have two copies of that war deployed on JBoss, although that should give you some errors when you deploy in production.