OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | exoplatform List | July 2007 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [exoplatform] write files in JCR


Hi

In my portlet, I tryed something like the following sample code in order to create a new directory,
It seems to work but then this new directory doesn't appear in the ECM file explorer unless I restart my tomcat.


PortalContainer container = PortalContainer.getInstance();
RepositoryService repositoryService = (RepositoryService) container.getComponentInstanceOfType(RepositoryService.class);


Session jcrSession = null;
try {
jcrSession = repositoryService.getRepository().getSystemSession("production");
} catch (RepositoryException e) {
e.printStackTrace();
} catch (RepositoryConfigurationException e) {
e.printStackTrace();
}
Node root = null;
try {
root = jcrSession.getRootNode();
NodeIterator lNodes = root.getNodes();
//test :
root.addNode("test",NT_UNSTRUCTURED);
jcrSession.save();
}
catch ......


I think , something is missing like a broadcast event ..

How can I manage this?

thanks







<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.