I think it would probably be better to cache it on a higher level. Every 
time you create a new WebMapServer, it contacts the server. If you are 
creating lots of WebMapServer objects that all represent the same 
server, then you are generating redundant calls to that server.

Re-using the same object will prevent this. And as far as I know, there 
are no downsides to doing it that way. (IE: The WebMapServer object does 
not retain much state - just the information about how it communicates 
with the server)

Cheers,

Richard

Michel Jonker wrote:
> 
> Hi Richard,
> 
> Thanks for your answer.
> Just to make sure that I understand you correctly:
>  It would be wisest to contruct a new WebMapServer in every service 
> method (servlet thread) and not to try to gain performance (caching it) 
> by making it available on a higher level (application context, instance 
> variable, static :-P  ..... ) ? Or would that come with a large penalty ?
> 
> Thanks again !
> 
> Michel Jonker
> 
> 
> 
> 
> *Richard Gould <[EMAIL PROTECTED]>*
> 
> 07/11/2006 09:51 PM
> 
>       
> To
>       Michel Jonker <[EMAIL PROTECTED]>
> cc
>       Jody Garnett <[EMAIL PROTECTED]>, 
> [email protected]
> Subject
>       Re: [Geotools-gt2-users] Question about multithreading, serverside use 
> of WMS client code
> 
> 
>       
> 
> 
> 
> 
> 
> Hi Michel,
> 
> I designed the WMS client so that the application using it can use its
> own method of threading, rather than having the module impose one
> itself. So the entire WMS module is single-threaded, but you should be
> able to use it in a multi-threaded context.
> 
> The important parts where it performs I/O are in the constructor, when
> it talks to the server initially, and during all of the issueRequest()
> methods. If you need to change some of this behaviour, please let me
> know and I will work with you to sort it out.
> 
> Cheers,
> 
> Richard
> 
> Jody Garnett wrote:
>  > Michel Jonker wrote:
>  >> Hello,
>  >>
>  >> I am new to this toolkit and I have design decission to make.
>  >>
>  >> I want to start of with this sample :
>  >> http://geotools.codehaus.org/Web+Map+Server+Tutorial
>  >>
>  >> And put this code in the service methode of a servlet/portlet and not
>  >> in a desktop client application.
>  > That is cool, you will find the WMS specification often used in server
>  > applications (for reporting) or in web applications
>  > such as MapBuilder.
>  >> We are trying to achieve a multi-tier solution where the WMS service
>  >> is being consumed by a Portal Server.
>  >>
>  >> Question: with servlets/portlet you introduce multithreading, are
>  >> there any limitations/pitfalls that I should be aware off if I want to
>  >> start using this component ?
>  > It is a straight up webservice, standard base so you can switch between  
>  > MapServer and GeoServer as needed (performance vs advanced styling)
>  >> Or should I have read more and is it actually designed for the
>  >> purposes that I have stated above ?
>  > I think you are set, you should be able to access a wide range of 
> content.
>  >
>  >
>  > Have fun,
>  > Jody
>  >
>  >
>  >
>  > -------------------------------------------------------------------------
>  > Using Tomcat but need to do more? Need to support web services, security?
>  > Get stuff done quickly with pre-integrated technology to make your 
> job easier
>  > Download IBM WebSphere Application Server v.1.0.1 based on Apache 
> Geronimo
>  > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>  > _______________________________________________
>  > Geotools-gt2-users mailing list
>  > [email protected]
>  > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 
> 
> 
> 
> De informatie in dit e-mailbericht (inclusief aanhangsels) is 
> vertrouwelijk en is alleen bestemd voor de beoogde ontvanger(s). Indien 
> u dit bericht onterecht heeft ontvangen, wordt u verzocht het bericht te 
> retourneren en de ontvangen informatie op geen enkele wijze te gebruiken.
> 
> The information contained in this e-mail (attachments included) may be 
> confidential and is intended solely for the person(s) indicated in the 
> message. Should you have received this e-mail unintentionally, please 
> return it to the sender and do not use the content of the message in any 
> way.



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to