• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

DB removed on every deployment

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I've problem with Jforum on tomcat 5.0.28 and mysql when i deploy a new war.
Each time db is removed, is it possible to keep my db when I deploy a new version of my war ?

Many Thanks for your help
[originally posted on jforum.net by alamaki]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assume you mean your DB connection settings and not the actual DB tables?

The latter one I can't help with.. but the former is because the the war deployment system is really designed for inital application deployment and not general maintenance. (unless it's a code only web-app with no custom properties, etc).

The problem is probably this. With Tomcat, when you delete or move the war file out of the webapp directory or redeploy the same war file, it will also delete the matching application directory.

This application directory contains the jForum configuration information, as well as user uploaded info like avatars and attachments. So, redeploying a "stock" war file will reset the configuration info to the initial state.

If you need to use war files to deploy code changes, etc., you should base that war file off the current state of the production webapp directory. This will ensure that all user uploaded content and configuration info is there. Plus this distro should be created either with the webapp shutdown to prevent users from uploading things or created in and deployed in a short time frame.

Of course, you can also drop the automatic war deployment and manually extract it to the webapps directory. This will update code and the like but preserve the config file and user info (because they don't exist in the war file).

E.g., when you initiallyif you deploy a jForum.war, a jForum subdirectory is created. Removing the jForum.w
[originally posted on jforum.net by monroe]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic