axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kishanthan Thangarajah (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5231) Cannot deploy multiple spring service axis2 archives within a single axis2 instance
Date Fri, 13 Jan 2012 06:55:39 GMT

    [ 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


Mime
View raw message