Bugzilla – Bug 5885
Concurrency Problem: resource race condition
Last modified: 2008-03-13 16:41:37
You need to log in before you can comment on or make changes to this bug.
"createResource" is called for every invocation of the generated command line wrapper operation, this initializes the "resource" variable. Since "scope" is "Application" there is a single service instance serving all requests, thus multiple simultaneous client calls create a race condition. $ tail server-config.wsdd <service name="introduce/HelloWorld" provider="Handler" use="literal" style="document"> <parameter name="className" value="org.cagrid.introduce.helloworld.service.globus.HelloWorldProviderImpl" /> <wsdlFile>share/schema/HelloWorld/HelloWorld_service.wsdl</wsdlFile> <parameter name="securityDescriptor" value="etc/introduce_HelloWorld/HelloWorld-security-desc.xml" /> <parameter name="allowedMethods" value="*" /> <parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider" /> <parameter name="scope" value="Application" /> <parameter name="providers" value="GetRPProvider GetMRPProvider QueryRPProvider gov.nih.nci.cagrid.introduce.security.service.globus.ServiceSecurityProviderImpl" /> <parameter name="loadOnStartup" value="true" /> <parameter name="securityMetadata" value="etc/introduce_HelloWorld/HelloWorld-security-metadata.xml" /> </service> % % cat HelloWorldProviderImp.java /** * DO NOT EDIT: This class is autogenerated! * * This class implements each method in the portType of the service. Each method call represented * in the port type will be then mapped into the unwrapped implementation which the user provides * in the HelloWorldImpl class. This class handles the boxing and unboxing of each method call * so that it can be correclty mapped in the unboxed interface that the developer has designed and * has implemented. Authorization callbacks are automatically made for each method based * on each methods authorization requirements. * * @created by Introduce Toolkit version 1.1 * */ public class HelloWorldProviderImpl{ HelloWorldImpl impl; public HelloWorldProviderImpl() throws RemoteException { impl = new HelloWorldImpl(); } public org.cagrid.introduce.helloworld.stubs.LsGRAMResponse lsGRAM(org.cagrid.introduce.helloworld.stubs.LsGRAMRequest params) throws RemoteException { org.cagrid.introduce.helloworld.stubs.LsGRAMResponse boxedResult = new org.cagrid.introduce.helloworld.stubs.LsGRAMResponse(); boxedResult.setHelloWorldResultResourceReference(impl.lsGRAM(params.getArguments(),params.getInputFiles())); return boxedResult; } public org.cagrid.introduce.helloworld.stubs.LsResponse ls(org.cagrid.introduce.helloworld.stubs.LsRequest params) throws RemoteException { org.cagrid.introduce.helloworld.stubs.LsResponse boxedResult = new org.cagrid.introduce.helloworld.stubs.LsResponse(); boxedResult.setHelloWorldResultResourceReference(impl.ls(params.getArguments(),params.getInputFiles())); return boxedResult; } public org.cagrid.introduce.helloworld.stubs.LsBlockingResponse lsBlocking(org.cagrid.introduce.helloworld.stubs.LsBlockingRequest params) throws RemoteException { org.cagrid.introduce.helloworld.stubs.LsBlockingResponse boxedResult = new org.cagrid.introduce.helloworld.stubs.LsBlockingResponse(); boxedResult.setHelloWorldResultResourceReference(impl.lsBlocking(params.getArguments(),params.getInputFiles())); return boxedResult; } }
This has been fixed, however, some general concurrency issues still remain to be resolved. Also the GRAM method still has this problem since I haven't changed that from using instance data yet like "GRAMContact" etc.