Hm...  well, this isn't quite as easy as I had hoped it would be due to a 
protected method that probably should be public.  

Right now, the ONLY way to configure the session support is via a spring 
config.   Thus, in your test, you could have a spring xml config to 
configure the session support and create a Bus based on that prior to 
publishing your service.    The OTHER option is to publish a dummy 
service on the port you want so the jetty engine starts up, grab the 
JettyHTTPServerEngineFactory from the bus, get the JettyHTTPServerEngine 
for the port, call the setSessionSupport(true) method, then publish the 
real service you want.

The main problem is that the method:
JettyHTTPServerEngine createJettyHTTPServerEngine(int port, String 
protocol)
on the JettyHTTPServerEngineFactory is not public.   I'm going to make it 
public in my next commit.   Ideally, you would get the 
JettyHTTPServerEngineFactory from the Bus, call that method to get the 
engine for the port you want, configure it, then publish your service.   
Right now, the dummy service needs to be published first to make sure 
that method is called.

Dan




On Monday 14 April 2008, versus wrote:
> Hi all,
>
> where can I find more information regarding jetty-configuration?
> I took a look at the
> http://cwiki.apache.org/CXF20DOC/jetty-configuration.html page, but
> some things are still unclear to me, e.g. how does this fit in the
> server configuration/initialization and what should be done on the
> client side?
>
> What I want to setup is: unit testing framework = cxf + embedded jetty
> with session support
> The setup should be as easy as possible.
>
> Thanks for any help!



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to