aspose file tools*
The moose likes JBoss/WildFly and the fly likes JBoss + Jetty -> restart overwrites files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss + Jetty -> restart overwrites files" Watch "JBoss + Jetty -> restart overwrites files" New topic
Author

JBoss + Jetty -> restart overwrites files

Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

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

Joined: Sep 26, 2000
Posts: 919
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

Joined: Feb 20, 2001
Posts: 3695

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.
 
 
subject: JBoss + Jetty -> restart overwrites files