dev@jersey.java.net

[Patch} Fix Grizzly timing issue

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 05 Dec 2007 19:05:55 +0100

Salut,

attached is a new patch that fix the timing issue when starting Grizzly.
  You need to update this binary:

> http://download.java.net/maven/2/com/sun/grizzly/http/1.6-SNAPSHOT/http-1.6-SNAPSHOT.jar

The diff consists of:

> Index: src/api/com/sun/ws/rest/api/container/grizzly/GrizzlyServerFactory.java
> ===================================================================
> --- src/api/com/sun/ws/rest/api/container/grizzly/GrizzlyServerFactory.java (revision 586)
> +++ src/api/com/sun/ws/rest/api/container/grizzly/GrizzlyServerFactory.java (working copy)
> @@ -129,23 +129,7 @@
> selectorThread.setPort(port);
>
> selectorThread.setAdapter(adapter);
> -
> - try {
> - selectorThread.initEndpoint();
> - } catch (Exception ex) {
> - throw new ContainerException(ex);
> - }
> -
> - new Thread() {
> - public void run() {
> - try {
> - selectorThread.startEndpoint();
> - } catch (Exception ex) {
> - throw new ContainerException(ex);
> - }
> - }
> - }.start();
> -
> + selectorThread.listen();
> return selectorThread;
> }
> -}
> \ No newline at end of file

Mainly, I've added a new method that take care of initializing
everything, spwan the thread and continue :-)

1.7.0 official release is coming soon, and that one will be the official
one :-)

Thanks

-- Jeanfrancois