Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 74603 invoked from network); 8 Apr 2008 11:55:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Apr 2008 11:55:24 -0000 Received: (qmail 71784 invoked by uid 500); 8 Apr 2008 11:55:23 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 71726 invoked by uid 500); 8 Apr 2008 11:55:23 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 71715 invoked by uid 99); 8 Apr 2008 11:55:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Apr 2008 04:55:23 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [88.198.46.98] (HELO indoqa.com) (88.198.46.98) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Apr 2008 11:54:30 +0000 Received: from [62.12.10.216] (unknown [62.12.10.216]) by indoqa.com (Postfix) with ESMTP id ECF9C254458 for ; Tue, 8 Apr 2008 13:54:49 +0200 (CEST) Message-ID: <47FB5D07.3030703@apache.org> Date: Tue, 08 Apr 2008 13:54:47 +0200 From: Reinhard Poetz User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: "dev@cocoon.apache.org" Subject: JNet integration Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org At the ApacheCon Carsten, Grek and I had the chance to talk about the JNet integration and to find a solution that (hopefully) works. * First we all believe that it is not a good idea to consider the blockcontext:/ URLs as expressions that are resolved to file: URLs. We want to make them real URLs. * Taking care of URL handling is NOT the responsiblity the Servlet-Service framework. * The installation of blocks (= extracting to the working directory of the web application) is NOT the responsibility of the Spring configurator. * The installation of blocks shouldn't be done by using Spring so that the list of all installed blocks is generally available. So what do we propose? ---------------------- * Get rid of the SourceResolver usage in the SSF implementation code. * Do the installation of blocks in a ServletContextListener. The map of all installed blocks can be stored as a servlet context attribute then and being looked up from there easily. * Provide a Spring aspect that intercepts all service() method calls using an around advice and installs a URLStreamHandlerFactory (-> that's the piece of code responsible for returning the correct StreamHandler for a particular protocol). The list of available StreamHanlders can be gathered by using a BeanMap that collects all beans of a particular type. Doing it this way ensures that the installation and uninstallation of URLStreamHandlerFactories is done per thread and we are on the safe side when there is more than one web application running the same JVM. As a first step we want to make these changes happen without creating any additional modules. But when things become more stable (implementation-wise) we will propose to create a separate module for the "BlockInstaller" and find the final home for "JNet". -- Reinhard P�tz Managing Director, {Indoqa} GmbH http://www.indoqa.com/en/people/reinhard.poetz/ Member of the Apache Software Foundation Apache Cocoon Committer, PMC member, PMC Chair reinhard@apache.org _________________________________________________________________________