AnsweredAssumed Answered

Add 1 million of documents in the same store

Question asked by lmoulin on Feb 6, 2008
Latest reply on Feb 7, 2008 by lmoulin
Hello,
I use the following method to add new documents in the base:

RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();       
           
// Create the CML structure
// When executed this cml update query will create a new content node beneth the tutorial folder and the add the
// versionable aspect to the newly created node
ParentReference parentReference = new ParentReference(STORE, null, "/app:company_home/cm:sample_folder", Constants.ASSOC_CONTAINS, Constants.ASSOC_CONTAINS);           
NamedValue[] properties = new NamedValue[]{Utils.createNamedValue(Constants.PROP_NAME, System.currentTimeMillis() + "_WebServiceSample4.txt")};
CMLCreate create = new CMLCreate("id1", parentReference, null, null, null, Constants.TYPE_CONTENT, properties);       
CMLAddAspect addAspect = new CMLAddAspect(Constants.ASPECT_VERSIONABLE, null, null, "id1");
CML cml = new CML();
cml.setCreate(new CMLCreate[]{create});
cml.setAddAspect(new CMLAddAspect[]{addAspect});

// Execute the update
UpdateResult[] updateResults = repositoryService.update(cml);

The source is in alfresco-community-sdk-2.1.0\samples\WebServiceSamples\source\org\alfresco\sample\webservice

But I want to add 1 000 000 documents in the same store.
But the previous is very slow.
It is possible to add documents quickly?
It is possible to not check the folder ACL?

Thanks a lot for your response.
Luc

Outcomes