cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James" <>
Subject How to Use http_jetty transport and JettyHTTPDestination from pre-existing embedded Jetty application
Date Fri, 05 Feb 2010 02:55:44 GMT

We have a pre-existing application that uses Jetty in embedded form.  The
existing application doesn't yet support web services, but we want to use
CXF to add web service functionality.

At application startup we execute lines similar to the following to launch
Jetty within our JVM:
  org.mortbay.jetty.Server server = new Server();
  org.mortbay.jetty.deployer.WebAppDeployer deployer = new WebAppDeployer();

  org.mortbay.jetty.handler.HandlerList handlerList = new HandlerList();

It is very important that we be able to use continuations as supported by
Jetty 6.  We understand that access to the built-in CXF/Jetty
ContinuationProvider is available as follows:
  MessageContext context;
  ContinuationProvider provider =
  Continuation c = provider.getContinuation();
Unfortunately, no matter what we try, the
"org.apache.cxf.transport.Destination" associated with our message context
is an instance of "org.apache.cxf.transport.servlet.ServletDestination", and
therefore the ContinuationProvider returned from the MessageContext is
always null.

Our pre-existing application uses Spring.

How can we configure CXF with our existing application so that CXF uses the
http_jetty transport and the JettyHTTPDestination for access to the
"org.apache.cxf.continuations.ContinuationProvider", while still launching
Jetty as shown above?

*We would really like to see how this could be accomplished both with Spring
and without - i.e. using a code snippet.)

Thanks in advance,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message