Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why does a deploy invalidate all my configuration data

 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

each time I deploy my changed version of jforum, I have to go thru install.jsp again. What is a proper way to simply update the application during development ?

All the best
Wolfgang
[originally posted on jforum.net by wolfgangk]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
War file deployment in general is really only good for initial application installs. They aren't designed for in place upgrades since most app servers delete and recreate the physical directory created from the war.

That said, if you have to use this method, you will need to make sure that the config directory (or at a minimum just the jforum-custom.conf file) is included to preserve settings. If it's a production setup, you will also have to plan for adding the current upload directory (attachments); images directory (avatars and custom smilies) and the jforumLuceneIndex directory.

An alternative development environment is to set up your app server with a "context" xml file that points to your project directory. E.g., your Eclipse workspace with the compile directory being the WEB-INF/classes directory. Many app servers can be set up to auto restart / load new classes if they change. This makes for a nice change it/test it environment.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That seems to be a good solution for local development. But is there any clever way to upgrade the deployed version ? It sounds like a hell of a task to do this upgrade manually each time.

There are certain customizations that I may want to do, that require changing the jforum code.

On all my own JSP projects, I use the tomcat manager application to remotely deploy new versions of my web application. Of course, I need to keep any user data out of my web app, because it would delete it when it recreates the web directory. Beside the complexity to create a user data directory and set up security policies, when the user installs it the first time, I would prefer that approach.

Wolfgang
[originally posted on jforum.net by wolfgangk]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic