Uploaded image for project: 'ServiceMix Components'
  1. ServiceMix Components
  2. SMXCOMP-606

ApplicationContext lifecycle in XBean Component/Endpoint causes invalid state of camel after shutdown+start

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • servicemix-camel-2009.01, servicemix-shared-2009.01
    • 2013.02
    • None

    Description

      When using XBeanServiceUnit and AbstractXBeanDeployer (which is the case for most smx components) applicationContext is created and started during deployment and closed (destroyed) during shutdown.
      However, endpoint beans are still referenced by jbi registry, and can be used after SU is started. This can be quite confusing for beans performing some kind of shutdown during context closing.

      Particularly, when using camel, after closing camel context some processors (e.g. DeadLetterChannel) throw exception when trying to process exchange.

      This could be fixed in two ways:

      • override defaults in camel component
      • fix it directly in servicemix-common (not sure if and how it would affect other components)

      I think that fix would have to involve refreshing/recreating applicationContext in start method of SU. However, this would have to swap endpoint instances in endpoint registry

      Attachments

        1. shared-libraries-pom-2009.01-servicemix-common.fix.patch
          2 kB
          Nikolay Martynov
        2. servicemix-common.debug.patch
          15 kB
          Nikolay Martynov

        Activity

          People

            Unassigned Unassigned
            mproch Maciej Prochniak
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: