Return-Path: Delivered-To: apmail-jakarta-hivemind-user-archive@www.apache.org Received: (qmail 62409 invoked from network); 25 May 2005 21:59:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 May 2005 21:59:11 -0000 Received: (qmail 5981 invoked by uid 500); 25 May 2005 21:59:10 -0000 Delivered-To: apmail-jakarta-hivemind-user-archive@jakarta.apache.org Received: (qmail 5967 invoked by uid 500); 25 May 2005 21:59:10 -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 5950 invoked by uid 99); 25 May 2005 21:59:10 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of geoff.hopson@gmail.com designates 64.233.162.204 as permitted sender) Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.204) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 25 May 2005 14:59:10 -0700 Received: by zproxy.gmail.com with SMTP id 18so501003nzp for ; Wed, 25 May 2005 14:59:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Ix7r8e7fDfEFUxg7c9ZmKvvr8xG8tyToIs+Xii6pwlZPbnzFktFOHV3NmWpAPD2RF2IFwUAsl3yJuDHvE9Tnhc1prdN8favQiiG7IqFUaKtkYXE6aoMMJdoEabZS+VsipwkZsHedpwVn8AWcMZME5cexRUOellAdLWIyjFsa3wk= Received: by 10.36.34.12 with SMTP id h12mr355679nzh; Wed, 25 May 2005 14:59:07 -0700 (PDT) Received: by 10.36.46.3 with HTTP; Wed, 25 May 2005 14:59:07 -0700 (PDT) Message-ID: Date: Wed, 25 May 2005 22:59:07 +0100 From: Geoff Hopson Reply-To: Geoff Hopson To: hivemind-user@jakarta.apache.org Subject: Re: [Newbie] Singletons starting twice In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks for the response. Not got the code in front of me, but I recall it is using createDefaultRegistry. I am attempting to get the registry started before I start the web server - I have a main method that attempts to start the registry, get my service started, then when everything is set up and ready, start the web server. Regards, Geoff On 5/25/05, Achim Huegen wrote: > How do you initialise the registry? > Are you using the HivemindFilter? >=20 > Achim >=20 > Am Wed, 25 May 2005 19:47:05 +0100 schrieb Geoff Hopson : >=20 > > Hi, > > > > Probably a FAQ or I=B4ve done something dumb.... > > > > I have an application that starts an embedded Jetty server. However, I > > need a service to be started up and initialised before the web server > > starts up and is able to receive web service calls - lots of database > > initialisation, pre-fetching etc. I cannot do this on receipt of the > > first web service call, unfortunately. > > > > So, I saw eagerLoad and tried that. Nice. I can get my service set up > > and initialized before the web server starts. > > > > But, when the first request arrives, the service is initialised again! > > > > The first time, the service is initialised through the =B4Main=B4 threa= d. > > When Jetty starts up, the first request initializes my service from > > the =B4Listener-X=B4 thread (whichever one responds). Once that > > initialisation is done, no more occur (which is what I expect from the > > default singleton model). > > > > I guess I am loading the registry twice, but I have no idea why/how. > > > > Any clues? Any other techniques for pre-loading services other than > > eagerLoad? What do folks do with embedding Jetty and HiveMind in the > > same application? > > > > Thanks for any insights, > > Geoff > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org > > >=20 >=20 >=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