How I can to initialize my any parameters at the application startup time ? I would like read these parameters from my text-file and put it to application scope (after application deploy process). I don`t understand how to bind my session bean method that to do it with startup application process.
Also I would like save my few entities into database, when user session is destroyed. I try to use class than implement HttpSessionListener and have sessionCreated and sessionDestroyed methods but it not possible to use invoke method of SessionBean than declarated with @Name annotation (i.e. which is seam-component). Seam-tutorial chapter 5 section 'Contextual events' have enumeration of contextual events. There is consist org.jboss.seam.preDestroyContext. but I can not find examples anywhere how it to use in source code or in xml-config files.
By the way, it is bad style in Seam to just throw Strings in the application context. Instead create an application-scope Seam component, for example, MyConfiguration, and configure its attributes using seam.properties and components.xml.