Hi,

What's your fileServlet?
If it's just a servlet and has nothing to do with webservice, you can deploy it into smx4 with pax-web[1](which use jetty underlying too).

If the fileServlet is webservice thing, you can also expose a cxf webservice over cxf http-osgi(it's based on pax-web and so it's servlet too) transport, you may need take a look at cxf-osgi example shipped with kit to get more details.

In both case you needn't write code to manage jetty or add servlet yourself(like what your code show me here), It's just some configuration needed.

[1]http://wiki.ops4j.org/display/paxweb/Pax+Web
Freeman
On 2011-3-9, at 下午3:42, jcamus wrote:

Hi Freeman !
And thanks for your quick answer.
I need to manage a servlet into the ESB and no saw no other choice to manage manually my own jetty server into a bean ! Can you give sample how to manage
Jetty into a cxf-bc?

Here is an extract of the code am I using in a class instancied by my cxf-se
:

m_server = new Server(m_port);
m_root = new Context(m_server, "/", Context.SESSIONS);

m_fileServlet = new FileServlet();
m_root.addServlet(new ServletHolder(m_fileServlet),  /file);    

Regards.


--
View this message in context: 
http://servicemix.396122.n5.nabble.com/How-to-free-resources-in-a-bean-during-undeployment-tp3414218p3415090.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


--
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org

Reply via email to