Thanks, that makes perfect sense!!! 

Regards,

Aleks



----- Original Message ----
From: Daniel Kulp <dk...@apache.org>
To: users@cxf.apache.org
Cc: Milisic Aleksandar <aco_trebi...@yahoo.com.au>
Sent: Thu, 29 July, 2010 12:03:35 AM
Subject: Re: Problems understanding the standalone Jetty configuration

On Tuesday 27 July 2010 10:12:30 pm Milisic Aleksandar wrote:
> Hi,
> 
> I've already once asked a similar question but am still a bit unclear of
> how the standalone Jetty configuration actually works.
> 
> The documentation I have found suggests that in the Spring context we can
> configure the Jetty instance with many options including the port.

Well, actually, you aren't really configuring the port.   You are associating 
that configuration with the jetty instance started up on that port.  Subtle 
but important difference.

Basically, when we need to bring up a jetty instance on a particular port, it 
looks at the configuration to find a config that matches that port and uses 
that config to configure how jetty is setup.    The information is really just 
looked at the first time we need to startup a jetty instance on a particular 
port.




Dan



> 
> What I have noticed is that if I start a "server" which loads an
> application context that has just the jetty configuration (and just the
> port), the Jetty instance does not actually start?!
> It seems to start *only* when I use the JaxWsServerFactoryBean interface to
> publish a service. If that service happens to include a different port in
> the address, the jetty instance that starts
> will listen to that port and not the port configured in the original
> application context!
> 
>  If I publish several services which use a different port, new Jetty
> instances are created.
> 
> To me this rings alarm bells because it means:
> 
> 1. I am probably not using the standalone jetty configuration properly.
> 
> 2. If it seems to disregard the initial jetty configuration in terms of
> port number, it will probably ignore everything else such as security and
> thread pool settings?
> 
> 
> 
> I know I haven't specified a particular question above, but more an attempt
> to explain what is unclear to me and can't find in the documentation,
> hoping someone can clear that up.
> 
> 
> My best scenario would be as following:
> 
> 1. I have an application context which loads all the jetty configuration,
> including port number.
> 
> 2. Whenever a new service is to be published, we publish it but *without*
> the port number since it should automatically be published to the port
> number Jetty is listening on. I have tried doing this, but I get a
> permission
> 
> denied on the socket exception since it automatically tries to publish to
> port 80.
> 
> 
> Has anybody done this, or is there a concrete example somewhere in the
> documentation?
> 
> Cheers!

-- 
Daniel Kulp
dk...@apache.org
http://dankulp.com/blog




Reply via email to