config.setContainerConfiguration( containerConfig );
config.setLoggerManagerConfiguration( loggerConfig );
config.setInstrumentManagerConfiguration( instrumentConfig );
// Get the root container initialized
ContainerManager cm = new DefaultContainerManager( config.getContext() );
ContainerUtil.initialize( cm );
/* Special containers such as Swing applications run in a different
* thread in the background. This is only one method of handling
* a Swing based container. Another alternative is to have the root
* JFrame/JWindow/JDialog at this level, and hand a reference of the
* container or its ServiceManager to the Swing class. That will allow
* you to defer proper shutdown of Fortress resources when your
* application is closed.
*/
( (SwingContainer)cm.getContainer() ).run();
// Properly clean up when we are done
ContainerUtil.dispose( cm );
}