aspose file tools*
The moose likes JForum and the fly likes Problems with multiple JForum (2.1.6)  installation�s on JBoss (4.0.1) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Problems with multiple JForum (2.1.6)  installation�s on JBoss (4.0.1)" Watch "Problems with multiple JForum (2.1.6)  installation�s on JBoss (4.0.1)" New topic
Author

Problems with multiple JForum (2.1.6) installation�s on JBoss (4.0.1)

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi dear community,
I have some problems with the installation of multiple JForum�s.
All works fine until I�ve opened the last forum.

For e.g.:

Klick to Forum1 startpage, login, do some posts....everything allright
Klick to Forum2 startpage, login, do some posts....everything allright
Klick to Forum3 startpage, login, do some posts....everything allright
.....

and then when i want again to the Forum1 start page i�ll come out at Forum3. This goes far until i restart my JBoss.


I found a post here in the Forum about an equal Problem (http://www.coderanch.com/t/576128 ). I followed the advice and changed the 4 lines in the cookie section in a unique string like

cookie.name.data = jforumUserIdfesto
cookie.name.user = jforumUserInfofesto
cookie.name.autologin = jforumAutoLoginfesto
cookie.name.userHash = jforumUserHashfesto

for each forum.

And every Forum has now his own databaseuser (MySQL 5) with it�s database. First, every Forum has it�s own database too, but all Forum�s share the same user.
On a single installation on my JBoss everything work�s fine.

If someone can help me or gimme a tip i�ll be very happy..
ops:
[originally posted on jforum.net by JunkzTheGoblin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I didn't understand if, after setting up a different database for each JForum installation they are "sharing" user information, or if you want to share the information.

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

Joined: Apr 22, 2012
Posts: 17424
No, i don�t want to share information between the different forums...., the only thing i want to share is the JBoss Application Server which the forums run on.

mfg Junkz
[originally posted on jforum.net by JunkzTheGoblin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi dear community,
can someone tell me if the the cookiename JSESSIONID has something to do with my problem, because there are more than only one cookie with the same name. The cookies contain the paths to the different jforum installations. Or maybe someone can tell me where i have to look for changing the naming of the cookies in the sourcecode.

mfg Junkz
[originally posted on jforum.net by JunkzTheGoblin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Are you able to use virtual hosts? I have found that it is very simple to set up JForum under multiple virtual hosts. I'm running 5 JForum instances on one Tomcat. But I use virtual hosts to separate everything. I haven't had to mess with any of the cookie settings as they are diffferent hosts.

There is a JBoss Wiki page that shows you how to set up virtual hosts from the JBoss side. But part of setting them up also requires some DNS configuration. Is this a local test installation or is this a site visible on the internet? Do you have control over you DNS settings?

Let us know.
[originally posted on jforum.net by stdunbar]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi community, it�s me again...

A friend tells me about the evtl. imprecise explanation about my problem.
I try to do my job more exactly this time.

My goal, running a few JForum on my JBoss App. Server....failed.
I dived here in the forum in getting a few answers, i found some and followed
the advices (see above). But first of all....my problem.

I start my JBoss, he starts up, no errors. In my 2nd test scenario i�ve installed two JForum, called try01 and try02. They have both their own directorys in their deploy folder. They have both their own databases in mysql and each forum has it�s own database user.
I created a jforum-custom.conf file and entered different names for the cookies, for each forum.

cookie.name.data = jforumUserIdtry01
cookie.name.user = jforumUserInfotry01
cookie.name.autologin = jforumAutoLogintry01
cookie.name.userHash = jforumUserHashtry01

after jboss is coming up, i enter the try01 forum with
localhost:8080/try01

the forum show�s me the start page with the preconfigured admin topic.

now i enter the try02 forum with
localhost:8080/try02

the forum show�s me the preconfigured admintopic again, but with the try02 headline

so far so good

now when i want to reenter the try01 forum i�ll always get redirected to the try02 forum

when i call first the try02 forum after i have started my JBoss and then go to the try01 forum, it apears the same problem only in the other dircetion, i�ll be always redirected to the try01 forum.

The DB connection works fine, everything i post in the forums will be stored in the correct database.

Im running out of ideas
I hope i write more understandable this time.

mfg JunkzTheGoblin
[originally posted on jforum.net by JunkzTheGoblin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
In this testphase, all the changes i made are local, no access to the internet.
As far as i know, i don�t have access to the DNS configuration. I�ll try to figure out.

mfg JunkzTheGoblin
[originally posted on jforum.net by JunkzTheGoblin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
You can set this up locally without doing any DNS magic. On Windows modify C:\WINDOWS\system32\drivers\etc\hosts (at least that's what it is on my XP SP2 machine). This is a text file and likely contains only one entry:



(though there may be more depending on your environment). I would do something like



and then set up your virtual hosts as shown in the link I provided before. Then, you'll go to http://try01:8080 or http://try02:8080.

If you're on a Unix derivative the file you want is /etc/hosts.


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

Joined: Apr 22, 2012
Posts: 17424
OK, thx....i�ll try this tomorow and give a feedback.

mfg JunkzTheGoblin
[originally posted on jforum.net by JunkzTheGoblin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

i edit the hosts file in my testsystem, entered the necessary lines for my forums. I changed the server.xml and the jboss-web.xml like in the wiki
tutorial described, but now i can�t access my forums anymore. I restarted my
system in order to catch the new settings in the hosts file, tried a few possibilities in my jboss configuration files but it won�t work for me..:/

The other problem is that we want to setup a lot of jforums on our servers, hmm...so about 40 deploys of them in summary (or more).. and the vhosts solution isn�t prakticable for our needs.

I use the JBoss as App. Server and in front of them there is working an Apache2 webserver which does the loadbalancing for us atm.
So I hope I can get in contact with on of the coders from that forum or someone else that can give me a tip why and how the forum set�s some variable after it start�s up which forces the browser always to choose the last activated one.

mfg JunkzTheGoblin
[originally posted on jforum.net by JunkzTheGoblin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi dear community,

At last, I hope so i�ve encircled my problem again and i can say that this is not a problem with JForum i think.
There is a serious problem with JBoss�s repository handling if you want to use more than only one forum at the same time. JBoss don�t differentiate which forum is authorized to access the datasource in the repository.

There is a way to setup repositorys for the different forums, but i�m not a developer and i do not know how to do this.

@stdunbar
i�ve followed your advices again, now it works, the vhosts, but the problem with the forums remained. I think because you use the tomcat webserver "only". This is another point that switched my focus onto JBoss for searching the problem.


thx for any help

mfg JunkzTheGoblin
[originally posted on jforum.net by JunkzTheGoblin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
YES...... :lol: it�s done.....i�ve found the reason....but it�s friday and i�m going home now....i�ll tell you later.


mfg JunkzTheGoblin
[originally posted on jforum.net by JunkzTheGoblin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi

First, edit the conf/jboss-service.xml file and set the NamingService CallByValue to true:

<mbean code="org.jboss.naming.NamingService" <br /> name="jboss:service=Naming">
<!-- The call by value mode. true if all lookups are unmarshalled using <br /> the caller's TCL, false if in VM lookups return the value by reference. <br /> -->
<attribute name="CallByValue">true</attribute>

...
</mbean>



Second, edit the deploy/ear-deployer.xml file and set the Isolated and CallByValue attributes to true:

<server>
<!-- EAR deployer, remove if you are not using ear deployments -->
<mbean code="org.jboss.deployment.EARDeployer" <br /> name="jboss.j2ee:service=EARDeployer">
<!-- A flag indicating if ear deployments should have their own scoped <br /> class loader to isolate their classes from other deployments. <br /> -->
<attribute name="Isolated">true</attribute>
<!-- A flag indicating if the ear components should have in VM call <br /> optimization disabled. <br /> -->
<attribute name="CallByValue">true</attribute>
</mbean>
</server>



Last, edit the deploy/jbossweb-tomcat50.sar/META-INF/jboss-service.xml file and set the Java2ClassLoadingCompliance and UseJBossWebLoader attributes to false:

<server>

<mbean code="org.jboss.web.tomcat.tc5.Tomcat5" <br /> name="jboss.web:service=WebServer">

<!-- Get the flag indicating if the normal Java2 parent first class <br /> loading model should be used over the servlet 2.3 web container first <br /> model. <br /> -->
<attribute name="Java2ClassLoadingCompliance">false</attribute>

<attribute name="LenientEjbLink">true</attribute>

<!-- A flag indicating if the JBoss Loader should be used. This loader <br /> uses a unified class loader as the class loader rather than the tomcat <br /> specific class loader. <br /> -->
<attribute name="UseJBossWebLoader">false</attribute>

...


then....you have to delete all the lib�s which where provided with jforum AND jboss, after that it should work. This works with jboss 4.0.1 and above.

mfg JunkzTheGoblin

[originally posted on jforum.net by JunkzTheGoblin]
 
 
subject: Problems with multiple JForum (2.1.6) installation�s on JBoss (4.0.1)