You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Felix Meschberger <fm...@gmail.com> on 2008/01/08 17:44:08 UTC

Look at migration to more recent Jetty version (FELIX-55)

Hi all,

I took a stab at migrating the http.jetty bundle to a more recent Jetty
version. For the moment I took Jetty 5.1.12, because it is said to be
supporting back to JDK 1.2 whereas Jetty 6.1 is supported for JDK 1.4
and higher only.

After reading the issue again, I started working on Jetty 6 integration
- it takes some time to grock the details, but I think, I am coming
closer :-)

One point with Jetty 6 is, that it requires Java 1.4 or higher and
Servlet API 2.5. This would of course "disable" support for older VMs.
Of course, this migrated http.jetty bundle would not be working with the
older servlet.api bundle any more.

Richard OTOH seems to be working on a lightweight implementation still
supporting 1.2. So I could imagine, that we could be going forward with
two versions: The most modern Jetty 6 based one and the most-lightweight
one by Richard.

WDYT ?

Regards
Felix

[1] http://issues.apache.org/jira/browse/FELIX-55


Re: Look at migration to more recent Jetty version (FELIX-55)

Posted by Rob Walker <ro...@ascert.com>.
> But my memory could be inaccurate.
>
>   
Mine too these days ;)


Re: Look at migration to more recent Jetty version (FELIX-55)

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Thursday 10 January 2008 16:56, Rob Walker wrote:
> > And this needs to be fixed in a new version (compared to org.ungoverned),
> > since Jetty (at Jetty4) resolves the URL space differently from the OSGi
> > spec. Keep that in mind, FelixM.
>
> Can't remember if we have a Jira issue for this - but if not, can I get
> you to add one with some examples of where it's believed we don't
> resolve the URL space as per the Spec.
>
> I remember some discussions on this, but worth Doc'ing them in Jira if
> we didn't already

Too long ago for me to remember the exact details. 
I vaguely recall that Jetty will match from left to right, and the spec 102.4 
says that it must match right to left. Could also be that Jetty would not 
allow you to register servlet on /abc/def if you had one servlet registered 
on /abc already.

But my memory could be inaccurate.


Cheers
-- 
Niclas Hedhman, Software Developer

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Re: Look at migration to more recent Jetty version (FELIX-55)

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Niclas,

Am Donnerstag, den 10.01.2008, 16:42 +0800 schrieb Niclas Hedhman:
> On Wednesday 09 January 2008 15:34, Rob Walker wrote:
> > The Felix layer just provides registration of aliases
> 
> And this needs to be fixed in a new version (compared to org.ungoverned), 
> since Jetty (at Jetty4) resolves the URL space differently from the OSGi 
> spec. Keep that in mind, FelixM.

Thanks for reminding. This was actually one issue I once had. But I
committed a fix to this in FELIX-379 [1]. With the latest patch to
FELIX-55 [2] there is only one context registered with Jetty. In to this
context a Servlet Holder is installed for each registered servlet and
resource, whereas each such Serlvet Holder has a reference to the actual
ServletContext (based on the OSGi HttpContext is actually used)

So this should now work having the resources and servlets in the same
path space.

One thing, which might not work is sessions and cookies, esp. as Cookies
are sent from the client and the server just gets them ...

Regards
Felix

[1] https://issues.apache.org/jira/browse/FELIX-379
[2] https://issues.apache.org/jira/browse/FELIX-55


Re: Look at migration to more recent Jetty version (FELIX-55)

Posted by Rob Walker <ro...@ascert.com>.
> And this needs to be fixed in a new version (compared to org.ungoverned), 
> since Jetty (at Jetty4) resolves the URL space differently from the OSGi 
> spec. Keep that in mind, FelixM.
>
>   
Can't remember if we have a Jira issue for this - but if not, can I get 
you to add one with some examples of where it's believed we don't 
resolve the URL space as per the Spec.

I remember some discussions on this, but worth Doc'ing them in Jira if 
we didn't already

Cheers

-- Rob


Re: Look at migration to more recent Jetty version (FELIX-55)

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Wednesday 09 January 2008 15:34, Rob Walker wrote:
> The Felix layer just provides registration of aliases

And this needs to be fixed in a new version (compared to org.ungoverned), 
since Jetty (at Jetty4) resolves the URL space differently from the OSGi 
spec. Keep that in mind, FelixM.


Cheers
-- 
Niclas Hedhman, Software Developer

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Re: Look at migration to more recent Jetty version (FELIX-55)

Posted by Rob Walker <ro...@ascert.com>.
Alin

For the most part this is historical - several years back when Richard 
started Oscar, and later I joined in, there was pretty much no other 
open source OSGi, even less an open source Http Service. So Richard 
rolled a quick version, and I tidied it up a bit to make it more OSGi 
compliant and slightly better behaved in terms of general Web/Http usage 
(proper session management etc.)

I'm not a fan of duplicated effort, but maybe there is still a place for 
a Felix Http Service - at present it isn't actually much code, since all 
the real work is done by Jetty. The Felix layer just provides 
registration of aliases, management of contexts, and reigns in Jetty to 
try and just support the OSGi standard. I can see the benefit of 
services that go beyond the standard with extra services, so maybe Felix 
Http Service role is to be a "strict OSGi standard follower" i.e. no 
extras or extensions. For those, people can then look to Pax Web / OPS4J 
etc.

Anyhow - my view on this are fairly open really.

- Rob

Alin Dreghiciu wrote:
> Hi,
>
> I hope you do not get me wrong here but still have to ask. Does it
> worth reinventing the wheel? Pax Web is already built based on jetty6
> ad is ASLv2. Maybe I is good to have the Felix http service remain on
> Jetty so the we get a wider selection, and spend the effort if
> possible on improving Pax Web in regards to Jetty 6.
>
> Anyhow, Felx if you need support on Jetty 6 just let me know.
>
> Alin
>
> On Jan 8, 2008 6:44 PM, Felix Meschberger <fm...@gmail.com> wrote:
>   
>> Hi all,
>>
>> I took a stab at migrating the http.jetty bundle to a more recent Jetty
>> version. For the moment I took Jetty 5.1.12, because it is said to be
>> supporting back to JDK 1.2 whereas Jetty 6.1 is supported for JDK 1.4
>> and higher only.
>>
>> After reading the issue again, I started working on Jetty 6 integration
>> - it takes some time to grock the details, but I think, I am coming
>> closer :-)
>>
>> One point with Jetty 6 is, that it requires Java 1.4 or higher and
>> Servlet API 2.5. This would of course "disable" support for older VMs.
>> Of course, this migrated http.jetty bundle would not be working with the
>> older servlet.api bundle any more.
>>
>> Richard OTOH seems to be working on a lightweight implementation still
>> supporting 1.2. So I could imagine, that we could be going forward with
>> two versions: The most modern Jetty 6 based one and the most-lightweight
>> one by Richard.
>>
>> WDYT ?
>>
>> Regards
>> Felix
>>
>> [1] http://issues.apache.org/jira/browse/FELIX-55
>>
>>
>>     

-- 


Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com


Re: Look at migration to more recent Jetty version (FELIX-55)

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Alin Dreghiciu wrote:
> Hi,
>
> I hope you do not get me wrong here but still have to ask. Does it
> worth reinventing the wheel? Pax Web is already built based on jetty6
> ad is ASLv2. Maybe I is good to have the Felix http service remain on
> Jetty so the we get a wider selection, and spend the effort if
> possible on improving Pax Web in regards to Jetty 6.
>
> Anyhow, Felx if you need support on Jetty 6 just let me know.
>   

I don't have any issue with Pax Web being contributed to Felix to 
replace http.jetty...

-> richard

> Alin
>
> On Jan 8, 2008 6:44 PM, Felix Meschberger <fm...@gmail.com> wrote:
>   
>> Hi all,
>>
>> I took a stab at migrating the http.jetty bundle to a more recent Jetty
>> version. For the moment I took Jetty 5.1.12, because it is said to be
>> supporting back to JDK 1.2 whereas Jetty 6.1 is supported for JDK 1.4
>> and higher only.
>>
>> After reading the issue again, I started working on Jetty 6 integration
>> - it takes some time to grock the details, but I think, I am coming
>> closer :-)
>>
>> One point with Jetty 6 is, that it requires Java 1.4 or higher and
>> Servlet API 2.5. This would of course "disable" support for older VMs.
>> Of course, this migrated http.jetty bundle would not be working with the
>> older servlet.api bundle any more.
>>
>> Richard OTOH seems to be working on a lightweight implementation still
>> supporting 1.2. So I could imagine, that we could be going forward with
>> two versions: The most modern Jetty 6 based one and the most-lightweight
>> one by Richard.
>>
>> WDYT ?
>>
>> Regards
>> Felix
>>
>> [1] http://issues.apache.org/jira/browse/FELIX-55
>>
>>
>>     

Re: Look at migration to more recent Jetty version (FELIX-55)

Posted by Alin Dreghiciu <ad...@gmail.com>.
Hi,

I hope you do not get me wrong here but still have to ask. Does it
worth reinventing the wheel? Pax Web is already built based on jetty6
ad is ASLv2. Maybe I is good to have the Felix http service remain on
Jetty so the we get a wider selection, and spend the effort if
possible on improving Pax Web in regards to Jetty 6.

Anyhow, Felx if you need support on Jetty 6 just let me know.

Alin

On Jan 8, 2008 6:44 PM, Felix Meschberger <fm...@gmail.com> wrote:
> Hi all,
>
> I took a stab at migrating the http.jetty bundle to a more recent Jetty
> version. For the moment I took Jetty 5.1.12, because it is said to be
> supporting back to JDK 1.2 whereas Jetty 6.1 is supported for JDK 1.4
> and higher only.
>
> After reading the issue again, I started working on Jetty 6 integration
> - it takes some time to grock the details, but I think, I am coming
> closer :-)
>
> One point with Jetty 6 is, that it requires Java 1.4 or higher and
> Servlet API 2.5. This would of course "disable" support for older VMs.
> Of course, this migrated http.jetty bundle would not be working with the
> older servlet.api bundle any more.
>
> Richard OTOH seems to be working on a lightweight implementation still
> supporting 1.2. So I could imagine, that we could be going forward with
> two versions: The most modern Jetty 6 based one and the most-lightweight
> one by Richard.
>
> WDYT ?
>
> Regards
> Felix
>
> [1] http://issues.apache.org/jira/browse/FELIX-55
>
>

Re: Look at migration to more recent Jetty version (FELIX-55)

Posted by Felix Meschberger <fm...@gmail.com>.
Am Dienstag, den 08.01.2008, 11:53 -0500 schrieb Richard S. Hall:
> > One point with Jetty 6 is, that it requires Java 1.4 or higher and
> > Servlet API 2.5. This would of course "disable" support for older VMs.
> > Of course, this migrated http.jetty bundle would not be working with the
> > older servlet.api bundle any more.
> >   
> 
> Well, the spec requires Servlet 2.1, so this will actually create 
> something that is not quite spec.

I agree to some extend. On the other hand - and please correct me if I
am wrong, I only entered the field when 2.3 was almost out - 2.5 is
compatible with 2.1. So everything available in 2.1 is also available in
2.5. So this is probably not that big a deal.

In fact the spec says: "Http Service implementations must support at
least version 2.1 of the Java Servlet API." (Last sentence in section
102.1 Introduction). So to my understanding, we would still be
conforming, right ?

Regards
Felix



Re: Look at migration to more recent Jetty version (FELIX-55)

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Felix Meschberger wrote:
> I took a stab at migrating the http.jetty bundle to a more recent Jetty
> version. For the moment I took Jetty 5.1.12, because it is said to be
> supporting back to JDK 1.2 whereas Jetty 6.1 is supported for JDK 1.4
> and higher only.
>
> After reading the issue again, I started working on Jetty 6 integration
> - it takes some time to grock the details, but I think, I am coming
> closer :-)
>
> One point with Jetty 6 is, that it requires Java 1.4 or higher and
> Servlet API 2.5. This would of course "disable" support for older VMs.
> Of course, this migrated http.jetty bundle would not be working with the
> older servlet.api bundle any more.
>   

Well, the spec requires Servlet 2.1, so this will actually create 
something that is not quite spec.

> Richard OTOH seems to be working on a lightweight implementation still
> supporting 1.2. So I could imagine, that we could be going forward with
> two versions: The most modern Jetty 6 based one and the most-lightweight
> one by Richard.
>   

Well, I won't go as far as saying that I am working on a lightweight 
impl of the HTTP service, but I was playing around with creating a 
simple file-based HTTP server and thought that it could potentially be 
useful as a foundation for a lightweight HTTP service implementation. 
However, I probably won't be able to spend much time on that right now, 
since any extra time I have should go into Felix 1.2.0...

I would be willing to give advice/feedback/encouragement to someone 
willing to work on it.

-> richard

> WDYT ?
>
> Regards
> Felix
>
> [1] http://issues.apache.org/jira/browse/FELIX-55
>
>