You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Michele Mazzucco <Mi...@ncl.ac.uk> on 2006/07/19 13:24:32 UTC

[Axis2] Hot deployment problem

Hi all,

I'm 'hot-deploying' new web services from a handler running as first in
the Axis2 chain (before the transport phase).
I detect the target service is not available by checking the axis
configuration obtained this way:

registry = messageContext.getConfigurationContext().getAxisConfiguration()

and then

AxisService target = registry.getService("foo")


The problem is that after the hot-deployment the new service is not into
registry? What should I do?


Thanks in advance,
Michele

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


Re: [Axis2] Hot deployment problem

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Hi all,

the solution seems to be wait for a few seconds + instantiate a new
AxisConfiguration object.

Any comment/suggest would be appreciated,
Michele

Michele Mazzucco wrote:
> Hi all,
> 
> I'm 'hot-deploying' new web services from a handler running as first in
> the Axis2 chain (before the transport phase).
> I detect the target service is not available by checking the axis
> configuration obtained this way:
> 
> registry = messageContext.getConfigurationContext().getAxisConfiguration()
> 
> and then
> 
> AxisService target = registry.getService("foo")
> 
> 
> The problem is that after the hot-deployment the new service is not into
> registry? What should I do?
> 
> 
> Thanks in advance,
> Michele
> 
> ---------------------------------------------------------------------
> 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-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Hot deployment problem

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Thanks Deepal. Actually I'm trying with Thread.sleep(5000L) and it seems
to work. Do you think is better to wait 10 seconds?

Michele

Deepal Jayasinghe wrote:
> It will at least take 10 s to update the axisConfguration after you
> deploying the service .
> 
> Michele Mazzucco wrote:
> 
>> Hi all,
>>
>> I'm 'hot-deploying' new web services from a handler running as first in
>> the Axis2 chain (before the transport phase).
>> I detect the target service is not available by checking the axis
>> configuration obtained this way:
>>
>> registry = messageContext.getConfigurationContext().getAxisConfiguration()
>>
>> and then
>>
>> AxisService target = registry.getService("foo")
>>
>>
>> The problem is that after the hot-deployment the new service is not into
>> registry? What should I do?
>>  
>>
> so need to wait 10s :)
> 
>> Thanks in advance,
>> Michele
>>
>> ---------------------------------------------------------------------
>> 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-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Hot deployment problem

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hmm , I dont have sample on AxisObserver.  If you register AxisObserver
in axis2.xml when modules adding into system observer will be notify.
And mind you module can only add before system start , so once you get
access to axisConfiguration it has already notified the observes about
module updates.

so is you use AxisConfiguration.addObservers() , right thing will not
happen  :(


Michele Mazzucco wrote:

>Deepal,
>
>just the last few questions. After implementing the interface, should I
>register my listener object with AxisConfiguration.addObservers() as
>well? What should I put into the init() method? What about the
>moduleUpdate()?, for my knowledge the module update is visible only
>after a server reboot. Is there any example of an AxisObserver object?
>
>Thanks,
>Michele
>
>Deepal Jayasinghe wrote:
>  
>
>>Yes , you can register Listener in axis2.xml , and whenever service are
>>added to system them will be notify. So you can update your
>>configuration using that Listener.
>>Adding a listener is very easy you can do that as follows (remember that
>>listener need to implement org.apache.axis2.engine.AxisObserver interface)
>>
>><listener class="org.apache.axis2.ObserverIMPL">
>>   <parameter name="myPara" locked="false">parameterValue</parameter>
>> </listener>
>>
>>Michele Mazzucco wrote:
>>
>>    
>>
>>>Deepal,
>>>
>>>is there any way to add a listener so when the configuration is updated
>>>my stuff will automatically receive the news?
>>>
>>>Thanks,
>>>Michele
>>>
>>>Deepal Jayasinghe wrote:
>>> 
>>>
>>>      
>>>
>>>>It will at least take 10 s to update the axisConfguration after you
>>>>deploying the service .
>>>>
>>>>Michele Mazzucco wrote:
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Hi all,
>>>>>
>>>>>I'm 'hot-deploying' new web services from a handler running as first in
>>>>>the Axis2 chain (before the transport phase).
>>>>>I detect the target service is not available by checking the axis
>>>>>configuration obtained this way:
>>>>>
>>>>>registry = messageContext.getConfigurationContext().getAxisConfiguration()
>>>>>
>>>>>and then
>>>>>
>>>>>AxisService target = registry.getService("foo")
>>>>>
>>>>>
>>>>>The problem is that after the hot-deployment the new service is not into
>>>>>registry? What should I do?
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>so need to wait 10s :)
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Thanks in advance,
>>>>>Michele
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>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-user-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>>
>>> 
>>>
>>>      
>>>
>
>---------------------------------------------------------------------
>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


Re: [Axis2] Hot deployment problem

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Deepal,

just the last few questions. After implementing the interface, should I
register my listener object with AxisConfiguration.addObservers() as
well? What should I put into the init() method? What about the
moduleUpdate()?, for my knowledge the module update is visible only
after a server reboot. Is there any example of an AxisObserver object?

Thanks,
Michele

Deepal Jayasinghe wrote:
> Yes , you can register Listener in axis2.xml , and whenever service are
> added to system them will be notify. So you can update your
> configuration using that Listener.
> Adding a listener is very easy you can do that as follows (remember that
> listener need to implement org.apache.axis2.engine.AxisObserver interface)
> 
> <listener class="org.apache.axis2.ObserverIMPL">
>    <parameter name="myPara" locked="false">parameterValue</parameter>
>  </listener>
> 
> Michele Mazzucco wrote:
> 
>> Deepal,
>>
>> is there any way to add a listener so when the configuration is updated
>> my stuff will automatically receive the news?
>>
>> Thanks,
>> Michele
>>
>> Deepal Jayasinghe wrote:
>>  
>>
>>> It will at least take 10 s to update the axisConfguration after you
>>> deploying the service .
>>>
>>> Michele Mazzucco wrote:
>>>
>>>    
>>>
>>>> Hi all,
>>>>
>>>> I'm 'hot-deploying' new web services from a handler running as first in
>>>> the Axis2 chain (before the transport phase).
>>>> I detect the target service is not available by checking the axis
>>>> configuration obtained this way:
>>>>
>>>> registry = messageContext.getConfigurationContext().getAxisConfiguration()
>>>>
>>>> and then
>>>>
>>>> AxisService target = registry.getService("foo")
>>>>
>>>>
>>>> The problem is that after the hot-deployment the new service is not into
>>>> registry? What should I do?
>>>>
>>>>
>>>>      
>>>>
>>> so need to wait 10s :)
>>>
>>>    
>>>
>>>> Thanks in advance,
>>>> Michele
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>>  
>>
> 

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


Re: [Axis2] Hot deployment problem

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Yes , you can register Listener in axis2.xml , and whenever service are
added to system them will be notify. So you can update your
configuration using that Listener.
Adding a listener is very easy you can do that as follows (remember that
listener need to implement org.apache.axis2.engine.AxisObserver interface)

<listener class="org.apache.axis2.ObserverIMPL">
   <parameter name="myPara" locked="false">parameterValue</parameter>
 </listener>

Michele Mazzucco wrote:

>Deepal,
>
>is there any way to add a listener so when the configuration is updated
>my stuff will automatically receive the news?
>
>Thanks,
>Michele
>
>Deepal Jayasinghe wrote:
>  
>
>>It will at least take 10 s to update the axisConfguration after you
>>deploying the service .
>>
>>Michele Mazzucco wrote:
>>
>>    
>>
>>>Hi all,
>>>
>>>I'm 'hot-deploying' new web services from a handler running as first in
>>>the Axis2 chain (before the transport phase).
>>>I detect the target service is not available by checking the axis
>>>configuration obtained this way:
>>>
>>>registry = messageContext.getConfigurationContext().getAxisConfiguration()
>>>
>>>and then
>>>
>>>AxisService target = registry.getService("foo")
>>>
>>>
>>>The problem is that after the hot-deployment the new service is not into
>>>registry? What should I do?
>>> 
>>>
>>>      
>>>
>>so need to wait 10s :)
>>
>>    
>>
>>>Thanks in advance,
>>>Michele
>>>
>>>---------------------------------------------------------------------
>>>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-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


Re: [Axis2] Hot deployment problem

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Deepal,

is there any way to add a listener so when the configuration is updated
my stuff will automatically receive the news?

Thanks,
Michele

Deepal Jayasinghe wrote:
> It will at least take 10 s to update the axisConfguration after you
> deploying the service .
> 
> Michele Mazzucco wrote:
> 
>> Hi all,
>>
>> I'm 'hot-deploying' new web services from a handler running as first in
>> the Axis2 chain (before the transport phase).
>> I detect the target service is not available by checking the axis
>> configuration obtained this way:
>>
>> registry = messageContext.getConfigurationContext().getAxisConfiguration()
>>
>> and then
>>
>> AxisService target = registry.getService("foo")
>>
>>
>> The problem is that after the hot-deployment the new service is not into
>> registry? What should I do?
>>  
>>
> so need to wait 10s :)
> 
>> Thanks in advance,
>> Michele
>>
>> ---------------------------------------------------------------------
>> 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-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Hot deployment problem

Posted by Deepal Jayasinghe <de...@opensource.lk>.
It will at least take 10 s to update the axisConfguration after you
deploying the service .

Michele Mazzucco wrote:

>Hi all,
>
>I'm 'hot-deploying' new web services from a handler running as first in
>the Axis2 chain (before the transport phase).
>I detect the target service is not available by checking the axis
>configuration obtained this way:
>
>registry = messageContext.getConfigurationContext().getAxisConfiguration()
>
>and then
>
>AxisService target = registry.getService("foo")
>
>
>The problem is that after the hot-deployment the new service is not into
>registry? What should I do?
>  
>
so need to wait 10s :)

>
>Thanks in advance,
>Michele
>
>---------------------------------------------------------------------
>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