Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Http Service
Http Service [message #98965] Sun, 30 September 2007 19:28 Go to next message
Eclipse UserFriend
Originally posted by: abo.splitshade.de

Hi,

I try hard to get behind some Implementationdetails in equinox.
One important Question I don?t understand is, what do this lines do?

context = bundleContext;
Object[] proxyServlets = serviceRegistrations.keySet().toArray();

for (int i = 0; i < proxyServlets.length; ++i) {
ServiceRegistration registration = registerHttpService((ProxyServlet)
proxyServlets[i]);
serviceRegistrations.put(proxyServlets[i], registration);
}

[...]

context.registerService(HttpService.class.getName(), factory,
serviceProperties);

This is what happens in the 'org.eclipse.equinox.http.servlet.internal'
package in the Activator class.

What seems to happen here is, that there are several http-Services
registered?
Why would one do that? I thought, only one http-service is needed?

Any Help appreciated

Martin
Re: Http Service [message #98995 is a reply to message #98965] Mon, 01 October 2007 01:10 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Hi Martin,

You're right in that code is for handling multiple instances of the Http
Service.
This is not typical but can be useful in some circumstances.Most uses
involve extra ports to perhaps provide a public facing web port for one Http
Service instance as well as an internal management port for another. In
other cases multiple Http Services are used simply to provide some isolation
of the URI space between applications.

-Simon

"Martin Dilger" <abo@splitshade.de> wrote in message
news:fdotdf$56b$1@build.eclipse.org...
> Hi,
>
> I try hard to get behind some Implementationdetails in equinox.
> One important Question I don?t understand is, what do this lines do?
>
> context = bundleContext;
> Object[] proxyServlets = serviceRegistrations.keySet().toArray();
>
> for (int i = 0; i < proxyServlets.length; ++i) {
> ServiceRegistration registration = registerHttpService((ProxyServlet)
> proxyServlets[i]);
> serviceRegistrations.put(proxyServlets[i], registration);
> }
>
> [...]
>
> context.registerService(HttpService.class.getName(), factory,
> serviceProperties);
>
> This is what happens in the 'org.eclipse.equinox.http.servlet.internal'
> package in the Activator class.
>
> What seems to happen here is, that there are several http-Services
> registered?
> Why would one do that? I thought, only one http-service is needed?
>
> Any Help appreciated
>
> Martin
Re: Http Service [message #99010 is a reply to message #98995] Mon, 01 October 2007 06:02 Go to previous message
Eclipse UserFriend
Originally posted by: abo.splitshade.de

Ah ok, that makes sense, thank you very much, it?s a little confusing in
the first view..

Greetings

Martin

Simon Kaegi schrieb:
> Hi Martin,
>
> You're right in that code is for handling multiple instances of the Http
> Service.
> This is not typical but can be useful in some circumstances.Most uses
> involve extra ports to perhaps provide a public facing web port for one Http
> Service instance as well as an internal management port for another. In
> other cases multiple Http Services are used simply to provide some isolation
> of the URI space between applications.
>
> -Simon
>
> "Martin Dilger" <abo@splitshade.de> wrote in message
> news:fdotdf$56b$1@build.eclipse.org...
>> Hi,
>>
>> I try hard to get behind some Implementationdetails in equinox.
>> One important Question I don?t understand is, what do this lines do?
>>
>> context = bundleContext;
>> Object[] proxyServlets = serviceRegistrations.keySet().toArray();
>>
>> for (int i = 0; i < proxyServlets.length; ++i) {
>> ServiceRegistration registration = registerHttpService((ProxyServlet)
>> proxyServlets[i]);
>> serviceRegistrations.put(proxyServlets[i], registration);
>> }
>>
>> [...]
>>
>> context.registerService(HttpService.class.getName(), factory,
>> serviceProperties);
>>
>> This is what happens in the 'org.eclipse.equinox.http.servlet.internal'
>> package in the Activator class.
>>
>> What seems to happen here is, that there are several http-Services
>> registered?
>> Why would one do that? I thought, only one http-service is needed?
>>
>> Any Help appreciated
>>
>> Martin
>
>
Previous Topic:class not found even after package exported
Next Topic:Equinox Extension loading buggy?
Goto Forum:
  


Current Time: Thu Apr 25 11:18:41 GMT 2024

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

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

Back to the top