Is it possible to dynamically add/remove Blocks within a SAR? With Catalina Sevak, I
am attempting to use a BlockListener to assemble the different Blocks within the
application. What I would like to do is declare the Blocks within the assembly.xml
but be able to dynamically add services based upon Catalina's con/server.xml file.
For example say I have declared a block
<block name="Connector"
class="org.apache.avalon.apps.sevak.blocks.catalina.StandardConnectorWrapper">
<provide name="bootstrap" role="org.apache.avalon.apps.sevak.services.Bootstrap"/>
</block>
This describes the block and the block that fulfills its dependencies that I want.
However, if the CatalinaAssembler (BlockListener), parses the
${catalina.home}/conf/server.xml it may discover that two "Connector" Blocks are
needed. I would like to be able to deploy another Service instance into the
Application. Is this possible/desireable?