|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
UUID GenerationI know this has been addressed before, but my searches have been fruitless.
I need to pass my own UUIDs instead of the ones JCR creates internally. Is there any way to do this? |
|
|
Re: UUID GenerationMarc Schriftman wrote:
>I know this has been addressed before, but my searches have been fruitless. >I need to pass my own UUIDs instead of the ones JCR creates internally. Is >there any way to do this? > > I would guess you cannot (whereas I don't know), but I guess you could always add them as some specific property and make this property searchable (whereas the performance might be not so good with large amount of nodes) Cheers Michael -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@..., michi@... +41 44 272 91 61 |
|
|
Re: UUID GenerationHi,
> I need to pass my own UUIDs instead of the ones JCR creates internally. Could you explain why you need to do that? > Is there any way to do this? You could use Session.importXML or Workspace.importXML using ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING. Regards, Thomas |
|
|
Re: UUID GenerationThanks for the reply Thomas. The reason I need to do this is that I've written and configured an S3-based FileSystem that suits our needs but isn't terribly fast. I implemented asynchronous uploads to alleviate the pain to the user, but had to write an awkward local-guid-to-remote-guid mapping mechanism in order to return to the user a durable, canonical URI he (and the system) can use to reference the file once it's been uploaded. The mapping mechanism is trivial in concept but ends up being another potential point of failure I'd rather forego. I realize I could stick the local URI in a custom property and give the user a query string to use - as another helpful forum member advised - but that felt less elegant and perhaps slower when it seems like there's no real reason that GUIDs can't be controlled by the client. Also - being aggresively RESTful here - we put a lot of weight on the concept of the canonical URI. Regards, Marc Schriftman BSG Alliance |
|
|
Re: UUID Generationschrifty <schrifty@...> wrote: Thomas Mueller-6 wrote: > > Hi, > >> I need to pass my own UUIDs instead of the ones JCR creates internally. > > Could you explain why you need to do that? > >> Is there any way to do this? > > You could use Session.importXML or Workspace.importXML using > ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING. > > Regards, > Thomas > > Thanks for the reply Thomas. The reason I need to do this is that I've written and configured an S3-based FileSystem that suits our needs but isn't terribly fast. I implemented asynchronous uploads to alleviate the pain to the user, but had to write an awkward local-guid-to-remote-guid mapping mechanism in order to return to the user a durable, canonical URI he (and the system) can use to reference the file once it's been uploaded. The mapping mechanism is trivial in concept but ends up being another potential point of failure I'd rather forego. I realize I could stick the local URI in a custom property and give the user a query string to use - as another helpful forum member advised - but that felt less elegant and perhaps slower when it seems like there's no real reason that GUIDs can't be controlled by the client. Also - being aggresively RESTful here - we put a lot of weight on the concept of the canonical URI. Regards, Marc Schriftman BSG Alliance -- View this message in context: http://www.nabble.com/UUID-Generation-tp16391941p16396280.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com. Ransford Segu-Baffoe paksegu@... https://serenade.dev.java.net/ http://www.noqturnalmediasystems.com/ --------------------------------- OMG, Sweet deal for Yahoo! users/friends: Get A Month of Blockbuster Total Access, No Cost. W00t |
|
|
Re: UUID GenerationHi,
> I've written and configured an S3-based FileSystem Do you mean FileSystem, or PersistenceManager? > I implemented asynchronous uploads to alleviate the pain to > the user I'm not sure what you mean with asynchronous upload... Is the data uploaded as a background process, and the method returns before data is stored? > local-guid-to-remote-guid mapping mechanism I don't understand, can you explain why you need this mapping? Why can't you just use the UUID generated by Jackrabbit? As far as I understand S3, you can name your objects as you want, and don't need to use the named that S3 gave you? But I may be wrong... Regards, Thomas |
| Free embeddable forum powered by Nabble | Forum Help |