Skip to main content



      Home
Home » Eclipse Projects » Equinox » Http Service
Http Service [message #98965] Sun, 30 September 2007 15: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] Sun, 30 September 2007 21:10 Go to previous messageGo to next message
Eclipse UserFriend
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 02: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 Jul 17 20:30:24 EDT 2025

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

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

Back to the top