Return-Path: Delivered-To: apmail-jakarta-hivemind-user-archive@www.apache.org Received: (qmail 9853 invoked from network); 20 Mar 2006 07:38:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Mar 2006 07:38:21 -0000 Received: (qmail 37408 invoked by uid 500); 20 Mar 2006 07:38:21 -0000 Delivered-To: apmail-jakarta-hivemind-user-archive@jakarta.apache.org Received: (qmail 37147 invoked by uid 500); 20 Mar 2006 07:38:20 -0000 Mailing-List: contact hivemind-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: hivemind-user@jakarta.apache.org List-Id: Delivered-To: mailing list hivemind-user@jakarta.apache.org Received: (qmail 37134 invoked by uid 99); 20 Mar 2006 07:38:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Mar 2006 23:38:20 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [192.109.190.190] (HELO mailgw1.bmwgroup.com) (192.109.190.190) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Mar 2006 23:38:19 -0800 Received: from lp0055.muc (lp0055.muc [160.50.85.11]) by mailgw1.bmwgroup.com with ESMTP for hivemind-user@jakarta.apache.org; Mon, 20 Mar 2006 08:37:56 +0100 Received: from szh001.emeadecentral.bmw.corp (szh001.emeadecentral.bmw.corp [192.168.184.26]) by lp0055.muc with ESMTP for hivemind-user@jakarta.apache.org; Mon, 20 Mar 2006 08:37:55 +0100 Received: by szh001.ch.sub with Internet Mail Service (5.5.2653.19) id ; Mon, 20 Mar 2006 08:37:55 +0100 Message-Id: From: Schulte Marcus To: "'hivemind-user@jakarta.apache.org'" Subject: RE: Accessing registry from a servlet without recreating a new in stance Date: Mon, 20 Mar 2006 08:37:50 +0100 X-Mailer: Internet Mail Service (5.5.2653.19) Sender: marcus.schulte@bmw.ch MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Tapestry builds the registry for you. Instead of a Servlet-Filter you should use a Tapestry WebRequestServicerFilter and let HiveMind inject the required = service(s) into it. > -----Original Message----- > From: Ovidiu Hurducas [mailto:ovidiu@artsoft-consult.ro] > Sent: Monday, March 20, 2006 8:32 AM > To: hivemind-user@jakarta.apache.org > Subject: Accessing registry from a servlet without recreating a new > instance >=20 >=20 > Greetings, >=20 > I=92m using Hivemind+Tapestry+Hibernate to build a site. I have a=20 > javax.servlet.Filter object where I need to do some operations with a = > Hivemind service that uses Hibernate. >=20 > To access the registry from the filter I=92m using the example from = the=20 > Hivemind documentation: >=20 > Registry registry =3D RegistryBuilder.constructDefaultRegistry(); >=20 > MyService service =3D (MyService)=20 > registry.getService("com.mypackage.MyService", MyService.class); >=20 > =20 >=20 > However this is not good. The registry is recreated and the Hibernate = > configuration is read again. >=20 > There is a way to access an existing registry that is already=20 > initialized? I don=92t want to recreate the registry twice. >=20 > Thank you, >=20 > Ovidiu >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: = hivemind-user-help@jakarta.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: hivemind-user-help@jakarta.apache.org