I guess this then merits a JIRA feature request when done across JCR/SPI i/f.
Question in general regarding architectures. I understand that SPI is going through its growing pains, but what is the recommended model when I have a farm of application servers that want to use Jackrabbit? My thoughts were to use JCR Webdav/SPI to access a server running the Jackrabbit service from any of the app servers internally. If this is not yet mature enough, I will have to bundle jackrabbit with each app server sharing a single dB repository with the obvious risk of stepping on each other. Suggestions? ** julio -----Original Message----- From: Marcel Reutegger [mailto:[EMAIL PROTECTED] Sent: Friday, May 09, 2008 5:59 AM To: [email protected] Subject: Re: Can't get an excerpt when using JCR Webdav I/F Hi Julio, the rep:excerpt() function is jackrabbit-core specific and is not guaranteed to work across the more JCR generic SPI layer. regards marcel Julio Castillo wrote: > I have a client accessing a server running jackrabbit. > > I access the client via a custom client using the JCR 2 SPI interfaces. > > I have been successful at storing, retrieving, searching documents. > > I have not been able to get excerpts from the documents returned. I > modeled my logic after the search.jsp that ships with the jackrabbit war file. > > Below is an excerpt (no pun intended) of my code. > > while (rowIt.hasNext()) { > row = rowIt.nextRow(); > fileNode = > (Node)session.getItem(row.getValue("jcr:path").getString()); > rsrcNode = fileNode.getNode("jcr:content"); > if (rsrcNode.hasProperty("jcr:data")) > fileSize = rsrcNode.getProperty("jcr:data").getLength(); > lastModified = rsrcNode.getProperty("jcr:lastModified").getDate(); > System.out.println ( > "File:"+ fileNode.getName() + " [" + fileSize + "] " + > lastModified.getTime()); > > System.out.println(row.getValue("rep:excerpt(jcr:content)").getString()); > } > > While attempting to execute last getValue call I get the following error: > javax.jcr.RepositoryException: ':' not allowed in name > > If I just use getValue("rep:excerpt()") I get an xml output that > provides no value to me: <excerpt><fragment></fragment></excerpt> > > I think this is just different behavior between running this within > jackrabbit and remotely via JCR/SPI. > > Any ideas? > > Julio Castillo > Edgenuity Inc. > >
