cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabiano C. de Oliveira" <fabianocolive...@gmail.com>
Subject Re: HttpServiceManager sometimes return null
Date Wed, 08 Jul 2015 21:57:48 GMT
Hi Cristian.

Thanks for your help. I am testing this in my project. My environment it is
ok.

I will follow your advice and I hope to contribute with CXF soon.

Thanks for your support.



2015-07-08 4:11 GMT-03:00 Christian Schneider <chris@die-schneider.net>:

> Hi Fabiano,
>
> thanks for spotting this. I created an issue and fixed like you proposed.
> https://issues.apache.org/jira/browse/DOSGI-221
> Can you test with the current snapshot?
>
> If you plan to get more involved with the CXF development you should open
> the issue yourself and provide a patch or github pull request.
> If you are interested and need help setting up the environment just
> contact me and I can help.
>
> Christian
>
>
> On 07.07.2015 22:08, Fabiano C. de Oliveira wrote:
>
>> Hi all,
>>
>> I would like of your help.
>>
>> Im using CXF DOSGi in my project but I found a problem. This problem is
>> not
>> in CXF but I think that some changes in CXF DOSGi
>> could help me.
>>
>> Im using Spring DM to manage dependencies. I only register a service when
>> org.osgi.service.http.HttpService is satisfied.
>>
>> When TopologyManagerExport receive events to register and export my remote
>> interface (soap or rest) I can get a null
>> from HttpServiceManager.getHttpService(). Because I have 3 threads (1
>> firing events of registered HttpService, 1 Running Applicaction context
>> initialization (Spring DM) and the TopologyManagerExport thread resposable
>> to export DOSGi interfaces)
>>
>> In this case I think that we coul use the code below to resolve this in
>> HttpServiceManager:
>>      protected HttpService getHttpService() {
>>          Object service = null;
>>          try {
>>              service = tracker.waitForService(120000);
>>          } catch (InterruptedException ex) {
>>              LOG.warn("waitForService interrupeted", ex);
>>          }
>>          if (service == null) {
>>              throw new RuntimeException("No HTTPService found");
>>          }
>>          return (HttpService) service;
>>      }
>>
>> What do you think ?
>>
>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 
Fabiano C. de Oliveira
   (034) 9663-2986

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message