You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Deepal Jayasinghe <de...@opensource.lk> on 2006/08/01 19:06:02 UTC

Re: [Axis] Load Web Service on Startup

I am not asking not to do this (I know this is a useful requirement),
but my problem is how do we solve this problem if service is deployed in
soapsession scope.
In that case we need to create new service instance for each soapsession
, so are we not in a problem ?

of course we can create service instance and init that when system start
(irrespective of its scope), let's say we add a new method to service
impl what are the parameters we need to pass into that ?

startUp(T1 t1, T2 t2){
  ?????????????
}


please comment on my questions , I need to solve those problem before
implementing this (then we can have this feature in Axis2 1.1)

-Deepal

Davanum Srinivas wrote:

> Tony,
>
> I am with you on this. There should be a way to do this.
>
> -- dims
>
> On 7/31/06, Tony Dean <To...@sas.com> wrote:
>
>> I will deploy my service in "application" scope because I want to
>> have only one instance of my service running.
>>
>> The idea of "load on startup" is the same principle used by a
>> servlet.  You set an option so that when the container starts your
>> application is also started.  Otherwise, your application is started
>> on demand when the first request is sent.  This will make the first
>> request slower than the rest.
>>
>> I can live with that, but why should we?
>>
>> -----Original Message-----
>> From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
>> Sent: Friday, July 28, 2006 12:04 PM
>> To: axis-dev@ws.apache.org
>> Subject: Re: [Axis] Load Web Service on Startup
>>
>> I think we are trying to make the simple thing harder by adding a
>> number of options, therefore  I am 0- on adding a new option.
>>
>> Let's say we agree to do this , when we initialize the service
>> implementation class what should we pass into that method ?  if the
>> answer is ServiceContext then we are going to have problems.
>>
>> btw I need to clarify one more thing (I think I am missing
>> something), do you want to deploy your service in scope other than
>> application and you want to have only one instance of service
>> implementation class ?
>>
>> Thanks
>> Deepal
>>
>>
>>
>> Tony Dean wrote:
>>
>> >I think users will want an option (load-on-startup=on|off) to either
>> load scope="application" services on container startup or upon the
>> first request.  I personally would want my service loaded and ready
>> to go before the first request is issued.  Users will certainly be
>> willing to take the hit waiting for the container to initialize
>> rather than during a real-time request.
>> >
>> >-Tony
>> >
>> >-----Original Message-----
>> >From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
>> >Sent: Friday, July 28, 2006 2:18 AM
>> >To: axis-user@ws.apache.org
>> >Subject: Re: [Axis] Load Web Service on Startup
>> >
>> >yes if you deploy the service in application scope , o.w when it get
>> the first request.
>> >
>> >Davanum Srinivas wrote:
>> >
>> >
>> >
>> >>Deepal,
>> >>
>> >>The question is: Do we call init(ServiceContext) when tomcat starts up
>> >>OR when we get the first request for that service.
>> >>
>> >>People want to do the latter, to avoid taking a hit (slow-ness) on the
>> >>first request.
>> >>
>> >>thanks,
>> >>dims
>> >>
>> >>On 7/28/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
>> >>
>> >>
>> >>
>> >>>In Axis2
>> >>>
>> >>>adding following method to serviceImpl class you can achieve you
>> >>>goal, so if you serviceimpl class look like ;
>> >>>
>> >>>public class Myservice{
>> >>>
>> >>>public void init(ServiceContext sc){
>> >>>// write initialization code here
>> >>>}
>> >>>
>> >>>}
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>Patel, Ronak (US SSA) wrote:
>> >>>
>> >>>
>> >>>
>> >>>>Hello All,
>> >>>>
>> >>>>I am interested in finding out how I can force Apache Axis to load
>> >>>>and run my Web Service (by calling it's init() method) when the Web
>> >>>>Server starts.
>> >>>>
>> >>>>Is there a configuration parameter that I need to set somewhere?
>> >>>>
>> >>>>I am interested in finding this out in both Axis2 and Axis1.x.
>> >>>>
>> >>>>Any help would be greatly appreciated.
>> >>>>
>> >>>>Ronak Patel
>> >>>>
>> >>>>Software Engineer
>> >>>>
>> >>>>BAE Systems CNIR
>> >>>>
>> >>>>450 Pulaski Road
>> >>>>
>> >>>>Greenlawn, NY 11740
>> >>>>
>> >>>>(631) 262 - 8230
>> >>>>
>> >>>>ronak.patel@baesystems.com <ma...@baesystems.com>
>> >>>>
>> >>>>
>> >>>>
>> >>>--
>> >>>Thanks,
>> >>>Deepal
>> >>>................................................................
>> >>>~Future is Open~
>> >>>
>> >>>
>> >>>
>> >>>---------------------------------------------------------------------
>> >>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >>>For additional commands, e-mail: axis-user-help@ws.apache.org
>> >>>
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >--
>> >Thanks,
>> >Deepal
>> >................................................................
>> >~Future is Open~
>> >
>> >
>> >
>> >---------------------------------------------------------------------
>> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >For additional commands, e-mail: axis-user-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
>> >
>> >
>> >
>> >
>> >
>>
>> -- 
>> Thanks,
>> Deepal
>> ................................................................
>> ~Future is Open~
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis] Load Web Service on Startup

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Dims;

Sorry for my previous mail  :'(  , I double checked and realized that
there is no any cyclic dependencies between context and configurations
and you only keep reference to configurationContext in DeploymentEngine.
That is ok with me  :) 

Thanks
Deepal




Deepal Jayasinghe wrote:

>Hi Dims;
>
>I am sorry but I am not happy with your change , the idea of
>configuration (AxisConfiguration ) is to create multiple context using
>that (that was the initial idea when we develop axis2), so practically
>one can create multiple configurationCocntexts using one
>AxisConfiguration. And AxisConfiguration does not know any thing about
>context (only configurationConetxt knows about AxisConfiuration), and I
>love to keep that , it is very useful for clustered environment. Keeping
>cyclic reference (ConfigurationContext <--> AxisConfiguration) may break
>that flexibility.
>
>To achieve your goal (service initialization) we have some other work
>around  , you can uss the technique that I have used for application
>scope service (see ConfigurationContextFactory)
>
>comments ?????????????
>
>Thanks
>Deepal
>
>Davanum Srinivas wrote:
>
>  
>
>>Deepal,
>>
>>I worked on this a bit today, With svn rev 428234, check the
>>DeploymentEngine, you now have access to ConfigurationContext. Can you
>>please take it from here?
>>
>>thanks,
>>dims
>>
>>On 8/2/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
>>
>>    
>>
>>>Hi Dims;
>>>
>>>When you deploy a service , deploymentEngine does not have access to
>>>configuration context (it has only access to AxisConfiguration). Any way
>>>we have a work  around for the services at the system startup time , but
>>>if some one drop a service at the runtime (service hot deployment) ,
>>>then we can not call that method since there is no way to get access to
>>>configuration context from AxisConfiguratation.
>>>
>>>So is that ok if we give this feature only for service which are in the
>>>repository when system startup ?
>>>
>>>Thanks
>>>Deepal
>>>
>>>
>>>
>>>Davanum Srinivas wrote:
>>>
>>>      
>>>
>>>>Deepal,
>>>>
>>>>I'd say it should be the following because there is no ServiceContext
>>>>or MessageContext setup at startup time.
>>>>
>>>>init(ConfigurationContext)
>>>>
>>>>This is similar to servlets if you specify load-on-startup then
>>>>"init(ServletConfig config)" is called.
>>>>
>>>>This would be a one time call only irrespective of scope. What do you
>>>>think?
>>>>
>>>>-- dims
>>>>
>>>>On 8/1/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
>>>>
>>>>        
>>>>
>>>>>I am not asking not to do this (I know this is a useful requirement),
>>>>>but my problem is how do we solve this problem if service is
>>>>>          
>>>>>
>>>deployed in
>>>      
>>>
>>>>>soapsession scope.
>>>>>In that case we need to create new service instance for each
>>>>>          
>>>>>
>>>soapsession
>>>      
>>>
>>>>>, so are we not in a problem ?
>>>>>
>>>>>of course we can create service instance and init that when system
>>>>>          
>>>>>
>>>start
>>>      
>>>
>>>>>(irrespective of its scope), let's say we add a new method to service
>>>>>impl what are the parameters we need to pass into that ?
>>>>>
>>>>>startUp(T1 t1, T2 t2){
>>>>>  ?????????????
>>>>>}
>>>>>
>>>>>
>>>>>please comment on my questions , I need to solve those problem before
>>>>>implementing this (then we can have this feature in Axis2 1.1)
>>>>>
>>>>>-Deepal
>>>>>
>>>>>Davanum Srinivas wrote:
>>>>>
>>>>>          
>>>>>
>>>>>>Tony,
>>>>>>
>>>>>>I am with you on this. There should be a way to do this.
>>>>>>
>>>>>>-- dims
>>>>>>
>>>>>>On 7/31/06, Tony Dean <To...@sas.com> wrote:
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>I will deploy my service in "application" scope because I want to
>>>>>>>have only one instance of my service running.
>>>>>>>
>>>>>>>The idea of "load on startup" is the same principle used by a
>>>>>>>servlet.  You set an option so that when the container starts your
>>>>>>>application is also started.  Otherwise, your application is
>>>>>>>              
>>>>>>>
>>>started
>>>      
>>>
>>>>>>>on demand when the first request is sent.  This will make the
>>>>>>>              
>>>>>>>
>>>first
>>>      
>>>
>>>>>>>request slower than the rest.
>>>>>>>
>>>>>>>I can live with that, but why should we?
>>>>>>>
>>>>>>>-----Original Message-----
>>>>>>>From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
>>>>>>>Sent: Friday, July 28, 2006 12:04 PM
>>>>>>>To: axis-dev@ws.apache.org
>>>>>>>Subject: Re: [Axis] Load Web Service on Startup
>>>>>>>
>>>>>>>I think we are trying to make the simple thing harder by adding a
>>>>>>>number of options, therefore  I am 0- on adding a new option.
>>>>>>>
>>>>>>>Let's say we agree to do this , when we initialize the service
>>>>>>>implementation class what should we pass into that method ?  if
>>>>>>>              
>>>>>>>
>>>the
>>>      
>>>
>>>>>>>answer is ServiceContext then we are going to have problems.
>>>>>>>
>>>>>>>btw I need to clarify one more thing (I think I am missing
>>>>>>>something), do you want to deploy your service in scope other than
>>>>>>>application and you want to have only one instance of service
>>>>>>>implementation class ?
>>>>>>>
>>>>>>>Thanks
>>>>>>>Deepal
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Tony Dean wrote:
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>I think users will want an option (load-on-startup=on|off) to
>>>>>>>>                
>>>>>>>>
>>>either
>>>      
>>>
>>>>>>>load scope="application" services on container startup or upon the
>>>>>>>first request.  I personally would want my service loaded and
>>>>>>>              
>>>>>>>
>>>ready
>>>      
>>>
>>>>>>>to go before the first request is issued.  Users will certainly be
>>>>>>>willing to take the hit waiting for the container to initialize
>>>>>>>rather than during a real-time request.
>>>>>>>              
>>>>>>>
>>>>>>>>-Tony
>>>>>>>>
>>>>>>>>-----Original Message-----
>>>>>>>>From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
>>>>>>>>Sent: Friday, July 28, 2006 2:18 AM
>>>>>>>>To: axis-user@ws.apache.org
>>>>>>>>Subject: Re: [Axis] Load Web Service on Startup
>>>>>>>>
>>>>>>>>yes if you deploy the service in application scope , o.w when
>>>>>>>>                
>>>>>>>>
>>>it get
>>>      
>>>
>>>>>>>the first request.
>>>>>>>              
>>>>>>>
>>>>>>>>Davanum Srinivas wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>>>Deepal,
>>>>>>>>>
>>>>>>>>>The question is: Do we call init(ServiceContext) when tomcat
>>>>>>>>>                  
>>>>>>>>>
>>>>>starts up
>>>>>          
>>>>>
>>>>>>>>>OR when we get the first request for that service.
>>>>>>>>>
>>>>>>>>>People want to do the latter, to avoid taking a hit (slow-ness)
>>>>>>>>>                  
>>>>>>>>>
>>>>>on the
>>>>>          
>>>>>
>>>>>>>>>first request.
>>>>>>>>>
>>>>>>>>>thanks,
>>>>>>>>>dims
>>>>>>>>>
>>>>>>>>>On 7/28/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>In Axis2
>>>>>>>>>>
>>>>>>>>>>adding following method to serviceImpl class you can achieve
>>>>>>>>>>                    
>>>>>>>>>>
>>>you
>>>      
>>>
>>>>>>>>>>goal, so if you serviceimpl class look like ;
>>>>>>>>>>
>>>>>>>>>>public class Myservice{
>>>>>>>>>>
>>>>>>>>>>public void init(ServiceContext sc){
>>>>>>>>>>// write initialization code here
>>>>>>>>>>}
>>>>>>>>>>
>>>>>>>>>>}
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>Patel, Ronak (US SSA) wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>>>Hello All,
>>>>>>>>>>>
>>>>>>>>>>>I am interested in finding out how I can force Apache Axis to
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>load
>>>>>          
>>>>>
>>>>>>>>>>>and run my Web Service (by calling it's init() method) when
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>the Web
>>>>>          
>>>>>
>>>>>>>>>>>Server starts.
>>>>>>>>>>>
>>>>>>>>>>>Is there a configuration parameter that I need to set
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>somewhere?
>>>      
>>>
>>>>>>>>>>>I am interested in finding this out in both Axis2 and Axis1.x.
>>>>>>>>>>>
>>>>>>>>>>>Any help would be greatly appreciated.
>>>>>>>>>>>
>>>>>>>>>>>Ronak Patel
>>>>>>>>>>>
>>>>>>>>>>>Software Engineer
>>>>>>>>>>>
>>>>>>>>>>>BAE Systems CNIR
>>>>>>>>>>>
>>>>>>>>>>>450 Pulaski Road
>>>>>>>>>>>
>>>>>>>>>>>Greenlawn, NY 11740
>>>>>>>>>>>
>>>>>>>>>>>(631) 262 - 8230
>>>>>>>>>>>
>>>>>>>>>>>ronak.patel@baesystems.com <ma...@baesystems.com>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>--
>>>>>>>>>>Thanks,
>>>>>>>>>>Deepal
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>................................................................
>>>>>>            
>>>>>>
>>>>>>>>>>~Future is Open~
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>            
>>>>>>
>>>>>>>>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>>>>>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>--
>>>>>>>>Thanks,
>>>>>>>>Deepal
>>>>>>>>................................................................
>>>>>>>>~Future is Open~
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>---------------------------------------------------------------------
>>>>        
>>>>
>>>>>>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>>>>>>For additional commands, e-mail: axis-user-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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>--
>>>>>>>Thanks,
>>>>>>>Deepal
>>>>>>>................................................................
>>>>>>>~Future is Open~
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>---------------------------------------------------------------------
>>>      
>>>
>>>>>>>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
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>>>>>For additional commands, e-mail: axis-dev-help@ws.apache.org
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>        
>>>>
>>>-- 
>>>Thanks,
>>>Deepal
>>>................................................................
>>>~Future is Open~
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: axis-dev-help@ws.apache.org
>>>
>>>
>>>      
>>>
>>    
>>
>
>  
>


-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis] Load Web Service on Startup

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Dims;

I am sorry but I am not happy with your change , the idea of
configuration (AxisConfiguration ) is to create multiple context using
that (that was the initial idea when we develop axis2), so practically
one can create multiple configurationCocntexts using one
AxisConfiguration. And AxisConfiguration does not know any thing about
context (only configurationConetxt knows about AxisConfiuration), and I
love to keep that , it is very useful for clustered environment. Keeping
cyclic reference (ConfigurationContext <--> AxisConfiguration) may break
that flexibility.

To achieve your goal (service initialization) we have some other work
around  , you can uss the technique that I have used for application
scope service (see ConfigurationContextFactory)

comments ?????????????

Thanks
Deepal

Davanum Srinivas wrote:

> Deepal,
>
> I worked on this a bit today, With svn rev 428234, check the
> DeploymentEngine, you now have access to ConfigurationContext. Can you
> please take it from here?
>
> thanks,
> dims
>
> On 8/2/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
>
>> Hi Dims;
>>
>> When you deploy a service , deploymentEngine does not have access to
>> configuration context (it has only access to AxisConfiguration). Any way
>> we have a work  around for the services at the system startup time , but
>> if some one drop a service at the runtime (service hot deployment) ,
>> then we can not call that method since there is no way to get access to
>> configuration context from AxisConfiguratation.
>>
>> So is that ok if we give this feature only for service which are in the
>> repository when system startup ?
>>
>> Thanks
>> Deepal
>>
>>
>>
>> Davanum Srinivas wrote:
>>
>> > Deepal,
>> >
>> > I'd say it should be the following because there is no ServiceContext
>> > or MessageContext setup at startup time.
>> >
>> > init(ConfigurationContext)
>> >
>> > This is similar to servlets if you specify load-on-startup then
>> > "init(ServletConfig config)" is called.
>> >
>> > This would be a one time call only irrespective of scope. What do you
>> > think?
>> >
>> > -- dims
>> >
>> > On 8/1/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
>> >
>> >> I am not asking not to do this (I know this is a useful requirement),
>> >> but my problem is how do we solve this problem if service is
>> deployed in
>> >> soapsession scope.
>> >> In that case we need to create new service instance for each
>> soapsession
>> >> , so are we not in a problem ?
>> >>
>> >> of course we can create service instance and init that when system
>> start
>> >> (irrespective of its scope), let's say we add a new method to service
>> >> impl what are the parameters we need to pass into that ?
>> >>
>> >> startUp(T1 t1, T2 t2){
>> >>   ?????????????
>> >> }
>> >>
>> >>
>> >> please comment on my questions , I need to solve those problem before
>> >> implementing this (then we can have this feature in Axis2 1.1)
>> >>
>> >> -Deepal
>> >>
>> >> Davanum Srinivas wrote:
>> >>
>> >> > Tony,
>> >> >
>> >> > I am with you on this. There should be a way to do this.
>> >> >
>> >> > -- dims
>> >> >
>> >> > On 7/31/06, Tony Dean <To...@sas.com> wrote:
>> >> >
>> >> >> I will deploy my service in "application" scope because I want to
>> >> >> have only one instance of my service running.
>> >> >>
>> >> >> The idea of "load on startup" is the same principle used by a
>> >> >> servlet.  You set an option so that when the container starts your
>> >> >> application is also started.  Otherwise, your application is
>> started
>> >> >> on demand when the first request is sent.  This will make the
>> first
>> >> >> request slower than the rest.
>> >> >>
>> >> >> I can live with that, but why should we?
>> >> >>
>> >> >> -----Original Message-----
>> >> >> From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
>> >> >> Sent: Friday, July 28, 2006 12:04 PM
>> >> >> To: axis-dev@ws.apache.org
>> >> >> Subject: Re: [Axis] Load Web Service on Startup
>> >> >>
>> >> >> I think we are trying to make the simple thing harder by adding a
>> >> >> number of options, therefore  I am 0- on adding a new option.
>> >> >>
>> >> >> Let's say we agree to do this , when we initialize the service
>> >> >> implementation class what should we pass into that method ?  if
>> the
>> >> >> answer is ServiceContext then we are going to have problems.
>> >> >>
>> >> >> btw I need to clarify one more thing (I think I am missing
>> >> >> something), do you want to deploy your service in scope other than
>> >> >> application and you want to have only one instance of service
>> >> >> implementation class ?
>> >> >>
>> >> >> Thanks
>> >> >> Deepal
>> >> >>
>> >> >>
>> >> >>
>> >> >> Tony Dean wrote:
>> >> >>
>> >> >> >I think users will want an option (load-on-startup=on|off) to
>> either
>> >> >> load scope="application" services on container startup or upon the
>> >> >> first request.  I personally would want my service loaded and
>> ready
>> >> >> to go before the first request is issued.  Users will certainly be
>> >> >> willing to take the hit waiting for the container to initialize
>> >> >> rather than during a real-time request.
>> >> >> >
>> >> >> >-Tony
>> >> >> >
>> >> >> >-----Original Message-----
>> >> >> >From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
>> >> >> >Sent: Friday, July 28, 2006 2:18 AM
>> >> >> >To: axis-user@ws.apache.org
>> >> >> >Subject: Re: [Axis] Load Web Service on Startup
>> >> >> >
>> >> >> >yes if you deploy the service in application scope , o.w when
>> it get
>> >> >> the first request.
>> >> >> >
>> >> >> >Davanum Srinivas wrote:
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >>Deepal,
>> >> >> >>
>> >> >> >>The question is: Do we call init(ServiceContext) when tomcat
>> >> starts up
>> >> >> >>OR when we get the first request for that service.
>> >> >> >>
>> >> >> >>People want to do the latter, to avoid taking a hit (slow-ness)
>> >> on the
>> >> >> >>first request.
>> >> >> >>
>> >> >> >>thanks,
>> >> >> >>dims
>> >> >> >>
>> >> >> >>On 7/28/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>>In Axis2
>> >> >> >>>
>> >> >> >>>adding following method to serviceImpl class you can achieve
>> you
>> >> >> >>>goal, so if you serviceimpl class look like ;
>> >> >> >>>
>> >> >> >>>public class Myservice{
>> >> >> >>>
>> >> >> >>>public void init(ServiceContext sc){
>> >> >> >>>// write initialization code here
>> >> >> >>>}
>> >> >> >>>
>> >> >> >>>}
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>Patel, Ronak (US SSA) wrote:
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>>Hello All,
>> >> >> >>>>
>> >> >> >>>>I am interested in finding out how I can force Apache Axis to
>> >> load
>> >> >> >>>>and run my Web Service (by calling it's init() method) when
>> >> the Web
>> >> >> >>>>Server starts.
>> >> >> >>>>
>> >> >> >>>>Is there a configuration parameter that I need to set
>> somewhere?
>> >> >> >>>>
>> >> >> >>>>I am interested in finding this out in both Axis2 and Axis1.x.
>> >> >> >>>>
>> >> >> >>>>Any help would be greatly appreciated.
>> >> >> >>>>
>> >> >> >>>>Ronak Patel
>> >> >> >>>>
>> >> >> >>>>Software Engineer
>> >> >> >>>>
>> >> >> >>>>BAE Systems CNIR
>> >> >> >>>>
>> >> >> >>>>450 Pulaski Road
>> >> >> >>>>
>> >> >> >>>>Greenlawn, NY 11740
>> >> >> >>>>
>> >> >> >>>>(631) 262 - 8230
>> >> >> >>>>
>> >> >> >>>>ronak.patel@baesystems.com <ma...@baesystems.com>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>--
>> >> >> >>>Thanks,
>> >> >> >>>Deepal
>> >> >>
>> >>>................................................................
>> >> >> >>>~Future is Open~
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >>
>> >>
>> >>>---------------------------------------------------------------------
>> >> >> >>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >> >> >>>For additional commands, e-mail: axis-user-help@ws.apache.org
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >--
>> >> >> >Thanks,
>> >> >> >Deepal
>> >> >> >................................................................
>> >> >> >~Future is Open~
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >>
>> >---------------------------------------------------------------------
>> >> >> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >> >> >For additional commands, e-mail: axis-user-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
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> Thanks,
>> >> >> Deepal
>> >> >> ................................................................
>> >> >> ~Future is Open~
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> 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
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>> >> For additional commands, e-mail: axis-dev-help@ws.apache.org
>> >>
>> >>
>> >
>> >
>>
>> -- 
>> Thanks,
>> Deepal
>> ................................................................
>> ~Future is Open~
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-dev-help@ws.apache.org
>>
>>
>
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis] Load Web Service on Startup

Posted by Rajith Attapattu <ra...@gmail.com>.
Deepal,

What is the work around u mentioned in your email for services that are
present in the repository during startup ?

Can you please cross post your reply to the user list as well since I got a
querry from a person who needs to exactly what we are talking about.
Looks like a lot of people want an init method to load their classes to
avoid a performance hit on the very first invocation.

Regards,

Rajith

On 8/14/06, robert lazarski <ro...@gmail.com> wrote:
>
> Was there any progress on this? I ask because I'm trying to test the
> TCCL changes dims made with Spring, and I somehow need a way to load
> Spring's applicationContext.xml inside an AAR on startup. I can't
> think of another way to do that - besides modules - so any advice is
> appreciated.
>
> Robert
> http://www.braziloutsource.com/
>
> On 8/3/06, Davanum Srinivas <da...@gmail.com> wrote:
> > Deepal,
> >
> > I worked on this a bit today, With svn rev 428234, check the
> > DeploymentEngine, you now have access to ConfigurationContext. Can you
> > please take it from here?
> >
> > thanks,
> > dims
> >
> > On 8/2/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> > > Hi Dims;
> > >
> > > When you deploy a service , deploymentEngine does not have access to
> > > configuration context (it has only access to AxisConfiguration). Any
> way
> > > we have a work  around for the services at the system startup time ,
> but
> > > if some one drop a service at the runtime (service hot deployment) ,
> > > then we can not call that method since there is no way to get access
> to
> > > configuration context from AxisConfiguratation.
> > >
> > > So is that ok if we give this feature only for service which are in
> the
> > > repository when system startup ?
> > >
> > > Thanks
> > > Deepal
> > >
> > >
> > >
> > > Davanum Srinivas wrote:
> > >
> > > > Deepal,
> > > >
> > > > I'd say it should be the following because there is no
> ServiceContext
> > > > or MessageContext setup at startup time.
> > > >
> > > > init(ConfigurationContext)
> > > >
> > > > This is similar to servlets if you specify load-on-startup then
> > > > "init(ServletConfig config)" is called.
> > > >
> > > > This would be a one time call only irrespective of scope. What do
> you
> > > > think?
> > > >
> > > > -- dims
> > > >
> > > > On 8/1/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> > > >
> > > >> I am not asking not to do this (I know this is a useful
> requirement),
> > > >> but my problem is how do we solve this problem if service is
> deployed in
> > > >> soapsession scope.
> > > >> In that case we need to create new service instance for each
> soapsession
> > > >> , so are we not in a problem ?
> > > >>
> > > >> of course we can create service instance and init that when system
> start
> > > >> (irrespective of its scope), let's say we add a new method to
> service
> > > >> impl what are the parameters we need to pass into that ?
> > > >>
> > > >> startUp(T1 t1, T2 t2){
> > > >>   ?????????????
> > > >> }
> > > >>
> > > >>
> > > >> please comment on my questions , I need to solve those problem
> before
> > > >> implementing this (then we can have this feature in Axis2 1.1)
> > > >>
> > > >> -Deepal
> > > >>
> > > >> Davanum Srinivas wrote:
> > > >>
> > > >> > Tony,
> > > >> >
> > > >> > I am with you on this. There should be a way to do this.
> > > >> >
> > > >> > -- dims
> > > >> >
> > > >> > On 7/31/06, Tony Dean <To...@sas.com> wrote:
> > > >> >
> > > >> >> I will deploy my service in "application" scope because I want
> to
> > > >> >> have only one instance of my service running.
> > > >> >>
> > > >> >> The idea of "load on startup" is the same principle used by a
> > > >> >> servlet.  You set an option so that when the container starts
> your
> > > >> >> application is also started.  Otherwise, your application is
> started
> > > >> >> on demand when the first request is sent.  This will make the
> first
> > > >> >> request slower than the rest.
> > > >> >>
> > > >> >> I can live with that, but why should we?
> > > >> >>
> > > >> >> -----Original Message-----
> > > >> >> From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
> > > >> >> Sent: Friday, July 28, 2006 12:04 PM
> > > >> >> To: axis-dev@ws.apache.org
> > > >> >> Subject: Re: [Axis] Load Web Service on Startup
> > > >> >>
> > > >> >> I think we are trying to make the simple thing harder by adding
> a
> > > >> >> number of options, therefore  I am 0- on adding a new option.
> > > >> >>
> > > >> >> Let's say we agree to do this , when we initialize the service
> > > >> >> implementation class what should we pass into that method ?  if
> the
> > > >> >> answer is ServiceContext then we are going to have problems.
> > > >> >>
> > > >> >> btw I need to clarify one more thing (I think I am missing
> > > >> >> something), do you want to deploy your service in scope other
> than
> > > >> >> application and you want to have only one instance of service
> > > >> >> implementation class ?
> > > >> >>
> > > >> >> Thanks
> > > >> >> Deepal
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >> Tony Dean wrote:
> > > >> >>
> > > >> >> >I think users will want an option (load-on-startup=on|off) to
> either
> > > >> >> load scope="application" services on container startup or upon
> the
> > > >> >> first request.  I personally would want my service loaded and
> ready
> > > >> >> to go before the first request is issued.  Users will certainly
> be
> > > >> >> willing to take the hit waiting for the container to initialize
> > > >> >> rather than during a real-time request.
> > > >> >> >
> > > >> >> >-Tony
> > > >> >> >
> > > >> >> >-----Original Message-----
> > > >> >> >From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
> > > >> >> >Sent: Friday, July 28, 2006 2:18 AM
> > > >> >> >To: axis-user@ws.apache.org
> > > >> >> >Subject: Re: [Axis] Load Web Service on Startup
> > > >> >> >
> > > >> >> >yes if you deploy the service in application scope , o.w when
> it get
> > > >> >> the first request.
> > > >> >> >
> > > >> >> >Davanum Srinivas wrote:
> > > >> >> >
> > > >> >> >
> > > >> >> >
> > > >> >> >>Deepal,
> > > >> >> >>
> > > >> >> >>The question is: Do we call init(ServiceContext) when tomcat
> > > >> starts up
> > > >> >> >>OR when we get the first request for that service.
> > > >> >> >>
> > > >> >> >>People want to do the latter, to avoid taking a hit
> (slow-ness)
> > > >> on the
> > > >> >> >>first request.
> > > >> >> >>
> > > >> >> >>thanks,
> > > >> >> >>dims
> > > >> >> >>
> > > >> >> >>On 7/28/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> > > >> >> >>
> > > >> >> >>
> > > >> >> >>
> > > >> >> >>>In Axis2
> > > >> >> >>>
> > > >> >> >>>adding following method to serviceImpl class you can achieve
> you
> > > >> >> >>>goal, so if you serviceimpl class look like ;
> > > >> >> >>>
> > > >> >> >>>public class Myservice{
> > > >> >> >>>
> > > >> >> >>>public void init(ServiceContext sc){
> > > >> >> >>>// write initialization code here
> > > >> >> >>>}
> > > >> >> >>>
> > > >> >> >>>}
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>Patel, Ronak (US SSA) wrote:
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>>Hello All,
> > > >> >> >>>>
> > > >> >> >>>>I am interested in finding out how I can force Apache Axis
> to
> > > >> load
> > > >> >> >>>>and run my Web Service (by calling it's init() method) when
> > > >> the Web
> > > >> >> >>>>Server starts.
> > > >> >> >>>>
> > > >> >> >>>>Is there a configuration parameter that I need to set
> somewhere?
> > > >> >> >>>>
> > > >> >> >>>>I am interested in finding this out in both Axis2 and
> Axis1.x.
> > > >> >> >>>>
> > > >> >> >>>>Any help would be greatly appreciated.
> > > >> >> >>>>
> > > >> >> >>>>Ronak Patel
> > > >> >> >>>>
> > > >> >> >>>>Software Engineer
> > > >> >> >>>>
> > > >> >> >>>>BAE Systems CNIR
> > > >> >> >>>>
> > > >> >> >>>>450 Pulaski Road
> > > >> >> >>>>
> > > >> >> >>>>Greenlawn, NY 11740
> > > >> >> >>>>
> > > >> >> >>>>(631) 262 - 8230
> > > >> >> >>>>
> > > >> >> >>>>ronak.patel@baesystems.com <mailto:
> ronak.patel@baesystems.com>
> > > >> >> >>>>
> > > >> >> >>>>
> > > >> >> >>>>
> > > >> >> >>>--
> > > >> >> >>>Thanks,
> > > >> >> >>>Deepal
> > > >> >>
> >>>................................................................
> > > >> >> >>>~Future is Open~
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >>
> > > >>
> >>>---------------------------------------------------------------------
> > > >> >> >>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > >> >> >>>For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>
> > > >> >> >>
> > > >> >> >
> > > >> >> >--
> > > >> >> >Thanks,
> > > >> >> >Deepal
> > > >> >>
> >................................................................
> > > >> >> >~Future is Open~
> > > >> >> >
> > > >> >> >
> > > >> >> >
> > > >> >>
> > > >>
> >---------------------------------------------------------------------
> > > >> >> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > >> >> >For additional commands, e-mail: axis-user-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
> > > >> >> >
> > > >> >> >
> > > >> >> >
> > > >> >> >
> > > >> >> >
> > > >> >>
> > > >> >> --
> > > >> >> Thanks,
> > > >> >> Deepal
> > > >> >> ................................................................
> > > >> >> ~Future is Open~
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>
> ---------------------------------------------------------------------
> > > >> >> 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
> > > >> >>
> > > >> >>
> > > >>
> > > >>
> > > >>
> > > >>
> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > > >> For additional commands, e-mail: axis-dev-help@ws.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > >
> > > --
> > > Thanks,
> > > Deepal
> > > ................................................................
> > > ~Future is Open~
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service
> Developers)
> >
> > ---------------------------------------------------------------------
> > 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
>
>

Re: [Axis] Load Web Service on Startup

Posted by robert lazarski <ro...@gmail.com>.
Was there any progress on this? I ask because I'm trying to test the
TCCL changes dims made with Spring, and I somehow need a way to load
Spring's applicationContext.xml inside an AAR on startup. I can't
think of another way to do that - besides modules - so any advice is
appreciated.

Robert
http://www.braziloutsource.com/

On 8/3/06, Davanum Srinivas <da...@gmail.com> wrote:
> Deepal,
>
> I worked on this a bit today, With svn rev 428234, check the
> DeploymentEngine, you now have access to ConfigurationContext. Can you
> please take it from here?
>
> thanks,
> dims
>
> On 8/2/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> > Hi Dims;
> >
> > When you deploy a service , deploymentEngine does not have access to
> > configuration context (it has only access to AxisConfiguration). Any way
> > we have a work  around for the services at the system startup time , but
> > if some one drop a service at the runtime (service hot deployment) ,
> > then we can not call that method since there is no way to get access to
> > configuration context from AxisConfiguratation.
> >
> > So is that ok if we give this feature only for service which are in the
> > repository when system startup ?
> >
> > Thanks
> > Deepal
> >
> >
> >
> > Davanum Srinivas wrote:
> >
> > > Deepal,
> > >
> > > I'd say it should be the following because there is no ServiceContext
> > > or MessageContext setup at startup time.
> > >
> > > init(ConfigurationContext)
> > >
> > > This is similar to servlets if you specify load-on-startup then
> > > "init(ServletConfig config)" is called.
> > >
> > > This would be a one time call only irrespective of scope. What do you
> > > think?
> > >
> > > -- dims
> > >
> > > On 8/1/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> > >
> > >> I am not asking not to do this (I know this is a useful requirement),
> > >> but my problem is how do we solve this problem if service is deployed in
> > >> soapsession scope.
> > >> In that case we need to create new service instance for each soapsession
> > >> , so are we not in a problem ?
> > >>
> > >> of course we can create service instance and init that when system start
> > >> (irrespective of its scope), let's say we add a new method to service
> > >> impl what are the parameters we need to pass into that ?
> > >>
> > >> startUp(T1 t1, T2 t2){
> > >>   ?????????????
> > >> }
> > >>
> > >>
> > >> please comment on my questions , I need to solve those problem before
> > >> implementing this (then we can have this feature in Axis2 1.1)
> > >>
> > >> -Deepal
> > >>
> > >> Davanum Srinivas wrote:
> > >>
> > >> > Tony,
> > >> >
> > >> > I am with you on this. There should be a way to do this.
> > >> >
> > >> > -- dims
> > >> >
> > >> > On 7/31/06, Tony Dean <To...@sas.com> wrote:
> > >> >
> > >> >> I will deploy my service in "application" scope because I want to
> > >> >> have only one instance of my service running.
> > >> >>
> > >> >> The idea of "load on startup" is the same principle used by a
> > >> >> servlet.  You set an option so that when the container starts your
> > >> >> application is also started.  Otherwise, your application is started
> > >> >> on demand when the first request is sent.  This will make the first
> > >> >> request slower than the rest.
> > >> >>
> > >> >> I can live with that, but why should we?
> > >> >>
> > >> >> -----Original Message-----
> > >> >> From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
> > >> >> Sent: Friday, July 28, 2006 12:04 PM
> > >> >> To: axis-dev@ws.apache.org
> > >> >> Subject: Re: [Axis] Load Web Service on Startup
> > >> >>
> > >> >> I think we are trying to make the simple thing harder by adding a
> > >> >> number of options, therefore  I am 0- on adding a new option.
> > >> >>
> > >> >> Let's say we agree to do this , when we initialize the service
> > >> >> implementation class what should we pass into that method ?  if the
> > >> >> answer is ServiceContext then we are going to have problems.
> > >> >>
> > >> >> btw I need to clarify one more thing (I think I am missing
> > >> >> something), do you want to deploy your service in scope other than
> > >> >> application and you want to have only one instance of service
> > >> >> implementation class ?
> > >> >>
> > >> >> Thanks
> > >> >> Deepal
> > >> >>
> > >> >>
> > >> >>
> > >> >> Tony Dean wrote:
> > >> >>
> > >> >> >I think users will want an option (load-on-startup=on|off) to either
> > >> >> load scope="application" services on container startup or upon the
> > >> >> first request.  I personally would want my service loaded and ready
> > >> >> to go before the first request is issued.  Users will certainly be
> > >> >> willing to take the hit waiting for the container to initialize
> > >> >> rather than during a real-time request.
> > >> >> >
> > >> >> >-Tony
> > >> >> >
> > >> >> >-----Original Message-----
> > >> >> >From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
> > >> >> >Sent: Friday, July 28, 2006 2:18 AM
> > >> >> >To: axis-user@ws.apache.org
> > >> >> >Subject: Re: [Axis] Load Web Service on Startup
> > >> >> >
> > >> >> >yes if you deploy the service in application scope , o.w when it get
> > >> >> the first request.
> > >> >> >
> > >> >> >Davanum Srinivas wrote:
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >>Deepal,
> > >> >> >>
> > >> >> >>The question is: Do we call init(ServiceContext) when tomcat
> > >> starts up
> > >> >> >>OR when we get the first request for that service.
> > >> >> >>
> > >> >> >>People want to do the latter, to avoid taking a hit (slow-ness)
> > >> on the
> > >> >> >>first request.
> > >> >> >>
> > >> >> >>thanks,
> > >> >> >>dims
> > >> >> >>
> > >> >> >>On 7/28/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> > >> >> >>
> > >> >> >>
> > >> >> >>
> > >> >> >>>In Axis2
> > >> >> >>>
> > >> >> >>>adding following method to serviceImpl class you can achieve you
> > >> >> >>>goal, so if you serviceimpl class look like ;
> > >> >> >>>
> > >> >> >>>public class Myservice{
> > >> >> >>>
> > >> >> >>>public void init(ServiceContext sc){
> > >> >> >>>// write initialization code here
> > >> >> >>>}
> > >> >> >>>
> > >> >> >>>}
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>Patel, Ronak (US SSA) wrote:
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>>Hello All,
> > >> >> >>>>
> > >> >> >>>>I am interested in finding out how I can force Apache Axis to
> > >> load
> > >> >> >>>>and run my Web Service (by calling it's init() method) when
> > >> the Web
> > >> >> >>>>Server starts.
> > >> >> >>>>
> > >> >> >>>>Is there a configuration parameter that I need to set somewhere?
> > >> >> >>>>
> > >> >> >>>>I am interested in finding this out in both Axis2 and Axis1.x.
> > >> >> >>>>
> > >> >> >>>>Any help would be greatly appreciated.
> > >> >> >>>>
> > >> >> >>>>Ronak Patel
> > >> >> >>>>
> > >> >> >>>>Software Engineer
> > >> >> >>>>
> > >> >> >>>>BAE Systems CNIR
> > >> >> >>>>
> > >> >> >>>>450 Pulaski Road
> > >> >> >>>>
> > >> >> >>>>Greenlawn, NY 11740
> > >> >> >>>>
> > >> >> >>>>(631) 262 - 8230
> > >> >> >>>>
> > >> >> >>>>ronak.patel@baesystems.com <ma...@baesystems.com>
> > >> >> >>>>
> > >> >> >>>>
> > >> >> >>>>
> > >> >> >>>--
> > >> >> >>>Thanks,
> > >> >> >>>Deepal
> > >> >> >>>................................................................
> > >> >> >>>~Future is Open~
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >>
> > >> >>>---------------------------------------------------------------------
> > >> >> >>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > >> >> >>>For additional commands, e-mail: axis-user-help@ws.apache.org
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>
> > >> >> >>
> > >> >> >
> > >> >> >--
> > >> >> >Thanks,
> > >> >> >Deepal
> > >> >> >................................................................
> > >> >> >~Future is Open~
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >>
> > >> >---------------------------------------------------------------------
> > >> >> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > >> >> >For additional commands, e-mail: axis-user-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
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >>
> > >> >> --
> > >> >> Thanks,
> > >> >> Deepal
> > >> >> ................................................................
> > >> >> ~Future is Open~
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >> ---------------------------------------------------------------------
> > >> >> 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
> > >> >>
> > >> >>
> > >>
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > >> For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >>
> > >>
> > >
> > >
> >
> > --
> > Thanks,
> > Deepal
> > ................................................................
> > ~Future is Open~
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
> --
> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
>
> ---------------------------------------------------------------------
> 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


Re: [Axis] Load Web Service on Startup

Posted by Davanum Srinivas <da...@gmail.com>.
Deepal,

I worked on this a bit today, With svn rev 428234, check the
DeploymentEngine, you now have access to ConfigurationContext. Can you
please take it from here?

thanks,
dims

On 8/2/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> Hi Dims;
>
> When you deploy a service , deploymentEngine does not have access to
> configuration context (it has only access to AxisConfiguration). Any way
> we have a work  around for the services at the system startup time , but
> if some one drop a service at the runtime (service hot deployment) ,
> then we can not call that method since there is no way to get access to
> configuration context from AxisConfiguratation.
>
> So is that ok if we give this feature only for service which are in the
> repository when system startup ?
>
> Thanks
> Deepal
>
>
>
> Davanum Srinivas wrote:
>
> > Deepal,
> >
> > I'd say it should be the following because there is no ServiceContext
> > or MessageContext setup at startup time.
> >
> > init(ConfigurationContext)
> >
> > This is similar to servlets if you specify load-on-startup then
> > "init(ServletConfig config)" is called.
> >
> > This would be a one time call only irrespective of scope. What do you
> > think?
> >
> > -- dims
> >
> > On 8/1/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> >
> >> I am not asking not to do this (I know this is a useful requirement),
> >> but my problem is how do we solve this problem if service is deployed in
> >> soapsession scope.
> >> In that case we need to create new service instance for each soapsession
> >> , so are we not in a problem ?
> >>
> >> of course we can create service instance and init that when system start
> >> (irrespective of its scope), let's say we add a new method to service
> >> impl what are the parameters we need to pass into that ?
> >>
> >> startUp(T1 t1, T2 t2){
> >>   ?????????????
> >> }
> >>
> >>
> >> please comment on my questions , I need to solve those problem before
> >> implementing this (then we can have this feature in Axis2 1.1)
> >>
> >> -Deepal
> >>
> >> Davanum Srinivas wrote:
> >>
> >> > Tony,
> >> >
> >> > I am with you on this. There should be a way to do this.
> >> >
> >> > -- dims
> >> >
> >> > On 7/31/06, Tony Dean <To...@sas.com> wrote:
> >> >
> >> >> I will deploy my service in "application" scope because I want to
> >> >> have only one instance of my service running.
> >> >>
> >> >> The idea of "load on startup" is the same principle used by a
> >> >> servlet.  You set an option so that when the container starts your
> >> >> application is also started.  Otherwise, your application is started
> >> >> on demand when the first request is sent.  This will make the first
> >> >> request slower than the rest.
> >> >>
> >> >> I can live with that, but why should we?
> >> >>
> >> >> -----Original Message-----
> >> >> From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
> >> >> Sent: Friday, July 28, 2006 12:04 PM
> >> >> To: axis-dev@ws.apache.org
> >> >> Subject: Re: [Axis] Load Web Service on Startup
> >> >>
> >> >> I think we are trying to make the simple thing harder by adding a
> >> >> number of options, therefore  I am 0- on adding a new option.
> >> >>
> >> >> Let's say we agree to do this , when we initialize the service
> >> >> implementation class what should we pass into that method ?  if the
> >> >> answer is ServiceContext then we are going to have problems.
> >> >>
> >> >> btw I need to clarify one more thing (I think I am missing
> >> >> something), do you want to deploy your service in scope other than
> >> >> application and you want to have only one instance of service
> >> >> implementation class ?
> >> >>
> >> >> Thanks
> >> >> Deepal
> >> >>
> >> >>
> >> >>
> >> >> Tony Dean wrote:
> >> >>
> >> >> >I think users will want an option (load-on-startup=on|off) to either
> >> >> load scope="application" services on container startup or upon the
> >> >> first request.  I personally would want my service loaded and ready
> >> >> to go before the first request is issued.  Users will certainly be
> >> >> willing to take the hit waiting for the container to initialize
> >> >> rather than during a real-time request.
> >> >> >
> >> >> >-Tony
> >> >> >
> >> >> >-----Original Message-----
> >> >> >From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
> >> >> >Sent: Friday, July 28, 2006 2:18 AM
> >> >> >To: axis-user@ws.apache.org
> >> >> >Subject: Re: [Axis] Load Web Service on Startup
> >> >> >
> >> >> >yes if you deploy the service in application scope , o.w when it get
> >> >> the first request.
> >> >> >
> >> >> >Davanum Srinivas wrote:
> >> >> >
> >> >> >
> >> >> >
> >> >> >>Deepal,
> >> >> >>
> >> >> >>The question is: Do we call init(ServiceContext) when tomcat
> >> starts up
> >> >> >>OR when we get the first request for that service.
> >> >> >>
> >> >> >>People want to do the latter, to avoid taking a hit (slow-ness)
> >> on the
> >> >> >>first request.
> >> >> >>
> >> >> >>thanks,
> >> >> >>dims
> >> >> >>
> >> >> >>On 7/28/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>>In Axis2
> >> >> >>>
> >> >> >>>adding following method to serviceImpl class you can achieve you
> >> >> >>>goal, so if you serviceimpl class look like ;
> >> >> >>>
> >> >> >>>public class Myservice{
> >> >> >>>
> >> >> >>>public void init(ServiceContext sc){
> >> >> >>>// write initialization code here
> >> >> >>>}
> >> >> >>>
> >> >> >>>}
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>Patel, Ronak (US SSA) wrote:
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>>Hello All,
> >> >> >>>>
> >> >> >>>>I am interested in finding out how I can force Apache Axis to
> >> load
> >> >> >>>>and run my Web Service (by calling it's init() method) when
> >> the Web
> >> >> >>>>Server starts.
> >> >> >>>>
> >> >> >>>>Is there a configuration parameter that I need to set somewhere?
> >> >> >>>>
> >> >> >>>>I am interested in finding this out in both Axis2 and Axis1.x.
> >> >> >>>>
> >> >> >>>>Any help would be greatly appreciated.
> >> >> >>>>
> >> >> >>>>Ronak Patel
> >> >> >>>>
> >> >> >>>>Software Engineer
> >> >> >>>>
> >> >> >>>>BAE Systems CNIR
> >> >> >>>>
> >> >> >>>>450 Pulaski Road
> >> >> >>>>
> >> >> >>>>Greenlawn, NY 11740
> >> >> >>>>
> >> >> >>>>(631) 262 - 8230
> >> >> >>>>
> >> >> >>>>ronak.patel@baesystems.com <ma...@baesystems.com>
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>
> >> >> >>>--
> >> >> >>>Thanks,
> >> >> >>>Deepal
> >> >> >>>................................................................
> >> >> >>>~Future is Open~
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >>
> >> >>>---------------------------------------------------------------------
> >> >> >>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> >> >>>For additional commands, e-mail: axis-user-help@ws.apache.org
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >--
> >> >> >Thanks,
> >> >> >Deepal
> >> >> >................................................................
> >> >> >~Future is Open~
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >---------------------------------------------------------------------
> >> >> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> >> >For additional commands, e-mail: axis-user-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
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> Thanks,
> >> >> Deepal
> >> >> ................................................................
> >> >> ~Future is Open~
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> 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
> >> >>
> >> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-dev-help@ws.apache.org
> >>
> >>
> >
> >
>
> --
> Thanks,
> Deepal
> ................................................................
> ~Future is Open~
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis] Load Web Service on Startup

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Dims;

When you deploy a service , deploymentEngine does not have access to
configuration context (it has only access to AxisConfiguration). Any way
we have a work  around for the services at the system startup time , but
if some one drop a service at the runtime (service hot deployment) ,
then we can not call that method since there is no way to get access to
configuration context from AxisConfiguratation.

So is that ok if we give this feature only for service which are in the
repository when system startup ?

Thanks
Deepal



Davanum Srinivas wrote:

> Deepal,
>
> I'd say it should be the following because there is no ServiceContext
> or MessageContext setup at startup time.
>
> init(ConfigurationContext)
>
> This is similar to servlets if you specify load-on-startup then
> "init(ServletConfig config)" is called.
>
> This would be a one time call only irrespective of scope. What do you
> think?
>
> -- dims
>
> On 8/1/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
>
>> I am not asking not to do this (I know this is a useful requirement),
>> but my problem is how do we solve this problem if service is deployed in
>> soapsession scope.
>> In that case we need to create new service instance for each soapsession
>> , so are we not in a problem ?
>>
>> of course we can create service instance and init that when system start
>> (irrespective of its scope), let's say we add a new method to service
>> impl what are the parameters we need to pass into that ?
>>
>> startUp(T1 t1, T2 t2){
>>   ?????????????
>> }
>>
>>
>> please comment on my questions , I need to solve those problem before
>> implementing this (then we can have this feature in Axis2 1.1)
>>
>> -Deepal
>>
>> Davanum Srinivas wrote:
>>
>> > Tony,
>> >
>> > I am with you on this. There should be a way to do this.
>> >
>> > -- dims
>> >
>> > On 7/31/06, Tony Dean <To...@sas.com> wrote:
>> >
>> >> I will deploy my service in "application" scope because I want to
>> >> have only one instance of my service running.
>> >>
>> >> The idea of "load on startup" is the same principle used by a
>> >> servlet.  You set an option so that when the container starts your
>> >> application is also started.  Otherwise, your application is started
>> >> on demand when the first request is sent.  This will make the first
>> >> request slower than the rest.
>> >>
>> >> I can live with that, but why should we?
>> >>
>> >> -----Original Message-----
>> >> From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
>> >> Sent: Friday, July 28, 2006 12:04 PM
>> >> To: axis-dev@ws.apache.org
>> >> Subject: Re: [Axis] Load Web Service on Startup
>> >>
>> >> I think we are trying to make the simple thing harder by adding a
>> >> number of options, therefore  I am 0- on adding a new option.
>> >>
>> >> Let's say we agree to do this , when we initialize the service
>> >> implementation class what should we pass into that method ?  if the
>> >> answer is ServiceContext then we are going to have problems.
>> >>
>> >> btw I need to clarify one more thing (I think I am missing
>> >> something), do you want to deploy your service in scope other than
>> >> application and you want to have only one instance of service
>> >> implementation class ?
>> >>
>> >> Thanks
>> >> Deepal
>> >>
>> >>
>> >>
>> >> Tony Dean wrote:
>> >>
>> >> >I think users will want an option (load-on-startup=on|off) to either
>> >> load scope="application" services on container startup or upon the
>> >> first request.  I personally would want my service loaded and ready
>> >> to go before the first request is issued.  Users will certainly be
>> >> willing to take the hit waiting for the container to initialize
>> >> rather than during a real-time request.
>> >> >
>> >> >-Tony
>> >> >
>> >> >-----Original Message-----
>> >> >From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
>> >> >Sent: Friday, July 28, 2006 2:18 AM
>> >> >To: axis-user@ws.apache.org
>> >> >Subject: Re: [Axis] Load Web Service on Startup
>> >> >
>> >> >yes if you deploy the service in application scope , o.w when it get
>> >> the first request.
>> >> >
>> >> >Davanum Srinivas wrote:
>> >> >
>> >> >
>> >> >
>> >> >>Deepal,
>> >> >>
>> >> >>The question is: Do we call init(ServiceContext) when tomcat
>> starts up
>> >> >>OR when we get the first request for that service.
>> >> >>
>> >> >>People want to do the latter, to avoid taking a hit (slow-ness)
>> on the
>> >> >>first request.
>> >> >>
>> >> >>thanks,
>> >> >>dims
>> >> >>
>> >> >>On 7/28/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
>> >> >>
>> >> >>
>> >> >>
>> >> >>>In Axis2
>> >> >>>
>> >> >>>adding following method to serviceImpl class you can achieve you
>> >> >>>goal, so if you serviceimpl class look like ;
>> >> >>>
>> >> >>>public class Myservice{
>> >> >>>
>> >> >>>public void init(ServiceContext sc){
>> >> >>>// write initialization code here
>> >> >>>}
>> >> >>>
>> >> >>>}
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>Patel, Ronak (US SSA) wrote:
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>>Hello All,
>> >> >>>>
>> >> >>>>I am interested in finding out how I can force Apache Axis to
>> load
>> >> >>>>and run my Web Service (by calling it's init() method) when
>> the Web
>> >> >>>>Server starts.
>> >> >>>>
>> >> >>>>Is there a configuration parameter that I need to set somewhere?
>> >> >>>>
>> >> >>>>I am interested in finding this out in both Axis2 and Axis1.x.
>> >> >>>>
>> >> >>>>Any help would be greatly appreciated.
>> >> >>>>
>> >> >>>>Ronak Patel
>> >> >>>>
>> >> >>>>Software Engineer
>> >> >>>>
>> >> >>>>BAE Systems CNIR
>> >> >>>>
>> >> >>>>450 Pulaski Road
>> >> >>>>
>> >> >>>>Greenlawn, NY 11740
>> >> >>>>
>> >> >>>>(631) 262 - 8230
>> >> >>>>
>> >> >>>>ronak.patel@baesystems.com <ma...@baesystems.com>
>> >> >>>>
>> >> >>>>
>> >> >>>>
>> >> >>>--
>> >> >>>Thanks,
>> >> >>>Deepal
>> >> >>>................................................................
>> >> >>>~Future is Open~
>> >> >>>
>> >> >>>
>> >> >>>
>> >>
>> >>>---------------------------------------------------------------------
>> >> >>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >> >>>For additional commands, e-mail: axis-user-help@ws.apache.org
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>
>> >> >>
>> >> >
>> >> >--
>> >> >Thanks,
>> >> >Deepal
>> >> >................................................................
>> >> >~Future is Open~
>> >> >
>> >> >
>> >> >
>> >>
>> >---------------------------------------------------------------------
>> >> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >> >For additional commands, e-mail: axis-user-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
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> Thanks,
>> >> Deepal
>> >> ................................................................
>> >> ~Future is Open~
>> >>
>> >>
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> 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
>> >>
>> >>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-dev-help@ws.apache.org
>>
>>
>
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis] Load Web Service on Startup

Posted by Davanum Srinivas <da...@gmail.com>.
Deepal,

I'd say it should be the following because there is no ServiceContext
or MessageContext setup at startup time.

init(ConfigurationContext)

This is similar to servlets if you specify load-on-startup then
"init(ServletConfig config)" is called.

This would be a one time call only irrespective of scope. What do you think?

-- dims

On 8/1/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> I am not asking not to do this (I know this is a useful requirement),
> but my problem is how do we solve this problem if service is deployed in
> soapsession scope.
> In that case we need to create new service instance for each soapsession
> , so are we not in a problem ?
>
> of course we can create service instance and init that when system start
> (irrespective of its scope), let's say we add a new method to service
> impl what are the parameters we need to pass into that ?
>
> startUp(T1 t1, T2 t2){
>   ?????????????
> }
>
>
> please comment on my questions , I need to solve those problem before
> implementing this (then we can have this feature in Axis2 1.1)
>
> -Deepal
>
> Davanum Srinivas wrote:
>
> > Tony,
> >
> > I am with you on this. There should be a way to do this.
> >
> > -- dims
> >
> > On 7/31/06, Tony Dean <To...@sas.com> wrote:
> >
> >> I will deploy my service in "application" scope because I want to
> >> have only one instance of my service running.
> >>
> >> The idea of "load on startup" is the same principle used by a
> >> servlet.  You set an option so that when the container starts your
> >> application is also started.  Otherwise, your application is started
> >> on demand when the first request is sent.  This will make the first
> >> request slower than the rest.
> >>
> >> I can live with that, but why should we?
> >>
> >> -----Original Message-----
> >> From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
> >> Sent: Friday, July 28, 2006 12:04 PM
> >> To: axis-dev@ws.apache.org
> >> Subject: Re: [Axis] Load Web Service on Startup
> >>
> >> I think we are trying to make the simple thing harder by adding a
> >> number of options, therefore  I am 0- on adding a new option.
> >>
> >> Let's say we agree to do this , when we initialize the service
> >> implementation class what should we pass into that method ?  if the
> >> answer is ServiceContext then we are going to have problems.
> >>
> >> btw I need to clarify one more thing (I think I am missing
> >> something), do you want to deploy your service in scope other than
> >> application and you want to have only one instance of service
> >> implementation class ?
> >>
> >> Thanks
> >> Deepal
> >>
> >>
> >>
> >> Tony Dean wrote:
> >>
> >> >I think users will want an option (load-on-startup=on|off) to either
> >> load scope="application" services on container startup or upon the
> >> first request.  I personally would want my service loaded and ready
> >> to go before the first request is issued.  Users will certainly be
> >> willing to take the hit waiting for the container to initialize
> >> rather than during a real-time request.
> >> >
> >> >-Tony
> >> >
> >> >-----Original Message-----
> >> >From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
> >> >Sent: Friday, July 28, 2006 2:18 AM
> >> >To: axis-user@ws.apache.org
> >> >Subject: Re: [Axis] Load Web Service on Startup
> >> >
> >> >yes if you deploy the service in application scope , o.w when it get
> >> the first request.
> >> >
> >> >Davanum Srinivas wrote:
> >> >
> >> >
> >> >
> >> >>Deepal,
> >> >>
> >> >>The question is: Do we call init(ServiceContext) when tomcat starts up
> >> >>OR when we get the first request for that service.
> >> >>
> >> >>People want to do the latter, to avoid taking a hit (slow-ness) on the
> >> >>first request.
> >> >>
> >> >>thanks,
> >> >>dims
> >> >>
> >> >>On 7/28/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> >> >>
> >> >>
> >> >>
> >> >>>In Axis2
> >> >>>
> >> >>>adding following method to serviceImpl class you can achieve you
> >> >>>goal, so if you serviceimpl class look like ;
> >> >>>
> >> >>>public class Myservice{
> >> >>>
> >> >>>public void init(ServiceContext sc){
> >> >>>// write initialization code here
> >> >>>}
> >> >>>
> >> >>>}
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>Patel, Ronak (US SSA) wrote:
> >> >>>
> >> >>>
> >> >>>
> >> >>>>Hello All,
> >> >>>>
> >> >>>>I am interested in finding out how I can force Apache Axis to load
> >> >>>>and run my Web Service (by calling it's init() method) when the Web
> >> >>>>Server starts.
> >> >>>>
> >> >>>>Is there a configuration parameter that I need to set somewhere?
> >> >>>>
> >> >>>>I am interested in finding this out in both Axis2 and Axis1.x.
> >> >>>>
> >> >>>>Any help would be greatly appreciated.
> >> >>>>
> >> >>>>Ronak Patel
> >> >>>>
> >> >>>>Software Engineer
> >> >>>>
> >> >>>>BAE Systems CNIR
> >> >>>>
> >> >>>>450 Pulaski Road
> >> >>>>
> >> >>>>Greenlawn, NY 11740
> >> >>>>
> >> >>>>(631) 262 - 8230
> >> >>>>
> >> >>>>ronak.patel@baesystems.com <ma...@baesystems.com>
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>--
> >> >>>Thanks,
> >> >>>Deepal
> >> >>>................................................................
> >> >>>~Future is Open~
> >> >>>
> >> >>>
> >> >>>
> >> >>>---------------------------------------------------------------------
> >> >>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> >>>For additional commands, e-mail: axis-user-help@ws.apache.org
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >
> >> >--
> >> >Thanks,
> >> >Deepal
> >> >................................................................
> >> >~Future is Open~
> >> >
> >> >
> >> >
> >> >---------------------------------------------------------------------
> >> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> >For additional commands, e-mail: axis-user-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
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >> --
> >> Thanks,
> >> Deepal
> >> ................................................................
> >> ~Future is Open~
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >>
> >>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org