# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: C:\Projects\grizzly-ref\trunk\modules\grizzly\src\main\java\com\sun\grizzly # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: Controller.java --- Controller.java Base (BASE) +++ Controller.java Locally Modified (Based On LOCAL) @@ -588,6 +588,10 @@ ctx.configureOpType(key); } + if (logger.isLoggable(Level.FINE)) { + logger.log(Level.FINE, "pollContext(..) Context : "+ctx); + } + return ctx; } @@ -599,10 +603,17 @@ } /** - * Return a Context to the pool + * Return a {@link Context} to its pool if it is not shared. + * * @param ctx - the {@link Context} */ public void returnContext(Context ctx){ + if(ctx.decrementRefCount()>0) { + return; + } + if (logger.isLoggable(Level.FINE)) { + logger.log(Level.FINE, "returnContext() Context : "+ctx); + } ctx.recycle(); contexts.offer(ctx); }