You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Kishanthan Thangarajah (Created) (JIRA)" <ji...@apache.org> on 2012/01/12 07:13:41 UTC

[jira] [Created] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

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

                 Key: AXIS2-5231
                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
             Project: Axis2
          Issue Type: Bug
    Affects Versions: 1.6.1
            Reporter: Kishanthan Thangarajah
             Fix For: 1.7.0


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Kishanthan Thangarajah (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185460#comment-13185460 ] 

Kishanthan Thangarajah commented on AXIS2-5231:
-----------------------------------------------

HI Sagara,
Thanks for your feedback. I have included those suggestions in the new patch(V2). Now the parameter is made optional. Users can either put the context file in the META-INF directory as <service-name>-application-context.xml or they can include it in the services.xml file as "SpringContextLocation" parameter. The method will try to load the context file from the correct option. Also if the parameter is set as common parameter for axis service group, the method will include the context to the service group so that all services in the group can share it. 

Thanks,
Kishanthan
                
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch, deploy_multiple_spring_services_V2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Kishanthan Thangarajah (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kishanthan Thangarajah updated AXIS2-5231:
------------------------------------------

    Attachment: deploy_multiple_spring_services_V2.patch
    
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch, deploy_multiple_spring_services_V2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Sagara Gunathunga (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13184919#comment-13184919 ] 

Sagara Gunathunga  commented on AXIS2-5231:
-------------------------------------------

I think in above scenario use of ApplicationContextHolder is incorrect as you identified having a ApplicationContext per service is the correct way to do this. Your approach seems OK to me but it would be great if you can address following improvements as well.

1.) Above patch provides service level isolation for ApplicationContext but what if someone want to share a ApplicationContext per service group ( i.e - setting proposed parameter under <serviceGroup> instead of  under <service>) IMO to address this you have to use AxisServiceGroup  too.

2.) In proposed approach it is required to have SPRING_APPLICATION_CONTEXT_LOCATION parameter in addition to ServiceObjectSupplier parameter. I think it's possible to make SPRING_APPLICATION_CONTEXT_LOCATION parameter optional as follows.

  If the SPRING_APPLICATION_CONTEXT_LOCATION not percent it 's possible to assume ApplicationContext file available on "META-INF/<service-name>-application-context.xml". This will improve the usability and most of Spring based framework provide such  features.

Other than that I think it's useful to keep ApplicationContextHolder because it address some other use cases. As an example when Axis2 use as a web application (WAR) this can be useful. Sometimes ago I have mentioned one such use case here http://ssagara.blogspot.com/2009/05/acegi-spring-security-and-rampart.html.  

  
                
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Kishanthan Thangarajah (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185553#comment-13185553 ] 

Kishanthan Thangarajah commented on AXIS2-5231:
-----------------------------------------------

Hi Sagara,
Sure, in fact i also thought of putting this improvement in a blog post. Will update this after completing the post with some samples to demonstrate.

Thanks for applying the patch.
Kishanthan.
                
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch, deploy_multiple_spring_services_V2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Resolved] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Sagara Gunathunga (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sagara Gunathunga  resolved AXIS2-5231.
---------------------------------------

    Resolution: Fixed
    
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch, deploy_multiple_spring_services_V2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Kishanthan Thangarajah (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kishanthan Thangarajah updated AXIS2-5231:
------------------------------------------

    Attachment: deploy_multiple_spring_services_V2.patch
    
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch, deploy_multiple_spring_services_V2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Assigned] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Sagara Gunathunga (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sagara Gunathunga  reassigned AXIS2-5231:
-----------------------------------------

    Assignee: Kishanthan Thangarajah
    
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>            Assignee: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch, deploy_multiple_spring_services_V2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Kishanthan Thangarajah (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kishanthan Thangarajah updated AXIS2-5231:
------------------------------------------

    Attachment: deploy_multiple_spring_services.patch
    
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Kishanthan Thangarajah (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13192994#comment-13192994 ] 

Kishanthan Thangarajah commented on AXIS2-5231:
-----------------------------------------------

Hi,
I have posted a blog post[1] based on the above recent improvements. Also included a sample.

Thanks,
[1] http://kishanthan.wordpress.com/2012/01/25/how-to-deploy-multiple-spring-service-axis2-archive-aar-within-a-single-axis2-instance/
                
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch, deploy_multiple_spring_services_V2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Kishanthan Thangarajah (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kishanthan Thangarajah updated AXIS2-5231:
------------------------------------------

    Attachment: deploy_multiple_spring_services.patch

With this patch, the users do not have to initialize spring by implementing ServiceLifeCycle class and running it on start-up. Spring context initialization is moved inside spring module. I have introduced a util class which will supply the applicationContext on when the service in invoked. This will also remove the need for the ApplicationContextHolder class.
                
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185692#comment-13185692 ] 

Hudson commented on AXIS2-5231:
-------------------------------

Integrated in Axis2 #1228 (See [https://builds.apache.org/job/Axis2/1228/])
    Modified test case according to AXIS2-5231 changes.

sagara : 
Files : 
* /axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java

                
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch, deploy_multiple_spring_services_V2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185572#comment-13185572 ] 

Hudson commented on AXIS2-5231:
-------------------------------

Integrated in Axis2 #1227 (See [https://builds.apache.org/job/Axis2/1227/])
    Applied patch for AXIS2-5231 with few changes.

sagara : 
Files : 
* /axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/receivers/SpringAppContextAwareObjectSupplier.java
* /axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/util
* /axis/axis2/java/core/trunk/modules/spring/src/org/apache/axis2/extensions/spring/util/ApplicationContextUtil.java

                
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch, deploy_multiple_spring_services_V2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Sagara Gunathunga (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185550#comment-13185550 ] 

Sagara Gunathunga  commented on AXIS2-5231:
-------------------------------------------

Applied patch in r1231009  with few changes. 

* Keep Spring version as it is. 
* Replaced one of deprecated method on XmlBeanDefinitionReader using correct method. 

Thanks for contribution and It would be great to have sample to demonstrate this improvement. May be a blog post.   
                
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch, deploy_multiple_spring_services_V2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Kishanthan Thangarajah (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kishanthan Thangarajah updated AXIS2-5231:
------------------------------------------

    Attachment:     (was: deploy_multiple_spring_services_V2.patch)
    
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch, deploy_multiple_spring_services_V2.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance

Posted by "Kishanthan Thangarajah (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kishanthan Thangarajah updated AXIS2-5231:
------------------------------------------

    Attachment:     (was: deploy_multiple_spring_services.patch)
    
> Cannot deploy multiple spring service axis2 archives within a single axis2 instance
> -----------------------------------------------------------------------------------
>
>                 Key: AXIS2-5231
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5231
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.1
>            Reporter: Kishanthan Thangarajah
>             Fix For: 1.7.0
>
>         Attachments: deploy_multiple_spring_services.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org