If it's during the same request, the first-level cache will ensure that you get the same identical instance when it's requested.
On Tue, May 27, 2008 at 1:16 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > your hibernate second level cache should take care of this double > loading problem... > > -igor > > On Tue, May 27, 2008 at 1:24 AM, Mathias P.W Nilsson > <[EMAIL PROTECTED]> wrote: >> >> Sorry! I forgot to respond to Igor and Michael Sparer >> >> Igor. >> I do not need the id. I just used for better url. And then I got the path >> from spring in the servlet and served the files from there. All files is in >> a table in my database called FileResources. If a entity has a file it has a >> relation to this table. Since I must know what image to load, I used id but >> have now switched to filepath wich is very ugly and long as you saw. There >> is no logick in the naming of a file. A jpg file mapped to an item can have >> a name like "2394123840238eriuqweirew.jpg" >> >> Michael. >> Yes. I have googled and created Filter, servlet to get the think you >> suggested to work but I'm not able to. I got the file by doing getRequestURI >> in the filter class but was not able to edit the uri. Is this the way of >> doing this? >> >> >> >> >> >> >> Mathias P.W Nilsson wrote: >>> >>> When trying this it does not work. I try to mount /Files/* for the servlet >>> and it doens not respond. >>> >>> What do you mean by mapping id? Should I have all image paths in memory. >>> Their will be approximately 100.000 images. >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Image-from-resource-outside-tomcat-container-tp17276444p17485422.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]