tilecache in servlet

View: New views
3 Messages — Rating Filter:   Alert me  

tilecache in servlet

by jai-interest-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a servlet which is used for creating tiles, and I would like to populate the tilecache on the first request, and then pull out the tiles on subsequent requests. The problem I seem to be having is that the RenderedImage parameter needed for pulling out a tile changes each time the source file is read. So if I use this:

RenderedImage renderedImage = javax.imageio.ImageIo.read(new File("foo.tiff"));

I can add tiles to the cache and retrieve them within the same servlet request. However, on the next time through, the renderedImage variable won't find a match in the cache. Is there a way of setting the owner of the tiles that persists across sessions or does this require a custom cache?

AWR
[Message sent by forum member 'awr' (awr)]

http://forums.java.net/jive/thread.jspa?messageID=285819

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


RE: tilecache in servlet

by Nidel, Mike :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

why don't you just cache the tiles by filename or something?

> -----Original Message-----
> From: jai-interest@...
> [mailto:jai-interest@...]
> Sent: Thursday, July 10, 2008 5:55 PM
> To: interest@...
> Subject: [JAI] tilecache in servlet
>
> I have a servlet which is used for creating tiles, and I
> would like to populate the tilecache on the first request,
> and then pull out the tiles on subsequent requests. The
> problem I seem to be having is that the RenderedImage
> parameter needed for pulling out a tile changes each time the
> source file is read. So if I use this:
>
> RenderedImage renderedImage = javax.imageio.ImageIo.read(new
> File("foo.tiff"));
>
> I can add tiles to the cache and retrieve them within the
> same servlet request. However, on the next time through, the
> renderedImage variable won't find a match in the cache. Is
> there a way of setting the owner of the tiles that persists
> across sessions or does this require a custom cache?
>
> AWR
> [Message sent by forum member 'awr' (awr)]
>
> http://forums.java.net/jive/thread.jspa?messageID=285819
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@...
> For additional commands, e-mail: interest-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: RE: tilecache in servlet

by jai-interest-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have gone ahead with a custom cache that uses a hashkey based on the file name, so yeah, I have bypassed this.
[Message sent by forum member 'awr' (awr)]

http://forums.java.net/jive/thread.jspa?messageID=286037

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...

LightInTheBox - Buy quality products at wholesale price