Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 1655 invoked from network); 16 Nov 2005 14:04:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Nov 2005 14:04:37 -0000 Received: (qmail 37029 invoked by uid 500); 16 Nov 2005 14:04:23 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 36831 invoked by uid 500); 16 Nov 2005 14:04:22 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 36819 invoked by uid 99); 16 Nov 2005 14:04:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2005 06:04:22 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [217.109.185.18] (HELO pinea.xerox.fr) (217.109.185.18) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2005 06:05:56 -0800 Received: from meije.grenoble.xrce.xerox.com (unknown [13.202.220.10]) by pinea.xerox.fr (Postfix) with ESMTP id EC262B89A for ; Wed, 16 Nov 2005 15:03:58 +0100 (CET) Received: from [13.202.220.175] (frugy.grenoble.xrce.xerox.com [13.202.220.175]) by meije.grenoble.xrce.xerox.com (8.13.1/8.13.1) with ESMTP id jAGE3xLc031998 for ; Wed, 16 Nov 2005 15:03:59 +0100 Message-ID: <437B3C4F.1000103@grenoble.xrce.xerox.com> Date: Wed, 16 Nov 2005 15:03:59 +0100 From: Michael Niemaz User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Users List Subject: Re: tomcat and wbs References: <4379C38F.7030307@grenoble.xrce.xerox.com> <4379EB70.5070500@hugsmidjan.is> <4379FFDE.2040301@grenoble.xrce.xerox.com> <437A09E4.3050303@hugsmidjan.is> In-Reply-To: <437A09E4.3050303@hugsmidjan.is> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi and thanx again. I played a lot with the listener and also the tag. Both lead me to this question: Is Axis keeping a reference of the according web service that I could reach? The reason is I can't instanciate 'yourService' from the listener because obscur reasons ;-) So I wonder if there was a getWebService/getServlet method, which obviously I did not find, or a kind of workaround to achieve the same goal? Thanx, --mike Reynir Hubner wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >hi, >you need to insert something like this : > > > com.your.package.YourContextListener > > > >your servlet class might look something like this : >import javax.servlet.*; > >public final class MyContextListener implements ServletContextListener >{ > private ServletContext context = null; > public void contextInitialized(ServletContextEvent event) { > this.context = event.getServletContext(); > yourService.start(); > } > public void contextDestroyed(ServletContextEvent event) { > this.context = null; > yourService.stop(); > } >} > > >hope it helps >- -reynir > > > > > >Michael Niemaz wrote: > > >>Thanx Reynir, it helps ... although I wouldn't mind if you could give me >>more details ;-) >>I have many web services that are initialised only when invoked the >>first time. >>I must admit that this init part looks a bit confused to me. >>Any example based on servlet or singleton would be very much appreciated >>;-) >> >>Thanx, >> >>--mike >> >>Reynir Hubner wrote: >> >>there are several implementations of webservices available. the one most >>successfull is axis from apache, you should read all about it on the >>axis website.. >>http://ws.apache.org/axis/ >> >>of course it dependes on what you are going to do, but starting some >>service at application-startup can be done via web.xml (of your >>application) either by a custom listener or servlet loading up your >>service, sometimes done by using a singleton. >> >>hope it helps >>-reynir >> >> >>Michael Niemaz wrote: >> >> >> >> >>>>>Hi all, >>>>> Could someone explain me or point me to an explanation of how tomcat >>>>>initialize web services? I'd like to initialize them automatically at >>>>>tomcat start-up instead of just before their invocation. >>>>> >>>>>Thanx, >>>>> >>>>>--mike >>>>> >>>>>--------------------------------------------------------------------- >>>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>>For additional commands, e-mail: users-help@tomcat.apache.org >>>>> >>>>> >>>>> >>>>> >>>>> >- --------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >For additional commands, e-mail: users-help@tomcat.apache.org > > >>> >>> > > > > > > >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>For additional commands, e-mail: users-help@tomcat.apache.org >> >> > > >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v1.2.5 (MingW32) >Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > >iD8DBQFDegnk19KgIQihNwgRAnOAAKCU3U9jaTj0swmjKQyesb/Suzn+fACgxRLS >D/gYAtomCIdqnmqZK201ULk= >=EdDB >-----END PGP SIGNATURE----- > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >For additional commands, e-mail: users-help@tomcat.apache.org > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org