Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deploying Multiple JSF war files on tomcat using V-Hosts is creating conflicts.

 
Akash Singla
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm facing a very strange problem.

I have multiple project war files created using JSF 1.2_14 and richfaces 3.3.2CR1 and deployed on a single tomcat instance using virtual hosts (each runs on ROOT of every V-Host).
All these war files share the same libraries through tomcat/lib directory.

However, the configuration files (web.xml and faces-config.xml) are unique for every war file.

One of the projects (abc) is using multi-language support (English, french, hindi).

Now, the problem is, When I change the language of abc project to, lets say, french, all other projects have the started using french in the JSF components. Eg: rich:calendar in a project XYZ has started showing octobre for October because abc was using French.

Is it because richfaces jar files are shared across war files.

Please help.

Akash.
Daedals
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18214
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to be very careful about putting jars in the tomcat lib directory. If the jar wasn't designed explicitly to be shared - and to support multi-threaded use - you can have all sorts of unpredictable problems.

To the best of my knowledge, the RichFaces jars are not designed to be sharable that way and should be part of each individual WAR.
 
Akash Singla
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this would have been the case, then, the this behavior should have been visible everytime I change the language. But it is not.
Its visible seldom but not always.

Also, when I work on the same application, different user sessions of same application don't share this error, ie, if I change my language to French, you would be able to log-in with the default language English.
When Language changes are not shared across the same application session, how can they be shared across multiple context sessions.

Akash
 
Ilari Moilanen
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It was your own idea that the problem lies there and now you try to prove that it does not
Why don't you just test the theory and put the applications on a test server or somewhere else and test if that is the cause of the problem or not?
 
Akash Singla
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually they are running on a production and a test server already.

What I am trying to convey is, if the language changes are not conflicting for the same app in different sessions, how is it possible that they are conflicting across different contexts.

Is there any setting of tomcat that does this kind of configuration sharing or is it something related to only richfaces JAR files or the problem is specific to JSF 1.2.

Has anyone faced similar issue.

I'll do some more research and definitely let you guys know.

Akash
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic