Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1788
  • Last Modified:

automatically reload of a web application in jboss

I have IDE myeclipse and appserver jboss. Myeclipse compiles and copies the editied files over to the deploy area in jboss, but jboss doesnt hot deploy the changes. I can make changes within a method without restarting the server, but if I add methods or change method signaturs, I have to restart the application. I am very new to jboss, but have extensive experience with tomcat, and there you can :
- reload applications in a own admin site
- you can specify in the context if a application should listen for changes, and hot deploy them

I refuse to belive what my new work collegues claims that you have to restart jboss after signature changes, I just wonder how/where to do it. Have googled a lot, and it says that its possible (ant script, jboss console, etc), but doesnt say spesifically where to do it

a small note, the appliction (exploded war) is inside a ear application, I dont know if that makes a difference

thanks for all help
0
Vervik
Asked:
Vervik
  • 5
  • 3
1 Solution
 
ramazanyichCommented:
The simplest way in that case just change web.xml file (on unix you can use touch utility for it) inside your exploded war WEB-INF folder. It will cause web application to redeploy
0
 
VervikAuthor Commented:
its seems like that is the only way to solve the reload issue, thats what I found as well when I googled on the topic in the beginning. I miss my tomcat, hehe
0
 
ramazanyichCommented:
actually jboss uses tomcat as web server inside. Probably you could also try to use the way of tomcat
-you can specify in the context if a application should listen for changes, and hot deploy them
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
VervikAuthor Commented:
cool, may I ask in which configuration file in the jboss you do this? in tomcat you do it in <TOMCAT_HOME>/conf/<host>/<app_name>.xml by adding a autoreload (or something like that) attribute in the context node. I assume its eqvialent easy in jboss if I know which file to edit?

thanks for all help
0
 
ramazanyichCommented:
there is a root folder for jboss tomcat in $JBOSS_HOME/server/default/deploy/jboss-web.deployer
In this place there is server.xml, context.xml files. Probably you could change them
0
 
ramazanyichCommented:
Probably following should work:
add reloadable="true" attribute  to the <Context> element in $JBOSS_HOME/server/default/deploy/jboss-web.deployer/context.xml
0
 
VervikAuthor Commented:
perfect, thanks. I will test it tomorrow morning at work. I saw that the application I'm working on is inside a ear package (the ear is a biig content system called Escenic). I tried to "touch" the web.xml file (just made a space and saved, suck the the file timestamp changed), but it didnt reload. I assume this has something to do cause its inside the ear? But thats a other question and thread, I will test the solution you gave on an other application I have at work which run inside jboss

thanks for all help
0
 
ramazanyichCommented:
if you war inside ear then probably you should reload ear too by touching META-INF/application.xml file inside root ear folder
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now