简体   繁体   English

JBoss服务器没有得到改变

[英]JBoss server does not get changes

Eclipse Indigo Version: Indigo Service Release 1 Build id: 20110916-0149 Eclipse Indigo版本: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. 如果您对此问题有建议,请提供。

Thanks 谢谢

Try autodeploying your .war or .ear file manually, not using the Eclipse JBoss connector (which sometimes breaks down and acts strangely). 尝试手动自动部署.war或.ear文件,而不是使用Eclipse JBoss连接器(有时会出现故障并且行为异常)。 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. 只需将文件复制到autodeploy目录(对于JBoss 6,我相信这是/ server / default / deploy),检查JBoss的日志/控制台以查看您的文件当前已部署,然后从那里删除它,并再次检查JBoss控制台确认成功取消部署该应用程序。

Now, that Eclipse JBoss connector is convenient because it lets you quickly deploy, debug, etc (even tho it has it's bugs). 现在,Eclipse JBoss连接器很方便,因为它可以让您快速部署,调试等(即使它有它的错误)。 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 . 最简单的一个:使用Jetty: http//irc.codehaus.org/display/JETTY/Downloading+Jetty Comes as Eclipse plugn, maven plugin, stand alone server. 来自Eclipse插件,maven插件,独立服务器。 Jetty 8 supports servlet 3.0 so it's up to date. Jetty 8支持servlet 3.0,因此它是最新的。 Deploying and debugging is fast and easy and it actually works (I use this a lot). 部署和调试快速而简单,实际上可以工作(我经常使用它)。 Only downer: doesn't have EJB container. 只有downer:没有EJB容器。

  • Use tomcat 7 (stand alone install) and the Eclipse sysdeo plugin: http://www.eclipsetotale.com/tomcatPlugin.html . 使用tomcat 7(独立安装)和Eclipse sysdeo插件: http//www.eclipsetotale.com/tomcatPlugin.html Allows for seamless deployment/debugging as you'd do with a Java SE application inside Eclipse. 与Eclipse中的Java SE应用程序一样,允许无缝部署/调试。 Again, the downer is no EJB container 同样,downer不是EJB容器

  • If you really wanna use JBoss, try the following: 如果你真的想使用JBoss,请尝试以下方法:

    • start in in debug mode all the time by adding this to your run.bat: 通过将此添加到run.bat中,始终以调试模式启动:

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

    • 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或Maven(无论你使用哪一个))就像[jboss root] \\ server \\ default \\ deploy \\ myAppName

    • Start a "Remote Java application" debug session from Eclipse on the port 8787. 在端口8787上从Eclipse启动“远程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). 这并不是很棒,因为有时某些更改不会被考虑在内(例如:如果你修改Java类中方法的主体,它将被热部署。如果你添加一个新方法,它将不会)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM