Hi,
I had a similar problem with Xfire/Spring because of the fact that I was
using JeTTY instead of a traditional container to deploy my Xfire
services.
So I decided not to rely on the web container to obtain my Spring
context - but on Spring itself:
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import org.codehaus.xfire.XFire;
import org.codehaus.xfire.transport.http.XFireServlet;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
public class XFireSpringAwareServlet extends XFireServlet implements
BeanFactoryAware {
private static final long serialVersionUID = 1L;
private static final String xfireBeanName = "xfire";
private BeanFactory beanFactory;
private XFire xfire;
@Override
public void init(ServletConfig servletConfig) throws
ServletException {
xfire = (XFire) beanFactory.getBean(xfireBeanName,
XFire.class);
super.init(servletConfig);
}
@Override
public XFire createXFire() {
return xfire;
}
public void setBeanFactory(BeanFactory arg0) throws
BeansException {
this.beanFactory = arg0;
}
}
This one works perfectly - with or without a web context.
Hope this helps.
Regards,
Michele Rossi
-----Original Message-----
From: Matthew Young [mailto:[EMAIL PROTECTED]
Sent: 23 May 2007 15:51
To: [email protected]
Subject: Re: [xfire-user] Either extend XFireServlet or misunderstanding
Spring/WebApp
"Did you check XFireSpringServlet ?"
no since the XFireSpringServlet uses the WebContext loader which i
assume
uses the Servlet's classloader.
--
View this message in context:
http://www.nabble.com/Either-extend-XFireServlet-or-misunderstanding-Spr
ing-WebApp-tf3804356.html#a10765531
Sent from the XFire - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
--------------------------------------------------------
This message w/attachments (message) may be privileged, confidential or
proprietary, and if you are not an intended recipient, please notify the
sender, do not use or share it and delete it. Unless specifically indicated,
this message is not an offer to sell or a solicitation of any investment
products or other financial product or service, an official confirmation of any
transaction, or an official statement of Merrill Lynch. Subject to applicable
law, Merrill Lynch may monitor, review and retain e-communications (EC)
traveling through its networks/systems. The laws of the country of each
sender/recipient may impact the handling of EC, and EC may be archived,
supervised and produced in countries other than the country in which you are
located. This message cannot be guaranteed to be secure or error-free. This
message is subject to terms available at the following link:
http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you
consent to the foregoing.
--------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email