Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 76693 invoked from network); 19 Sep 2003 17:31:38 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 19 Sep 2003 17:31:38 -0000 Received: (qmail 65521 invoked by uid 500); 19 Sep 2003 17:31:26 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 65340 invoked by uid 500); 19 Sep 2003 17:31:25 -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 Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 65327 invoked from network); 19 Sep 2003 17:31:24 -0000 Received: from unknown (HELO kerberos) (62.116.51.59) by daedalus.apache.org with SMTP; 19 Sep 2003 17:31:24 -0000 Received: From mail.at.efp.cc ([62.116.51.60]) by kerberos (WebShield SMTP v4.5 MR1a); id 106399268780; Fri, 19 Sep 2003 19:31:27 +0200 Received: from WRPO (wrpo.at.intra.efp.cc [194.107.80.148]) by mail.at.efp.cc (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id h8JHVP828041 for ; Fri, 19 Sep 2003 19:31:26 +0200 From: "Reinhard Poetz" To: Subject: RE: [RT] Implementing Cocoon Blocks Date: Fri, 19 Sep 2003 19:31:07 +0200 Message-ID: <001201c37ed3$cf8fe8a0$1e01a8c0@WRPO> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal In-Reply-To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N From: Bertrand Delacretaz > Le Jeudi, 18 sep 2003, =E0 21:09 Europe/Zurich, Reinhard Poetz a = =E9crit : >=20 > > ...I understand that I can't load a class from another block. My > > question: > > Is it possible to load classes from "Cocoon core" (whatever we will > > consider as core) from within my block via "new" or are=20 > there arguments > > against it?... >=20 > I think loading classes directly via new (as opposed to factories + =20 > interfaces) should be discouraged as much as possible, as it creates =20 > unnecessary coupling. >=20 > Depending on the classloading mechanisms that are implemented, =20 > selective filtering of what is allowed could be implemented easily I =20 > think [1]. >=20 > Do you have examples where direct instantation via "new" is required? e.g. line 341 in the HTMLGenerator=20 throw new ProcessingException("Exception in HTMLGenerator.generate()",e); (org.apache.cocoon.ProcessingException) How can I do this in the generator in the future? Cheers, Reinhard