Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 43517 invoked from network); 15 Sep 2006 15:17:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Sep 2006 15:17:07 -0000 Received: (qmail 56098 invoked by uid 500); 15 Sep 2006 15:17:03 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 55996 invoked by uid 500); 15 Sep 2006 15:17:02 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 55985 invoked by uid 99); 15 Sep 2006 15:17:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 08:17:02 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of rajith77@gmail.com designates 66.249.82.231 as permitted sender) Received: from [66.249.82.231] (HELO wx-out-0506.google.com) (66.249.82.231) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 08:16:52 -0700 Received: by wx-out-0506.google.com with SMTP id s8so3048313wxc for ; Fri, 15 Sep 2006 08:15:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=NN4YwQoFH1a6BkzkNlae3hEw7q/NwNK8Aujk0d9ku2Xe8ZW/oefahjY3z4NpL/KlyS3p9EHb/gICmb0GoKolhjmofKMjiRvS976jLCQ6c8Lqwwzd5dtnAiiotCrO2czV/vK0Z1UNgGmlvOVPjOZ5GDKrT/8fKJcUSN+6BIElUn0= Received: by 10.90.81.14 with SMTP id e14mr3847085agb; Fri, 15 Sep 2006 08:15:57 -0700 (PDT) Received: by 10.90.94.20 with HTTP; Fri, 15 Sep 2006 08:15:57 -0700 (PDT) Message-ID: Date: Fri, 15 Sep 2006 11:15:57 -0400 From: "Rajith Attapattu" To: axis-dev@ws.apache.org Subject: Re: Improvements to Service life cycle in handling In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_137433_18368227.1158333357053" References: <4509975F.9020205@opensource.lk> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_137433_18368227.1158333357053 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Robert, How is this going to affect the spring stuff. Especially how is this going to affect the way the appContext.xml is loaded= ? Regards, Rajith On 9/15/06, robert lazarski wrote: > > That makes sense to me. I've been using startUp() and it doesn't > really fit with the other methods of the interface in its current > form. +1 for 1.1 since its interface changes and it'd be better to do > it now. > > One question: Currently you need this in services.xml to get startUp() > to invoke: > > true > > I plan on testing this when its ready ... since the spring tutorial > depends on it ... so I thought I'd ask if the services.xml param will > remain the same. > > Thanks, > Robert > > On 9/14/06, Deepal Jayasinghe wrote: > > Hi All; > > > > Currently we have an interface called Service and which has few methods > > that are used to manage session (or else user can add those method into > > service impl class w.o implementing the interface). And that interface > > has the following methods ; > > > > - startUp > > - init > > - setOperationContext > > - destroy > > > > Three of them are for managing service life cycle ; > > - init =96 will be called when the session start > > - setOperationContext =96 immediately before calling actual java method > > - destroy =96 will be call when the session finishes > > > > Remember all those method work if and only if you use Axis2 default > > message receiver or you code gen. > > > > The method startUp is not session related method , which is useful when > > you want to initialize database connections , create thread etc ... at > > the time when you deploy the service. In the mean time interface name > > Service is bit confusing to me AFAIK it should be ServiceLifeCycle. And > > having method like startUp in that interface confuses the users. > > > > So how about the following changes ; > > - Rename Service interface into ServiceLifeCycle > > - Then remove startUp method from that interface. > > > > There should be a some other interface (like Module interface) and whic= h > > should be optional as well , to have the method startUp. If someone wan= t > > to open DB connection or anything at the time of service deploying , > > then he need to implement that interface (and for me which is identical > > to Module interface). So with this change service element inside the > > services.xml will be change to following > > > > > > ServiceClass > > > > > > Here the class attribute is optional , so if someone want to have > > loadonStartup feature then he need to implement the Service interface > > (new one) and put the impl name as the class attribute. This is very > > useful if your service implementation class is not java (if you are > > writing a groovy serice). > > > > So new Service interface will be look like follows; > > public interface Service{ > > //will be called when service is deployed > > public void startUp(ConfigurationContext configctx, AxisService > service); > > //will be called when Axis2 server showdown or when service removed fro= m > > the system > > public void shutDown(ConfigurationContext configctx, AxisService > service); > > } > > > > And ServiceLifeCycle interface will look like below; > > > > public interface ServiceLifeCycle { > > public void init(ServiceContext sc); > > public void setOperationContext(OperationContext operationContext); > > void destroy(ServiceContext sc); > > } > > > > > > I am +1 on doing this for Axis2 1.1 :) > > > > Suggestions ........ > > > > Thanks > > Deepal > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org > > For additional commands, e-mail: axis-dev-help@ws.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-dev-help@ws.apache.org > > ------=_Part_137433_18368227.1158333357053 Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Robert,

How is this going to affect the spring stuff.
Especially = how is this going to affect the way the appContext.xml is loaded?

Re= gards,

Rajith

On 9/15/06, robert lazarski <robertl= azarski@gmail.com> wrote:
That makes sense to me. I've been using startUp() and it doesn't
really = fit with the other methods of the interface in its current
form. +1 for = 1.1 since its interface changes and it'd be better to do
it now.

One question: Currently you need this in services.xml to get startUp()<= br>to invoke:

<parameter name=3D"load-on-startup" locke= d=3D"false">true</parameter>

I plan on testing th= is when its ready ... since the spring tutorial
depends on it ... so I thought I'd ask if the services.xml param willremain the same.

Thanks,
Robert

On 9/14/06, Deepal Jayas= inghe <deepal@opensource.lk > wrote:
> Hi All;
>
> Currently we have an interface = called Service and which has few methods
> that are used to manage se= ssion (or else user can add those method into
> service impl class=20 w.o implementing the interface). And that interface
> has the followi= ng methods ;
>
> - startUp
> - init
> - setOperatio= nContext
> - destroy
>
> Three of them are for managing s= ervice life cycle ;
> - init =96 will be called when the session start
> - setOper= ationContext =96 immediately before calling actual java method
> - de= stroy =96 will be call when the session finishes
>
> Remember a= ll those method work if and only if you use Axis2 default
> message receiver or you code gen.
>
> The method start= Up is not session related method , which is useful when
> you want to= initialize database connections , create thread etc ... at
> the tim= e when you deploy the service. In the mean time interface name
> Service is bit confusing to me AFAIK it should be ServiceLifeCycle= . And
> having method like startUp in that interface confuses the use= rs.
>
> So how about the following changes ;
> - Rename S= ervice interface into ServiceLifeCycle
> - Then remove startUp method from that interface.
>
> = There should be a some other interface (like Module interface) and which> should be optional as well , to have the method startUp. If someone w= ant
> to open DB connection or anything at the time of service deploying= ,
> then he need to implement that interface (and for me which is id= entical
> to Module interface). So with this change service element i= nside the
> services.xml will be change to following
>
> <servi= ce name=3D"foo" *class=3D"implementation class of the interf= ace "*>
> <parameter name=3D"ServiceClass">Se= rviceClass</parameter>
> </service>
>
> Here the class attribute is optio= nal , so if someone want to have
> loadonStartup feature then he need= to implement the Service interface
> (new one) and put the impl name= as the class attribute. This is very
> useful if your service implementation class is not java (if you ar= e
> writing a groovy serice).
>
> So new Service interfac= e will be look like follows;
> public interface Service{
> //wi= ll be called when service is deployed
> public void startUp(ConfigurationContext configctx, AxisService se= rvice);
> //will be called when Axis2 server showdown or when service= removed from
> the system
> public void shutDown(Configuration= Context configctx, AxisService service);
> }
>
> And ServiceLifeCycle interface will look like be= low;
>
> public interface ServiceLifeCycle {
> public voi= d init(ServiceContext sc);
> public void setOperationContext(Operatio= nContext operationContext);
> void destroy(ServiceContext sc);
> }
>
>
>= I am +1 on doing this for Axis2 1.1 :)
>
> Suggestions .......= .
>
> Thanks
> Deepal
>
>
>
> ---= ------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional c= ommands, e-mail: axis-dev-he= lp@ws.apache.org
>
>

-----------------------------------------------= ----------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For = additional commands, e-mail:=20 axis-dev-help@ws.apache.org<= /a>


------=_Part_137433_18368227.1158333357053--