Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5231

Cannot deploy multiple spring service axis2 archives within a single axis2 instance

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.1
    • 1.7.0
    • None
    • None

    Description

      Current issue with adding multiple spring service is that when we add a second service, the first one does not work or rather the deployment of the second service breaks the first. This is because of the static nature of spring ApplicationContext variable in ApplicationContextHolder class. Current way of initializing spring framework for a service via a service class which implements the ServiceLifeCycle interface. In this method only, the spring application context is created with the applicationContext.xml file. The beans defined in the context file will be defined in this context and the context will be set to the static ApplicationContext variable of the ApplicationContextHolder class. When a second service deployed the same operations mentioned above will happen and finally the spring ApplicationContext of the first service will get replaced by the second service's ApplicationContext. So if you invoke the second service it works, but when invoking the first service, it gives an error as no defined beans are found.

      Attachments

        1. deploy_multiple_spring_services_V2.patch
          11 kB
          Kishanthan Thangarajah
        2. deploy_multiple_spring_services.patch
          8 kB
          Kishanthan Thangarajah

        Activity

          People

            kishanthan Kishanthan Thangarajah
            kishanthan Kishanthan Thangarajah
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: