That works beautifully; thanks. In terms of XFire:
<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>org.codehaus.xfire.transport.http.XFireConfigurableServle
t</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>mypackage/services.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
- John Kristian
-----Original Message-----
From: Adam Kramer [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 13, 2006 4:06 PM
To: [email protected]
Subject: Re: [xfire-user] Servlet Initialization
Most containers, I thought, loaded their servlets on startup, but
perhaps Tomcat 4 doesn't. If you set your <load-on-startup> element in
<servlet> to a non-zero value, it will call the init method on app
startup.
Something like below in web.xml:
<servlet>
<servlet-name>DOOOOD</servlet-name>
<servlet-class>foo.bar.dood.DoodServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
-Adam
John Kristian wrote:
>Can you recommend a way to load services.xml and expose services during
>the deployment of a web application that contains XFire?
>
>XFireConfigurableServlet does this work when the servlet container
>calls Servlet.init. But this doesn't happen until the first servlet
>request (in Tomcat 4). I'd prefer to initialize XFire during
>deployment (that is, when the container calls
ServletContextListener.contextInitialized).
>The problem with lazy initialization is that it takes several seconds,
>which is long enough to cause the client to time out and give up.
>
>Can I configure Tomcat 4 to initialize the servlet proactively?
>
>- John Kristian