cancel
Showing results for 
Search instead for 
Did you mean: 

Too much time versioning data in Alfresco 3.4d

danielo
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to update a file of 2Mb in Alfresco 3.4d and it takes over 4 minutes. I´m using the embedded mysql and the libraries i'm using are:

alfresco-web-service-client-3.4.d.jar
alfresco-repository-3.4.d.jar
axis-1.4.jar

My code is as follows and the last line of code is the one that gets blocked.

private void createStore(final String sPathTemp, final String sName,
         final String sDescripcion) throws Exception {
      // Creamos la referencia del nodo padre, donde se añadirá el contenido
      // En este caso el nodo padre es company_home
      final ParentReference prHomeParent = new ParentReference(sStore, null,
            sPathTemp, Constants.ASSOC_CONTAINS, null);
      
      // Asignamos un nombre para el nodo que vamos a crea en company_home
      prHomeParent.setChildName("cm:" + sName);
      
      // Comienza la construcción de nodo
      NamedValue[] nmContentProps = new NamedValue[1];
      nmContentProps[0] = Utils.createNamedValue(Constants.PROP_NAME, sName);
      final CMLCreate create = new CMLCreate("1", prHomeParent, null, null,
            null, Constants.TYPE_FOLDER, nmContentProps);
      
      // Añadimos aspectos al nodo
      NamedValue[] nmTitledProps = new NamedValue[2];
      nmTitledProps[0] = Utils.createNamedValue(Constants.PROP_TITLE, sName);
      nmTitledProps[1] = Utils.createNamedValue(Constants.PROP_DESCRIPTION,
            sDescripcion);
      final CMLAddAspect addAspect = new CMLAddAspect(
            Constants.ASPECT_TITLED, nmTitledProps, null, "1");
      
      // Contruimos CML Block, con el nodo y sus aspectos
      final CML cCml = new CML();
      cCml.setCreate(new CMLCreate[] { create });
      cCml.setAddAspect(new CMLAddAspect[] { addAspect });
      
      // Creamos y recuperamos el contenido vía Repository Web Service
      WebServiceFactory.getRepositoryService().update(cCml);
   }



Thanks in advance,

Daniel
3 REPLIES 3

danielo
Champ in-the-making
Champ in-the-making
It seems to be that Alfresco is slow noticing that there is a duplicate node child. It´s even slow by versioning on the browser interface.

Any thougths?

openpj
Elite Collaborator
Elite Collaborator
To avoid the duplicateChildNode exception, before uploading the file try to search a file with the same name, and only if this file doesn't exist then you can execute the upload, otherwise not.

Hope this helps.

danielo
Champ in-the-making
Champ in-the-making
Thanks, it worked!

My strategy was trying to add content and handle the duplicate node exception in order to version the content.
In the previous version of Alfresco, 3.3, threre were no problem.

Thanks again!