Hi,
But how mush is it the coordinator footprint? I mean, how much memory does it take? It sounds quite strange that only 120 coordinators can cause an out of memory. Isn't it?
Thanks,
Valerio

----- Original Message ----- From: "Dasarath Weeratunge" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, July 23, 2006 4:44 PM
Subject: Re: memory leakage?


Quoting sergio salvi <[EMAIL PROTECTED]>:

Each time you invoke service A, it creates a new transaction. This means a new coordinator gets created. Once created, a coordinator object is kept around until it timeouts (the default value is 180 s). This was done so to respond to
some late messages appropriately. We could certainly come up  with a more
efficient way to do this. Thus, if you create many activities within a short duration, even if activities end in succession, it may cause their coordinators
to get accumulated. It may be this that is causing the slow down.

thanks,
--dasarath


I've done a client which invokes a service A whinch in turn create a
transaction with 2 services, B and C.
  The client invokes 1000 times the service A.
  here is the code of the service A, the one who creates the transaction:

  public class CoordinatoreKandula {

    private Integer risultato;
    private Integer ris1;
    private Integer ris2;
    static Logger logger;
    static Logger logger2;

    /** Creates a new instance of CoordinatoreKandula */
    public CoordinatoreKandula() {
        risultato = null;
        ris1 = null;
        ris2 = null;
        logger2 = Logger.getLogger("Valerio");
        logger = Logger.getLogger("CoordinatoreKandula");
        PropertyConfigurator.configure("C:/Programmi/Apache Software
Foundation/Tomcat 5.5/webapps/axis/WEB-INF/classes/log4j.properties");
        logger2.info("creato CoordinatoreKandula");
    }
public int risolviEspressione(int tipo, int a, int b, int c, int d) {


TransactionManagerImpl wstm = TransactionManagerImpl.getInstance();

        String endpointSomma = new
String("http://localhost:8080/axis/services/ServizioSomma";);
        String endpointProdotto = new
String("http://localhost:8080/axis/services/ServizioProdotto";);

        //espressione tipo 1 ==> (a + b) * (c + d)
        if (tipo==1) {

            int risTipo1;

logger.info("Operazione richiesta : (" + a + " + " + b + ") * ("
+ c + " + " + d + ")");

            try {
                wstm.begin();
            }catch(RemoteException e) {
                logger.info("Errore nel begin ");
                e.printStackTrace();
            }

            Service service = new Service();
            Call call = null;

            try {
                call = (Call) service.createCall();
            }catch(javax.xml.rpc.ServiceException e) {
                logger.info("Errore nel creare oggetto call");
            }

            //call per (a + b)
            call.setTargetEndpointAddress(endpointSomma);
            call.setOperationName("somma");
            call.setUseSOAPAction(true);

call.setSOAPActionURI
("http://localhost:8080/axis/services/kandulaServizioSomma#somma";);

            call.addParameter( "op1", XMLType.XSD_INT, ParameterMode.IN);
            call.addParameter( "op2", XMLType.XSD_INT, ParameterMode.IN);
            call.setReturnType( XMLType.XSD_INT );
              Integer op1 = new Integer(a);
            Integer op2 = new Integer(b);


            try {
                 ris1 = (Integer) call.invoke( new Object [] {op1,op2});
            }catch(java.rmi.RemoteException e) {
System.err.println("catch CoordinatoreKandulaInvoke1-> " +
e);
                 e.printStackTrace();
            }

            //call2 per (c+d)
            Call call2 = null;

            try {
                call2 = (Call) service.createCall();
            }catch(javax.xml.rpc.ServiceException e) {
                logger.info("Errore nel creare oggetto call2");
            }

            call2.setTargetEndpointAddress(endpointSomma);
            call2.setOperationName("somma");
            call2.setUseSOAPAction(true);

call2.setSOAPActionURI
("http://localhost:8080/axis/services/kandulaServizioSomma#somma";);

call2.addParameter( "op3", XMLType.XSD_INT, ParameterMode.IN); call2.addParameter( "op4", XMLType.XSD_INT, ParameterMode.IN);
            call2.setReturnType( XMLType.XSD_INT );
              Integer op3 = new Integer(c);
            Integer op4 = new Integer(d);

            try {
                 ris2 = (Integer) call2.invoke( new Object [] {op3,op4});

            }catch(java.rmi.RemoteException e) {
System.err.println("catch CoordinatoreKandulaInvoke2-> " +
e);
                 e.printStackTrace();
            }

            //call3 per (a + b) * (c + d)
            Call call3 = null;

            try {
                call3 = (Call) service.createCall();
            }catch(javax.xml.rpc.ServiceException e) {
                logger.info("Errore nel creare oggetto call3");
            }

            call3.setTargetEndpointAddress(endpointProdotto);
            call3.setOperationName("prodotto");
            call3.setUseSOAPAction(true);

call3.setSOAPActionURI
("http://localhost:8080/axis/services/kandulaServizioProdotto#prodotto";);

call3.addParameter( "ris1", XMLType.XSD_INT, ParameterMode.IN); call3.addParameter( "ris2", XMLType.XSD_INT, ParameterMode.IN);
            call3.setReturnType( XMLType.XSD_INT );
              try {
                 risultato = (Integer) call3.invoke( new Object []
{ris1,ris2});

            }catch(java.rmi.RemoteException e) {
System.err.println("catch CoordinatoreKandulaInvoke3-> " +
e);
                 e.printStackTrace();
            }


            try {
                wstm.commit();

            }catch(RemoteException e) {
                logger.info("Errore nel commit ");
                e.printStackTrace();
            }

logger.info("(" + a + " + " + b + ") * (" + c + " + " + d + ") =
" + risultato.intValue());
        }

        else logger.info("input sbagliato");

        return risultato.intValue();
    }
}


Dasarath Weeratunge <[EMAIL PROTECTED]> ha scritto:
  Quoting sergio salvi :

are you creating a new transaction each time? if you could please post your
client code so that we can get a better idea about what your client is
doing.

thanks,
--dasarath




 Chiacchiera con i tuoi amici in tempo reale!
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to