Hi Artur, > Thanks for the reply and mentioning Ehcache. As I understand it, I > load my global data into the ehcache's CacheManager Singleton and > can access it that way. But how can I init the cache on webapp > startup rather than when the first user connects to it? Is there a > global init method I can use?
You can create a RIFE participant that will initialize the cache at application startup, as for example used in Bla-bla List: http://rifers.org/fisheye/browse/rifers/blablalist/trunk/src/java/blablalist/participants/OSCacheParticipant.java?r=HEAD http://rifers.org/fisheye/browse/rifers/blablalist/trunk/src/rep/participants.xml?r=HEAD > And as for the temporary data, I thought continuations are used to > provide the user with the possibility to go back one page and have > the exact content of the last page, although it gets dynamically > created. In my case, I want to make sure, the user can't go back one > page. If he tries to go back one page, he should be redirected to > the current page. No, that's just one of the benefits. Continuations use the local variable scope to create state that is preserved on the server across requests, without you having to manually manage it. When the continuation tree is clear, either explicitly or through a time-out, the state is cleared also. The other advantage of continuations, is that you can native Java control statements to write the workflow of your web application instead of having to model this out into distinct actions/components. > Just to make it clear: I can store data in a servlet session, where > the temporal data would only be stored on the server-side while the > user only has identification data stored on his side and an > expiration/timeout can be set? Is that directly supported by rife or > is the use discouraged? It is supported, but you need to turn raw access on: http://rifers.org/docs/api/com/uwyn/rife/engine/ElementSupport.html#setProhibitRawAccess(boolean) or by overriding: http://rifers.org/docs/api/com/uwyn/rife/engine/ElementSupport.html#prohibitRawAccess() After that you can use: http://rifers.org/docs/api/com/uwyn/rife/engine/ElementSupport.html#getHttpServletRequest() and directly interact with the session. > Sorry for the newbie questions, but I tried to figure it out for > myself as much as I can and I am still a bit confused... No worries, this is what the list is for :-) Take care, Geert -- Geert Bevin Terracotta - http://www.terracotta.org Uwyn "Use what you need" - http://uwyn.com RIFE Java application framework - http://rifers.org Music and words - http://gbevin.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "rife-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rife-users?hl=en -~----------~----~----~----~------~----~------~--~---
