You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Milisic Aleksandar <ac...@yahoo.com.au> on 2010/07/01 15:27:36 UTC
A single Jetty instance with multiple Spring application contexts?
Hi,
I'm new to CXF and have run into an issue that I am not sure how to solve.
Namely, I need to have a multitude of projects which will all have web services
and implementations defined.
What I have noticed is that if I have multiple endpoints defined in the Spring
config file and they all have the same port, a single Jetty instance will be
created with all these services published. Obviously, for every unique port a
new Jetty instance is created.
But if I deploy services from another project (i.e. another Spring application
context) on the same port, it tries to start a new Jetty instance and obviously
fails since their is already an instance started and connection is refused (same
port).
What I would like to do is have a single Jetty instance started which will have
all my services published from across all projects. This would almost mean that
for each Spring application context, I would need to *update* the currently
running Jetty instance on the port rather than trying to start a new one (and
failing).
Is there any way I can do this?
Re: A single Jetty instance with multiple Spring application contexts?
Posted by Daniel Kulp <dk...@apache.org>.
How is your container or such setup. I THINK if you have the CXF jars (and
their deps) put into the "shared lib" or whatever directory so they would be
in the shared classloader, it should work. The per-port objects are a static
map (I think) that should be sharable if the classloader is shared.
Dan
On Thursday 01 July 2010 9:27:36 am Milisic Aleksandar wrote:
> Hi,
>
> I'm new to CXF and have run into an issue that I am not sure how to solve.
> Namely, I need to have a multitude of projects which will all have web
> services and implementations defined.
>
> What I have noticed is that if I have multiple endpoints defined in the
> Spring config file and they all have the same port, a single Jetty
> instance will be created with all these services published. Obviously, for
> every unique port a new Jetty instance is created.
> But if I deploy services from another project (i.e. another Spring
> application context) on the same port, it tries to start a new Jetty
> instance and obviously fails since their is already an instance started
> and connection is refused (same port).
>
>
> What I would like to do is have a single Jetty instance started which will
> have all my services published from across all projects. This would almost
> mean that for each Spring application context, I would need to *update*
> the currently running Jetty instance on the port rather than trying to
> start a new one (and failing).
>
>
> Is there any way I can do this?
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog