From 7f9fc8c0365bc16f923223cc603bbfd0765b7506 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Tue, 18 Jul 2006 15:00:47 +0000 Subject: [PATCH] Merged V1.3 to HEAD (3005:3013) svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3005 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3013 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3336 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../axis/SpringBeanRPCProvider.java | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/source/java/org/alfresco/repo/webservice/axis/SpringBeanRPCProvider.java b/source/java/org/alfresco/repo/webservice/axis/SpringBeanRPCProvider.java index 35ec3c4d73..891a9b117d 100644 --- a/source/java/org/alfresco/repo/webservice/axis/SpringBeanRPCProvider.java +++ b/source/java/org/alfresco/repo/webservice/axis/SpringBeanRPCProvider.java @@ -32,7 +32,7 @@ public class SpringBeanRPCProvider extends RPCProvider { private static final long serialVersionUID = 2173234269124176995L; private static final String OPTION_NAME = "springBean"; - private WebApplicationContext webAppCtx; + private static WebApplicationContext webAppCtx; /** * Retrieves the class of the bean represented by the given name @@ -93,16 +93,26 @@ public class SpringBeanRPCProvider extends RPCProvider */ private WebApplicationContext getWebAppContext(MessageContext msgCtx) throws AxisFault { - if (this.webAppCtx == null && msgCtx != null) + if (webAppCtx == null && msgCtx != null) { - this.webAppCtx = Utils.getSpringContext(msgCtx); + webAppCtx = Utils.getSpringContext(msgCtx); } - if (this.webAppCtx == null) + if (webAppCtx == null) { throw new AxisFault("Failed to retrieve the Spring web application context"); } - return this.webAppCtx; + return webAppCtx; + } + + @Override + public void initServiceDesc(SOAPService service, MessageContext msgContext) throws AxisFault + { + if( msgContext != null ) + { + getWebAppContext(msgContext); + } + super.initServiceDesc(service, msgContext); } }