axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siamak Haschemi <siama...@gmx.de>
Subject Re: Exchange Data between twi Services in a ServiceGroup
Date Tue, 18 Apr 2006 11:46:35 GMT
I solved my problem by using a static variable, but it would be nice to 
know if there exists a Context to put references in which has a lifetime 
longer than a service-call.

Thanks a lot,

Siamak Haschemi

Siamak Haschemi schrieb:
> Hello Robert,
>
> I've already implemented such a Spring-MessageReceiver that lookups 
> Services that are actualy Beans from its SpringConfiguration.
>
> I only searching about a way to share some Object  reference across 
> multiple Service-Calls.
>
> Thanks,
>
> Siamak Haschemi
>
>
> robert lazarski schrieb:
>> Is what you're realy after is two services that are wired into Spring?
>> Spring-ApplicationContext already is a singleton - look at setting up a
>> BeanFactory.
>>
>> The other way is as you show in services.xml - message recievers. I'm
>> actually coding one up a spring message receiver now. The idea is to 
>> wire
>> spring aware beans that are services.
>>
>> Anyways, HTH,
>> Robert
>> http://www.braziloutsource.com/
>>
>> On 4/17/06, Siamak Haschemi <siamak.h@gmx.de> wrote:
>>  
>>> Hello to all.
>>>
>>> I have two Services defnied. They need to share a reference to the
>>> Spring-ApplicationContext. Now I need to know how the communication
>>> between two Services in a ServiceGroup can be achieved. I know I can do
>>> this with a Singleton, but I wonder if Axis2 has some mechanism for
>>> Inter-Service-Communication.
>>>
>>> Another Idea would be to merge the two MessageReceivers, but I need 
>>> this
>>> separation.
>>>
>>> <serviceGroup>
>>>   <service name="sale" scope="application">
>>>     <messageReceivers>
>>>       <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>>>         
>>> class="org.haschemi.sale.service.SpringSaleMessageReceiverInOut"
>>> />
>>>     </messageReceivers>
>>>     <parameter locked="false"
>>> name="ServiceClass">org.haschemi.sale.service.SaleSkeleton</parameter>
>>>     <operation name="order" 
>>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>>       <actionMapping>http://haschemi.org/sale/order</actionMapping>
>>>     </operation>
>>>   </service>
>>>   <service name="care" scope="application">
>>>     <messageReceivers>
>>>       <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>>>         
>>> class="org.haschemi.sale.service.SpringCareMessageReceiverInOut"
>>> />
>>>     </messageReceivers>
>>>     <parameter locked="false"
>>> name="ServiceClass">org.haschemi.sale.service.CareSkeleton</parameter>
>>>     <operation name="addProduct"
>>> mep="http://www.w3.org/2004/08/wsdl/in-out">
>>>       
>>> <actionMapping>http://haschemi.org/sale/addProduct</actionMapping>
>>>     </operation>
>>>   </service>
>>> </serviceGroup>
>>>
>>>
>>>
>>> Thanks a lot,
>>>
>>> Siamak Haschemi
>>>
>>>
>>>     
>>
>>   
>


Mime
View raw message