Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss + Jetty -> restart overwrites files

 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
I'm using JBoss 3.0.2 + Jetty on Solaris

If I put an EAR file into /usr/local/jboss/server/default/deploy

then my webapp will end up here:
/var/tmp/Jetty__8080__webappname/

this is fine. But if I ever restart JBoss, the entire directory gets re-created, so any images I've added after deployment get wiped out.

If I just remove the EAR file, it won't necessarily re-deploy the app right? So how do I stop this overwriting?
 
George Brown
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by any images I've added after deployment?
Are you adding images to the temporary folder generated by JBoss?
If so, the way I handle adding to the webapp after deployment is to clean up (ie. delete the temporary directory) and redeploy the .ear file, which would contain the .war file which itself contains the extra images. It may take a bit longer than dropping an extra file into the autogenerated directory but at least it doesn't need a reboot, and if you do reboot, JBoss will faithfully reproduce the temp directory as it was before.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose var/tmp should have clued me in.

the package I'm deploying is JIRA, which lets you customize some fields. These customized values can have custom icon images, which i added to /images/icons under the webapp directory. But when redeployed on JBoss restart (or OS reboot), these directories where replaced from the original EAR.
From now on , I'll include the images in my original EAR.

duh.. thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic