4 Replies Latest reply on Mar 27, 2007 3:00 AM by christian.bauer

    Intercepting component installation

    christian.bauer

      I'm writing some (configuration level) code that needs to know which Seam components are installed. It actually needs to know which Seam components also have a @my.Configuration("description") annotation.

      My current approach is to register these manually in components.xml:

      <component name="systemConfiguration" class="SystemConfiguration">
       <property name="configurableComponents">
       <key>fooComponent</key><value>description one</value>
       <key>barComponent</key><value>description one</value>
      ...
       </property>
      </component>
      


      Ideally I'd like to either listen to events send by the Seam deployer, or if that is way to early in the boot to get events/listeners going, I'd like to access the Seam component "repository" programmatically later on. I only found methods like Component.forName(), no Component.getAll().

      I'm also thinking about subclassing ComponentScanner as ConfigurationScanner and scanning again for my annotation, but that is probably slowing down the boot procedure.