org.chorem.pollen.ui
Class PollenApplicationListener
java.lang.Object
org.chorem.pollen.ui.PollenApplicationListener
- All Implemented Interfaces:
- EventListener, javax.servlet.ServletContextListener
public class PollenApplicationListener
- extends Object
- implements javax.servlet.ServletContextListener
To listen start or end of the application.
On start we will load the configuration and check connection to internal
database, creates schema and create an admin user in none found in database.
On stop, just release the application configuration.
- Since:
- 1.3
- Author:
- tchemit
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PollenApplicationListener
public PollenApplicationListener()
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce)
- Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
prepareConfiguration
protected PollenConfiguration prepareConfiguration()
- Prepare the configuration to be used.
Note: This method is here mainly to be able to
override configuration for tests environnements.
- Returns:
- the instanciated configuration
- Since:
- 1.4
- See Also:
PollenTestApplicationListener
initDB
protected void initDB(PollenApplicationContext applicationContext)
throws org.nuiton.topia.TopiaException
- Throws:
org.nuiton.topia.TopiaException
closeTransaction
protected void closeTransaction(org.nuiton.topia.TopiaContext tx)
throws org.nuiton.topia.TopiaException
- Try to close the given transaction.
- Parameters:
tx - the transaction to close
- Throws:
org.nuiton.topia.TopiaException - if could not close the transaction
Copyright © 2009-2012 CodeLutin. All Rights Reserved.