Hi Marnen. Thanks for your reply. Here is what I am trying to do...
We are trying to use mongrel as a job execution engine and use rails for the front end GUI. We intend to have an initial configuration screen where the administrator will populate various properties in form for use in determine how the various jobs will run. Whenever the 'system' (and system will consist of more than, but include, mongrel) is brought down for maintenance we want the admins to reexamine these properties so we want them 'forgotten' between maintenance windows. Scalability is not an issue here as only a handful of admins will use the tool, (thus no clustering will be involved) and I expect statics will work. In fact, when I moved the TransientData class to a file called library.pl in the lib directory and required it in the controller it did (finally) work. If the right approach is to use an active record, despite the lack of need for persistence, can one create an active record and declare it to be a singleton (i.e. never more than one row in the database)? Can one do the equivalent of a j2ee startup bean and have a mongrel run a job upon startup of the server so I could delete that singleton? The idea of being able to use an active record and have all of the validation goodies does appeal to me. Thanks, Cris Marnen Laibow-Koser wrote: > Cris Shupp wrote: >> I tried with statics > > (They're just called "class variables" in Ruby.) > >> and that did not work. It is as if rails >> completely unloads the controller between invocations. > > In development mode, it does. And in production, there's no guarantee > that you'll get the same server instance as last time, so you can't > really rely on class variables in the controller. You might be able to > rig up something in a model... > > But this smells funny. What exactly are you trying to do here? In most > cases, if data is worth saving, it's worth putting in the DB. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > [email protected] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

