CmisSession.query immediately after createDocument operation does not find the documentSame query in CMIS workbench retrieves the resultSame query issued after few seconds retrievesIt appeared to be a CmisSession cache problemSo I changed my query issuing statement as below. Still does not seem to work…
OperationContext operationContext = cmisSession.createOperationContext();
operationContext.setCacheEnabled(false);
ItemIterable<QueryResult> results = cmisSession.query(cmisQuery, false, operationContext);
The same code after a few seconds retrieve the expected results and work…My initial session creation logic is…
Map<String, String> parameter = new HashMap<String, String>();
parameter.put(SessionParameter.USER, this.user);
parameter.put(SessionParameter.PASSWORD, this.password);
parameter.put(SessionParameter.ATOMPUB_URL, this.host);
parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
repositories = sessionFactory.getRepositories(parameter);
cmisRepository = repositories.get(0);
parameter.put(SessionParameter.REPOSITORY_ID, cmisRepository.getId());
cmisSession = sessionFactory.createSession(parameter);