aspose file tools*
The moose likes JForum and the fly likes Can you run multiple deployments of JForum? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Can you run multiple deployments of JForum?" Watch "Can you run multiple deployments of JForum?" New topic
Author

Can you run multiple deployments of JForum?

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I'm interested in running one instance of Tomcat and MySQL with multiple instances of JForum each with their own database schema.

I have two instances of JForum deployed on a single instance of Tomcat. Both instances are running but when I modify the first instance the second instance sees the changes from the first.

Each instance has a different database name in the WEB-INF\config\database\mysql\mysql.properties.

Any ideas as to what I'm doing wrong?

Thanks,
Wes
[originally posted on jforum.net by wes]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
You should have different context names and one JForum isntallation per context. You can't share a JForum installation.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
yes. I have created multiple context names.

In my Tomcat webapps directory I have a jforum1 installation and a sperate jforum2 installation. I also created seperate databases for each called jforum1 and jforum2.

When I start tomcat I get what seems to be two separate instances of JForum until I start editing (adding Catagories, Topics, etc.).
[originally posted on jforum.net by wes]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Something isn't quite right in your configuration. I run 5 instances of JForum on a single Tomcat with no problem. However, I am doing it a bit different than you. Each JForum instance is in a separate Host in Tomcat. Within that Host I have a Context specifically for JForum.

If you can't use virtual hosting can you post a little bit of the server.xml section that you're using? Specifically, just the Context sections.
[originally posted on jforum.net by stdunbar]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
If by context you mean separate directories within Tomcat's webapps directory or do you mean something different? Like special context entries within Tomcat's server.xml? I am using as standard default server.xml file. I have not tailored it in any way.

Thanks for your help!
[originally posted on jforum.net by wes]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Ok, well that makes it much simpler.

I think that, as Rafael said, you will want to make sure that your configuration is totally separate. It sounds as if both databases are logging into the same place. You've created different databases - I would also encourage different database users too. That way as long as you have two different WEB-INF/config/jforum-custom.conf files you are sure that the two instances can't overlap.

Lastly, I would encourage you to change the cookie names to two different things also. Because your hostname will be the same for both forums you may have some issues. This is set in the jforum-custom.conf file under cookie.name.data, cookie.name.user, cookie.name.autologin, and cookie.name.userHash. They default to things like jforumUserId for the cookie.name.data (see WEB-INF/config/SystemGlobals.properties for all of them). You might want to just append something like "forum1" and "forum2" to the cookie name.
[originally posted on jforum.net by stdunbar]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thanks stdunbar!! That fixed it!

I'm not sure how it happened but the WEB-INF/config/jforum-custom.conf file had the same database.connection.dbname=jforum1 in both files. I fixed that and everything is looking good so far!!
[originally posted on jforum.net by wes]
 
 
subject: Can you run multiple deployments of JForum?