The MessageContext is stored within a ThreadLocal variable specific to a particular request. What that means is that any changes made to the MessageContext will be accessible to any other handlers within the request/response flow for that request. It is not accessible to handlers outside of the request.
AXIS engineers, feel free to correct me if I'm wrong... Ian Ian D. Stewart Open Systems Engineer II Enterprise Midrange - Bank One Infrastructure & Operations [EMAIL PROTECTED] (614) 213-6100 [EMAIL PROTECTED] on 07/11/2003 11:31:51 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RE: From Handler to Service Ian, What would happen in a multi-threaded environment, when multiple requests are running through the server, will this still work? Just wanted to enquire!! Regards, Santosh -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 4:12 PM To: [EMAIL PROTECTED] Subject: Re: From Handler to Service You can store any arbitrary data in the MessageContext, via getProperty ()/setProperty(). You can then access this information from within your service by calling MessageContext.getCurrentContext(). Example: Handler.invoke(MessageContext context) { context.setProperty("org", "research.ge.com"); } Service.doSomething() { MessageContext context = MessageContext.getCurrentContext(); String org = (String)context.getProperty("org"); } HTH, Ian Ian D. Stewart Open Systems Engineer II Enterprise Midrange - Bank One Infrastructure & Operations [EMAIL PROTECTED] (614) 213-6100 "Chen, Li (Research, YOH)" <[EMAIL PROTECTED]> on 07/11/2003 10:59:14 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: From Handler to Service Hi all, Is there any way to pass information (say, a String value) from a handler to a service? The service is "registered" in the deploy.wsdd file. Thanks. g GE Global Research ____________________________________________________________________________ ______________________________________________ Li (Lee) Ye Chen Intern - Information Technology Management Services One Research Circle, KWC-255D Niskayuna, NY 12309 (518) 387-4556 This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.