1 Reply Latest reply on Apr 2, 2011 7:50 PM by lvdberg

    Conditional component installation

    markwigmans

      I like to install a component conditionally. I prefer something that the component is installed when a definition appears in 'components.xml'. The components looks like:


      @Name("xService")
      @Scope(ScopeType.APPLICATION)
      public class XService {
      
      @Logger
      private static Log log;
      
      @Create
      public void create() {
      log.debug("create()");
      }  
      
      @Observer(value = TransactionService.EVENT_TRANSACTION_ADDED, create = false)
      public void event(Transaction transaction) {
      ...
      }



      The purpose of this component is to process the observed transaction in a particular configuration. So, how to create this component only in particular cases?