Вопрос

In a clustered environment where multiple tomcat is running under a Load Balancer, we encountered an issue which we assumed could be a velocity engine which needs some kind of configuration as the environment moved from simple node to clustered.

This is how it is encountered to me and can be reproduced if I follow the following steps. The steps are; for instance, in an development environment of clustering a developer has two different (virtual) servers and each server tomcat communicating with the other sending serialized sessions and the other one de-serialized on it's end. This way both server having same session if one is down (or not responded) the other server will take care of the request. The users session sustain and any kind of server failure don't cause user to annoy.

Suppose while browsing the application in the browser you are being observer the 'catalina.out' log of each server. There will be a server which will be getting all your requests served and the other one is just sync the session (in standby). You killed the tomcat of the server where all your requests being served and now it the standby server is ready to server you. You browse through a to a page where you can search records initially the page is showing empty. Once, you hit the search you see 3 records but every row column first column has something weird:

Names                                      |  Last Logged in Time
_________________________________________________________________________________
 #dotPaddingWithoutTitle(Amir Ali, 60)     |  10/11/2012 6:00 PM
 #dotPaddingWithoutTitle(Saif Uddin, 60)   |  10/11/2012 6:00 PM
 #dotPaddingWithoutTitle(Reemsha Ayaz, 60) |  10/11/2012 6:00 PM

#dotPaddingWithoutTitle is a velocity macro; seems it is unable to render it in such scenario but I couldn't understand why the whole view (header, footer, navigation, toolbar etc.) are able to rendered but not this.

If you have any idea about it please help on this. Thanks.

Это было полезно?

Решение

*try to upgrade velocity framework (velocity-1.7), i hope it will solve your problem... more details can be found here *

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top