Hello Harold,
I'm using the JackRabbit / JCR API to get access to the Magnolia
repository to stay independent from Magnolia. So I connect to the
repository and add data like this:
Repository repository = new TransientRepository(JCR_CONFIG_FILE_PATH,
JCR_REPOSITORY_HOME);
Session session = repository.login(new SimpleCredentials(JCR_LOGIN,
JCR_PASSWORD.toCharArray()), JCR_WORKSPACE_NAME);
Node child = session.getRootNode().addNode("someNode").;
child.setProperty("title", "sometext");
session.save();
session.logout();
The child node is added and saved. But Magnolia does not detect the
changes and recognizes manipulated nodes only after a restart.
Magnolia's repository descriptor states observation to be allowed,
which implies that Magnolia uses observation. Perhaps I miss an
application specific detail. Any help is highly appreciated.
Regards,
Wan-Hi Joh
2007/8/16, Capitaine Harold <[email protected]>:
> Hi,
>
> When you add a node are you using this kind of method:
>
> HierarchyManager hm = ContentRepository.getHierarchyManager();
> Content parentNode = hm.getNode("the/path");
> parentNode.createNode(needed_args);
> parentNode.save(); //don't forget to save the parent, I think that is
> the reason why you don't see the node.
>
>
> If you're not using this method can you describe steps by steps what
> you're doing.
>
> HTH
>
> CAPITAINE Harold
>
> Wan-Hi Joh a écrit :
> > Hello everyone,
> >
> > I'd like to know how to make Magnolia detect content changed on
> > repository level.
> >
> > Scenario: I use Magnolia 3.0.2 (Bundle) with mySQL as the backing
> > store. My goal is to add valid JCR nodes to the "website" repository,
> > while Magnolia detects these changes during runtime. I successfully
> > connect to the repository (author instance) using JackRabbit/JCR, and
> > add / persist a node to an existing one, but I still must restart
> > Magnolia to see the added node listed in the AdminInterface. This is
> > quite irritating because
> > Boolean.parseBoolean(repository.getDescriptor(Repository.OPTION_OBSERVATION_SUPPORTED))
> > returns true. info.magnolia.module.admininterface.Engine also adds
> > some EventListeners to the ObservationManager.
> >
> > What do I miss?
> >
> > Regards,
> >
> > Wan-Hi Joh
> >
> > P.S: Sorry for double posting. It was a long day.
> >
> > ----------------------------------------------------------------
> > for list details see
> > http://documentation.magnolia.info/docs/en/editor/stayupdated.html
> > ----------------------------------------------------------------
> >
>
>
>
> ----------------------------------------------------------------
> for list details see
> http://documentation.magnolia.info/docs/en/editor/stayupdated.html
> ----------------------------------------------------------------
>
--
netzprofis GmbH & Co. KG
Joseph-von-Fraunhofer-Str. 29
44227 Dortmund
Fon: +49-231-399802-70
Fax: +49-231-399802-69
USt-IdNr. DE225365236 Amtsgericht Dortmund HRA 16304, Komplementärin:
Gleis & Louis Verwaltungsges. mbH Amtsgericht Dortmund HRB 20179,
Geschäftsführer: Marcel Gleis & Thomas Louis
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------