JBoss服务器未更改 [英] JBoss server does not get changes

查看:74
本文介绍了JBoss服务器未更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Eclipse靛蓝 版本:Indigo Service Release 1 内部版本号:20110916-0149

Eclipse Indigo Version: Indigo Service Release 1 Build id: 20110916-0149

JBoss 6.1.Final

JBoss 6.1.Final

我有一台已配置了某些支持的服务器,但是该服务器已损坏. 崩溃意味着,即使我坚强; -停止服务器, -清理并在工作区中构建项目, -清理服务器并从头开始发布, -然后重新启动服务器 它的响应就像昨天的代码一样.我做了很多更改,但服务器似乎不知道更改.

I have a server which i have configured with some support, but it has broken down. Broken down means, even tough i; - stop the server, - clean and build projects in workspace, - and clean the server and publish from scratch, - and start the server again it responds like it has yesterday's code. I made lots of change but server seems not to be aware of changes.

如果您对此问题有任何建议,请提供.

If you have an advise on this issue, please provide.

谢谢

推荐答案

尝试手动自动部署.war或.ear文件,而不要使用Eclipse JBoss连接器(有时会崩溃并且行为异常).只需将文件复制到autodeploy目录(对于JBoss 6,我相信这是/server/default/deploy),检查JBoss的日志/控制台以查看您的文件当前已部署,然后从那里删除它,然后再次检查JBoss控制台确认已成功取消部署该应用程序.

Try autodeploying your .war or .ear file manually, not using the Eclipse JBoss connector (which sometimes breaks down and acts strangely). Just copy the file to the autodeploy dir (for JBoss 6 i believe this is /server/default/deploy), check the JBoss's logs/console to see that your file is currently deployed, then delete it from there, and again check that the JBoss console confirms succesfully undeploying that application.

现在,Eclipse JBoss连接器很方便,因为它可以让您快速进行部署,调试等(即使有bug).但是,您可以通过几件事来模拟它的行为,而无需实际使用它:

Now, that Eclipse JBoss connector is convenient because it lets you quickly deploy, debug, etc (even tho it has it's bugs). You can however to several things to simulate it's behavious without actually using it:

  • simplest one: Use Jetty: http://irc.codehaus.org/display/JETTY/Downloading+Jetty. Comes as Eclipse plugn, maven plugin, stand alone server. Jetty 8 supports servlet 3.0 so it's up to date. Deploying and debugging is fast and easy and it actually works (I use this a lot). Only downer: doesn't have EJB container.

使用tomcat 7(独立安装)和Eclipse sysdeo插件: http://www .eclipsetotale.com/tomcatPlugin.html .就像您在Eclipse中使用Java SE应用程序一样,允许无缝部署/调试.同样,失败者不是EJB容器

Use tomcat 7 (stand alone install) and the Eclipse sysdeo plugin: http://www.eclipsetotale.com/tomcatPlugin.html. Allows for seamless deployment/debugging as you'd do with a Java SE application inside Eclipse. Again, the downer is no EJB container

如果您真的想使用JBoss,请尝试以下操作:

If you really wanna use JBoss, try the following:

  • 通过始终将其添加到您的run.bat中,始终以调试模式启动:

set JAVA_OPTS = -Xdebug -Xrunjdwp:transport = dt_socket,address = 8787,server = y,suspend = n%JAVA_OPTS%

set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS%

  • 将您的目标"项目文件夹(Eclipse或Maven(无论您使用哪个))放在类似于[jboss root] \ server \ default \ deploy \ myAppName

  • make your "target" project folder (the one where either Eclipse or Maven (whichever you use)) to be something like [jboss root]\server\default\deploy\myAppName

从Eclipse的端口8787启动远程Java应用程序"调试会话.

Start a "Remote Java application" debug session from Eclipse on the port 8787.

利用所有这些,项目应该立即部署您所做的任何更改,并在执行到达它们时在任何断点处停止.它并不出色,因为有时不会考虑某些更改(例如:如果您在Java类中修改方法的主体,它将被热部署.如果您添加新的方法,则不会).

With all this the project should deploy any changes you make on the fly, and stop at whatever breakpoints you have when execution reaches them. It's not awesome, as sometimes certain changes will not be taken into account (eg: if you modify the body of a method in a Java class it will be hot-deployed. If you add a new method it will not).

这篇关于JBoss服务器未更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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