Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: future
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Need to have a flexible mechanism for creating Application objects.
To do this we can have an interface to build the Application that accepts a map of key-value pairs.
The key-value pairs would be specific to each different container type. To help work with Loom container we could create a LoomConfig that had a simple facade to set key-values.
A sample run
LoomConfig config = new LoomConfig();
config.setAssembly( "resource://ldapd/server/assembly.xml" );
config.setConfig( "resource://ldapd/server/config.xml" );
config.set...;
Map map = config.toMap();
Application container = (Application)ContainerFactory.create( map );
...application running...
MyBlock block = (MyBlock)container.getBlock( someName );
block.doMagic();
...application running...
ContainerFactory.destroy( container );