Hello!
I have a weird problem or I have found a bug in Alfresco 5.0c.
I am currently testing some services in the backend and wrote my own service to overlay the others.
Therein I am using the FileFolderService. Example code of a function:
<blockcode>
…
TransactionService transactionService = (TransactionService) appContext.getBean("transactionService");
UserTransaction tx = null;
try {
FileInfo target_info = fileFolderService.getFileInfo(fileFolder);
try {
tx = transactionService.getUserTransaction();
tx.begin();
fileFolderService.rename(target_info.getNodeRef(), newName);
tx.commit();
} catch (Exception e) {
System.err.println(e.getMessage());
if (tx != null) {
try {
tx.rollback();
} catch (IllegalStateException e1) {
e1.printStackTrace();
} catch (SecurityException e2) {
e2.printStackTrace();
} catch (SystemException e3) {
e3.printStackTrace();
}
}
return false;
}
} catch (Exception ex) {
System.err.println("### ERROR - renameFile - Transaction");
System.err.println(ex.getMessage());
return false;
}
…
</blockcode>
It renames a file or a folder. It works, but Share does not update the name in the user interface immediatly (only after 1-5minutes).
If I change a name of a folder, Share interface orders the folder in the correct alphabetically order (uses the changed name), but displays the old folder name.
This happens also with others functions like write content into a file. Share displays the old content (even if I download the file), but if I read out the content in Java, I am getting the changed content of the file.
Refreshing/Clearing cache, dropping/renew session does not change anything. Even with a other browser.
Someone got an answer for that?