Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » disable default start of Jetty
disable default start of Jetty [message #119203] Fri, 10 October 2008 08:44 Go to next message
Srijith is currently offline SrijithFriend
Messages: 6
Registered: July 2009
Junior Member
Hi All,

I want to use Jetty servlet container to host my servlets within
OSGi, however, the equinox.http.jetty bundle seems to start jetty by
default on port 80, or the port specified by the
org.osgi.service.http.port property in config.ini. However I want to
programmatically start the Jetty on a my own port at runtime. I am able to
use JettyConfigurator class for this purpose and am finding it convenient,
however, I see that the default server instance still keeps running and I
am unable to stop that from happening. Is there a way i could specify that
the default server instance should not get started. ?

Thanks for your help in advance.

Thanks,
Srijith.
Re: disable default start of Jetty [message #119231 is a reply to message #119203] Fri, 10 October 2008 12:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jacek.pospychala.pl.ibm.com

Srijith,
maybe Jetty is starting on Equinox startup, because it's bundle is
listed in osgi.bundles variable in config.ini?

Srijith pisze:
> Hi All,
>
> I want to use Jetty servlet container to host my servlets within
> OSGi, however, the equinox.http.jetty bundle seems to start jetty by
> default on port 80, or the port specified by the
> org.osgi.service.http.port property in config.ini. However I want to
> programmatically start the Jetty on a my own port at runtime. I am able
> to use JettyConfigurator class for this purpose and am finding it
> convenient, however, I see that the default server instance still keeps
> running and I am unable to stop that from happening. Is there a way i
> could specify that the default server instance should not get started. ?
Re: disable default start of Jetty [message #119244 is a reply to message #119231] Fri, 10 October 2008 13:56 Go to previous messageGo to next message
Srijith is currently offline SrijithFriend
Messages: 6
Registered: July 2009
Junior Member
Thanks for your reply! appreciate it.

Yes it is started on Equinox startup by the osgi.bundles property in
config.ini. I removed the "@start" and found that I am able to obtain my
required behaviour. However i am not sure, whether it is the correct way
to go about it.! Because after starting like that I see that
or.eclipse.equinox.http.jetty is in ACTIVE state. I'm just worried whether
i'll run into an IllegalStateException later.
Re: disable default start of Jetty [message #119297 is a reply to message #119244] Fri, 10 October 2008 17:25 Go to previous message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Hi,

there are two ways of disabling the auto-start of the Jetty HTTP server
in the Jetty bundle.

1. Use lazy activation for the Jetty bundle
2. Set property "org.eclipse.equinox.http.jetty.autostart=false" in
config.ini (or via -D... VM argument)

For example, option 1 is used in Eclipse itself. If you start Eclipse,
the Jetty bundle is there but the HTTP server will not be started
because the bundle is activated lazy, i.e. when some of its classes are
accessed.

-Gunnar

--
Gunnar Wagenknecht
gunnar@wagenknecht.org
http://wagenknecht.org/
Previous Topic:Software Update
Next Topic:Can't startup eclipse after update to 3.4.1
Goto Forum:
  


Current Time: Thu Mar 28 16:15:48 GMT 2024

Powered by FUDForum. Page generated in 0.02164 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top