My guess would be that they've done it for convenience. The current service context has most of the parameters needed by a service that the code is planning on calling but some of the parameters that aren't required need to be removed before the service can be called.
An example:
Service1 has paramA, paramB and paramC
Service1 needs to call Service2
Service2 needs paramB and paramC

So in order for Service1 to call Service2 you can just copy the context map, remove paramA and then call the service.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 25/10/2009, at 8:10 AM, Ruth Hoffman wrote:

Hi List:
I was wondering why, under certain conditions the developer used the "remove" method to get a value from the context instead of the "get" method. For example, why do this?

  String webSiteId = (String) serviceContext.remove("webSiteId");

Instead of this?

  String webSiteId = (String) serviceContext.get("webSiteId");

What should I be looking for when I'm trying to decide to use either "get" or "remove"?

TIA
Ruth

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to