Hi Chris, Within the Axis2 service method you can access to MessageContext as follows .
MessageContext msgCtx = MessageContext.getCurrentMessageContext(); Once you have a reference to the current MessageContext , you can access to any other Context such as ConfigurationContext , ServiceContext etc Also you can achieve more control on your service using Axis2's LifeCycle and ServiceLifeCycle interfaces , try for this [1] . [1] - http://blog.facilelogin.com/2008/11/axis2-services-lifecycle-vs.html Thanks , On Thu, May 28, 2009 at 8:38 PM, Chris Mannion <[email protected]> wrote: > Hi All > > Does anyone know how to build a service for Axis2 deployment that is > able to access context. For example, in Axis1.x service classes were > built to implement the ServiceLifeCycle interface. That interface > included an init method which was passed a context object as a > parameter from which the ServletContext could be retrieved and was > called when axis initialised the service code ready to be used. Is > there anything similar in Axis2, I really need my service code to be > aware of the context it's deployed in, to pick up parameters which > allow db connections and things like that. Any help would be > appreciated. > > -- > Chris Mannion > iCasework and LocalAlert implementation team > 0208 144 4416 > -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/
