Thank you, I will study that. Was that information available on the Axis2 site? I always look there first for reference documentation. I will add the wso2 site to my trawl net.
Cheers, Des -----Original Message----- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: 25 May 2007 13:29 To: [email protected] Subject: Re: [axis2]What is the equivalent of 'ServletContextListener' in Axis2? Try ServiceLifeCycle: http://wso2.org/library/333 -- dims On 5/25/07, Desmond Whewell (CV/ETL) <[EMAIL PROTECTED]> wrote: > > > Sorry, I omitted to say I'm using Axis2 1.2 as a war file on Tomcat > 5.5 > > ________________________________ > From: Desmond Whewell (CV/ETL) [mailto:[EMAIL PROTECTED] > Sent: 25 May 2007 10:17 > To: [email protected] > Subject: [axis2]What is the equivalent of 'ServletContextListener' in Axis2? > > > > > Is there an equivalent in Axis2 that gives the capability that > ServletContextListener gives in Servlets? > > I have used ServletContextListener in Tomcat as a way of copying > <context-params>, defined in web.xml, into System properties. These > properties can then be examined throughout the buisness logic to > control behaviour. The listener looks like: > > // Copy the context parameters into the System properties > ServletContext context = event.getServletContext(); > > String itemName = null; > String itemValue = null; > Enumeration names = context.getInitParameterNames(); > while (names.hasMoreElements()) { > itemName = (String) (names.nextElement()); > > // Do not overwrite properties that already exist. I.e. > those that > // may have been passed in by other means. > if (System.getProperty(itemName) == null) { > itemValue = context.getInitParameter(itemName); > if (itemValue != null) { > System.setProperty(itemName, itemValue); > } > } > } > > > I would like to do the same with Axis2 services using the equivalent > services.xml and <parameter>. Do such hooks exist in Axis2 and will it > ensure that the properties end up in the correct classloader? > > Incidently, is there a schema definition for the services.xml instances? > > Cheers, Des -- Davanum Srinivas :: http://davanum.wordpress.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
