FirstRunStory

Description

In order to make the install of webical as simple as possible we need to make the war self containing. This means that everything except for the authentication realm (this is a container issue) and the database connection (needed to store the configuration) needs to be configured wizard style on first run.
Application settings:
  • resourcePaths - A list of paths to include when searching for additional resources (html/css/etc)
  • customPageTitle - The title to use on the pages
  • pluginPaths - A list of paths to look for plugin packages
  • pluginWorkPath - The location of a writeable directory to extract the plugin packages
  • pluginPackageExtension - The file extension used for the plugins
  • calendarRefreshTimeMs - The timeout between calendar refreshes

Technical interpretation

  • A hibernate mapping must be made for the ApplicationSettings
  • ApplicationSettingsDao? + manager
  • The webapplication must be altered so that the initialization of the plugin system is deferred until the configuration is complete
  • ApplicationSettingsFactory - easy access to the ApplicationSettings?
  • Beans that are to use the ApplicationSettingsFactory:
    • eventDaoWebDavHibernateBufferedImpl
    • pluginSystemInitializer
    • wicketApplication
    • customPageTitle
    • pluginCleanupApplicationListener
  • ApplicationSettingsConfigurationPage

Hours

task hours todo spend developer
Domain class + mapping 3 0 3 Ivo
Dao 3 0 3 Ivo
Manager 1 0 1 Ivo
ApplicationSettingsFactory? 3 0 3 Ivo
Change beans to ApplicationSettingsFactory? 6 0 6 Ivo
ApplicationSettingsConfigurationPage 4 4 4 Ivo
Total 20 4 20 0

Discussion

Issues:
  • Where to store the data? Is an applicationcontext writable somehow? Should we use jaxb to store the configuration in a application context file? Or is it possible to store the configuration in a database (this means that a SessionFactory has to be create manually the first time).
  • With the current spring configuration almost all of the configured beans depend on hibernate beeing configured already. if this configuration is not complete on the first run all those beans shouldn't be loaded yet.
  • How to initialize the rest of the beans once the configuration is complete? A restart? Or can the ApplicationContext load an additional file?
  • If a mistake is made in the configuration, should it be possible to startup the configuration somehow? or is this a matter of manually editing some file/deploying a fresh war?

-- IvoVanDongen - 21 Dec 2006

You could store the DB credentials in the applicationContext, and the rest of the configuration in the database? A redeploy would remove your config though ... how would and update go?

Can you force a reload of a context?

-- ZoranKovacevic - 22 Dec 2006

The database connection is configured in the context.xml as an jndi resource. If we leave that configuration intact we could store the application settings in the database. Restarting the webapplication will probably not be necessary. The Application can check the configuration. If it's not complete a screen is shown to set the configuration and otherwise the application is initialized.

-- IvoVanDongen

Topic revision: r7 - 11 Jan 2007 - 13:21:30 - IvoVanDongen
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback