-
1. Re: User Hit count in a jboss Application
jaikiran Dec 8, 2011 3:25 AM (in response to its_me)You could add a request filter in your application which tracks the count.
-
2. Re: User Hit count in a jboss Application
its_me Dec 8, 2011 3:30 AM (in response to jaikiran)Hello Jaikiran,
I am not sure about request filter... Will it also hold good after the server is restarted?
Regards,
Nid................
-
3. Re: User Hit count in a jboss Application
rhusar Dec 8, 2011 6:58 AM (in response to its_me)Hi Its,
Jaikiran is right. The request filter is a way to get in front of every request to avoid adding the counter manually on every page.
The implementation of the filter is up to you. Ideally it would persist the number of views in a database (or something more performant).
Rado
-
4. Re: User Hit count in a jboss Application
its_me Dec 8, 2011 9:50 PM (in response to rhusar)Hello Rado,
We do understand the options of request filter/ adding a database column/ having the count in a property file. Is there a way that jboss does save the value for us in a file on server so that we dont need to separately maintain it? A simple server setting from the admin page or anything closer.... I might be totally wrong, but I just want to find out that there is no such setting on the server, before we look into some other option, which can maintain the user count systematically, even after server restart.
Regards,
Nid.................
-
5. Re: User Hit count in a jboss Application
lfryc Dec 9, 2011 6:48 AM (in response to its_me)Hi Its,
I don't think there should even be any request counter build-in into AS,
since the implementation hardly depends on whatever parameters you would like to measure.
The counter may be derived from URL hit, it can take URL parameters into consideration, it may need to retrieve information from client which are not part of request header, etc.
Even if it would make sense to implement such solution in web frameworks (like the layer which knows the meaning of user requests),
there are specialized projects which solves that and it depends on analysis of requirements what solution to choose.
-
6. Re: User Hit count in a jboss Application
rhusar Dec 9, 2011 1:18 PM (in response to lfryc)BTW here is an answer I wrote before asking Lukas for the insight on the Richfaces side:
Hi again,
ok so that point is done :-) Regarding storing and persistence database is an option but in my perception it is just too slow. Is this clustered env or single node? The best option is to store it in a cache wich persists the state to disk. In EAP 5 it used to be http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5/html/JBoss_Cache_Frequently_Asked_Questions/cacheloaders.html#id2646387 and for AS6 you would want infinispans cache store http://www.mastertheboss.com/jboss-application-server/249-infinispan-tutorial-part-2.html
Rado