Interesting question

This is a side issue but if you're serializing and deserializing DB objects 
make sure your DB objects are 'Transaction Aware'
http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Fcprs_best_practice.html

Axis Transport cleanup code is triggered on or off by 
org.apache.axis2.client.Options cleanupTransport attribute e.g.
options.setCallTransportCleanup(true);

the callTransportCleanup attribute is checked in 
org.apache.axis2.client.ServiceClient code by
 if (options.isCallTransportCleanup()) {
            cleanupTransport();
        }

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]
Subject: Axis2 Stub Creation
Date: Mon, 10 Sep 2012 12:12:45 +0000









I am using the axis 2 to communicate with the third party webservices. This 
webservice is going to be invoked in a timer for every 1 minute and the timer 
is going to run for several days. Now my question is whether we need to create 
the
 stub object everytime we make the webservice call or can we maintain the stub 
object in the class level variable (timer object) and use the same object all 
the time.
 
Will a axis fault exception make any changes to the stub. i mean do we need to 
create a new stub instance when a axis fault exception (like timout, server 
down) happens?
 
is the stub.cleanup alone is enough? or do we need to call the transport 
cleanup as well?
 
My code
 
Public void method() {
 
try {
  stub = new PartnerAPIStub(configurationContext, endPointRef);
 
   ... service call code
 
 }
 catch(Exception ex)
 {
      stub.cleanup();
     stub = new PartnerAPIStub(configurationContext, endPointRef);
 }
}
 
Thanks
Suresh
                                          

Reply via email to