4 Replies Latest reply on Mar 27, 2007 3:00 AM by Christian Bauer

    Intercepting component installation

    Christian Bauer Master

      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.