Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 81023 invoked from network); 12 Dec 2004 07:39:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Dec 2004 07:39:10 -0000 Received: (qmail 42116 invoked by uid 500); 12 Dec 2004 07:39:08 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 42085 invoked by uid 500); 12 Dec 2004 07:39:08 -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 42071 invoked by uid 99); 12 Dec 2004 07:39:08 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from viefep14-int.chello.at (HELO viefep14-int.chello.at) (213.46.255.13) by apache.org (qpsmtpd/0.28) with ESMTP; Sat, 11 Dec 2004 23:39:06 -0800 Received: from [192.168.1.31] (really [62.178.239.20]) by viefep14-int.chello.at (InterMail vM.6.01.03.05 201-2131-111-107-20040910) with ESMTP id <20041212073902.PCTQ2880.viefep14-int.chello.at@[192.168.1.31]> for ; Sun, 12 Dec 2004 08:39:02 +0100 Message-ID: <41BBF590.3090906@apache.org> Date: Sun, 12 Dec 2004 08:38:56 +0100 From: Reinhard Poetz User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: [SOT] SingleThreaded components vs. Singletons Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N For a quick hack I wrote a singleton (simple Java class) that manages the Hibernate SessionFactory. As it is only a Cocoon/Hibernate-demo I haven't thought much about it, but if I use Hibernate in production, I would write a SingleThreaded Avalon component. I would do it because Cocoon is based on Avalon, but are there any technical reasons? -- Reinhard