[MAGNOLIA-228] Running more than one instance in a single tomcat does not work because of static variables and functions Created: 30/Nov/04 Updated: 20/Dec/04 Resolved: 20/Dec/04 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 2.0 Final |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Ralf Hirning | Assignee: | Sameer Charles |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Installation of more than one instance as services in one tomcat server |
||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
Running more than one instance in a single tomcat does not work because of static variables. All services run in the same JVM and therefore they share the same static variables. At least the following variables and functions produce problems or deliver unpredictable results:
You will have to change depending (static) methods as well. You should also check the logging. |
| Comments |
| Comment by Boris Kraft [ 01/Dec/04 ] |
|
Static vars are evil, lets get rid of them before they get rid of us |
| Comment by Fabrizio Giustina [ 01/Dec/04 ] |
|
If you deploy the magnolia/jcr jars in WEB-INF/lib each webapp will have its own classloader and static variables will not be shared. |
| Comment by Ortwin Glueck [ 01/Dec/04 ] |
|
If I remember correctly the configuration works basically by putting everything into System properties. This is a shared resource across the JVM and poses a problem when running multiple instances on the same Appserver. |
| Comment by Ralf Hirning [ 01/Dec/04 ] |
|
I tried again to setup both author and public instance on a single tomcat - and it works. I put my configuration and configuration files to the wiki for reference Ralf |
| Comment by Sameer Charles [ 17/Dec/04 ] |
|
I do not agree with that, sure we should move to singleton classes - is that what you meant? |