On Mar 26, 2008, at 7:05 PM, shai200 wrote:
However, for some reason the program crashes when it initializes the
ApplicationContext:

ApplicationContext.setAppContext(sce);
where sce is a ServletContextEvent passed as a parameter to the
contextInitialized method.

You probably should provide more information. What 'crashes' mean? I presume that is not a BSOD you are getting :)


To keep a long story short, I'm trying to achieve the goal of storing
objects on the application level (and having them initialize when the web
server starts) by adhering to the standard Cocoon way (perhaps through
Spring? I'm not sure how that is done).

Through Spring, you'd create your java class, which does the pre- loading of data and storing that data in member variables. Usually you'd do this in initialization method. Next, you register this bean in spring's xml file, and that's it: Spring will load this bean on startup, initialize it, and it will preload all the data. After that, you can just lookup this bean in any place you need, and call its getter methods to retrieve preloaded information. That would be a 'spring' way.

Vadim

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to