3

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

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

Sri Sankaran
  • 8,120
  • 4
  • 38
  • 47
merveotesi
  • 2,145
  • 15
  • 53
  • 84

1 Answers1

1

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.

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.

  • 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

  • If you really wanna use JBoss, try the following:

    • start in in debug mode all the time by adding this to your run.bat:

    set 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

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

    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).

Shivan Dragon
  • 15,004
  • 9
  • 62
  • 103
  • thanks for reply, i copied and pasted war file to server/default/deploy something has changed, but do i have to do this for every change, for example how can i debug, make a little change and right click publish it on the server and see the result? thanks again – merveotesi Nov 30 '11 at 17:30
  • thanks very much for detailed reply. it was really useful. also i learned that in eclipse ->servers view-> double click on the mentioned server->two tab at the bottom of the properties, click "Deployment" -> deault settings-> use jboss deploy folder. – merveotesi Dec 01 '11 at 08:10