Hi , 

I have some issue and i hope you can help me . Here is the issue : 

I have developped a web service named TestAgent  which have to start some 
threads during  its exceution. In my client I have to start differents 
instances of the web services in a loop. The instances of the web services are 
different by there configuration files  but they have the same implementation.  
So instead of creating different instances of the web service TA , i decide to 
use the same Stub TestAgentTestAgentSOAP12Port_httpStub taStub in a for loop. 
So every instance of the web service is associated to one session . But after 
the execution of the loop for i only have one active session because the 
previous on is destroyed. I would like to avoid Axis2 to destroyed the previous 
session before instanciating another web services.  So can i do that maintain 
the previuos session   ?  
 // The  instance of the web service 
 TestAgentTestAgentSOAP12Port_httpStub taStub = new 
TestAgentTestAgentSOAP12Port_httpStub(URL + "TestAgent");
            
            // Set the timeout for 60 minutes (for large files)
            Options options = taStub._getServiceClient().getOptions();
            options.setTimeOutInMilliSeconds(600000); 
         
            TestAgentUtils taUtils = new TestAgentUtils(); 
            
           for (int i = 3; i >= 0; i--) {
                // get the appropriate test agent config based on its role
                int testAgentRole = i + 1;
                String testAgentConfigPath = 
taUtils.getConfigPath(testAgentRole);

                // get the oid
                String oid = taUtils.getOid(testAgentRole, testAgentConfigPath);

                // Start the test agent thru our WS with the conf
                Start swConf = new Start();
                swConf.setXmlConfig(Utils.getContents(new 
File(testAgentConfigPath))); 

                // at the start  taStub references a new instance of the web 
service TA and so a new session is created and destroyed the previous one. 
                taStub.start(swConf);  
            
                // do something 

          }
                
Please tell me if you understand what i mean. and please  tell me how to 
maintain the sessions and avoid every new instanciation to destroy the sessions 
of the previous instances of the web services. I use Axis2 version 1.2  and 
transportsession.   Thanks in advance            

 
-) Harold 

________________________________
Envoyé avec Yahoo! Mail.
Une boite mail plus intelligente. 


      
_____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

Reply via email to