You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Adrián Roselló Rey <ad...@i2cat.net> on 2013/11/08 14:40:00 UTC

Wait until services are published by DOSGI

HI all,

I'm using DOSGI to publish my OSGI service through WebService, and
everything works fine.

Now I'm deveoping an integration test that checks my webservice. My problem
is that sometimes the test arrives to the "check" before DOSGI could
publish the service, and I'm wondering if there's any way to tell my test
to wait until DOSGI finishes  it work.

I know that a "sleep" could be enough, but I was lookinf for a nicer way to
do it.
Thanks a lot!

All the best,

-- 


*Adrián Roselló Rey Distributed Applications and Networks Area (DANA) i2CAT
Foundation, Barcelona, Spain*

Re: Wait until services are published by DOSGI

Posted by Adrián Roselló Rey <ad...@i2cat.net>.
Thanks a lot David, we solved our problem by using EndpointListener.

All the best,


2013/11/8 David Bosschaert <da...@gmail.com>

> Hi Adrian,
>
> You might want to try using an EndpointListener [1] or an
> RemoteServiceAdminListener [2]. You should be able to get callbacks
> through those once the remoting work is done.
>
> Cheers,
>
> David
>
> [1]
> http://www.osgi.org/javadoc/r4v42/org/osgi/service/remoteserviceadmin/EndpointListener.html
> [2]
> http://www.osgi.org/javadoc/r4v42/org/osgi/service/remoteserviceadmin/RemoteServiceAdminListener.html
>
> On 8 November 2013 13:40, Adrián Roselló Rey <ad...@i2cat.net>
> wrote:
> > HI all,
> >
> > I'm using DOSGI to publish my OSGI service through WebService, and
> > everything works fine.
> >
> > Now I'm deveoping an integration test that checks my webservice. My
> problem
> > is that sometimes the test arrives to the "check" before DOSGI could
> > publish the service, and I'm wondering if there's any way to tell my test
> > to wait until DOSGI finishes  it work.
> >
> > I know that a "sleep" could be enough, but I was lookinf for a nicer way
> to
> > do it.
> > Thanks a lot!
> >
> > All the best,
> >
> > --
> >
> >
> > *Adrián Roselló Rey Distributed Applications and Networks Area (DANA)
> i2CAT
> > Foundation, Barcelona, Spain*
>



-- 


*Adrián Roselló Rey Distributed Applications and Networks Area (DANA) i2CAT
Foundation, Barcelona, Spain*

Re: Wait until services are published by DOSGI

Posted by Christian Schneider <ch...@die-schneider.net>.
Thanks David. That is also a good enhancement for our own dosgi itests.

Christian

Am 08.11.2013 14:52, schrieb David Bosschaert:
> Hi Adrian,
>
> You might want to try using an EndpointListener [1] or an
> RemoteServiceAdminListener [2]. You should be able to get callbacks
> through those once the remoting work is done.
>
> Cheers,
>
> David
>
> [1] http://www.osgi.org/javadoc/r4v42/org/osgi/service/remoteserviceadmin/EndpointListener.html
> [2] http://www.osgi.org/javadoc/r4v42/org/osgi/service/remoteserviceadmin/RemoteServiceAdminListener.html
>
> On 8 November 2013 13:40, Adrián Roselló Rey <ad...@i2cat.net> wrote:
>> HI all,
>>
>> I'm using DOSGI to publish my OSGI service through WebService, and
>> everything works fine.
>>
>> Now I'm deveoping an integration test that checks my webservice. My problem
>> is that sometimes the test arrives to the "check" before DOSGI could
>> publish the service, and I'm wondering if there's any way to tell my test
>> to wait until DOSGI finishes  it work.
>>
>> I know that a "sleep" could be enough, but I was lookinf for a nicer way to
>> do it.
>> Thanks a lot!
>>
>> All the best,
>>
>> --
>>
>>
>> *Adrián Roselló Rey Distributed Applications and Networks Area (DANA) i2CAT
>> Foundation, Barcelona, Spain*


-- 
  
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Wait until services are published by DOSGI

Posted by David Bosschaert <da...@gmail.com>.
Hi Adrian,

You might want to try using an EndpointListener [1] or an
RemoteServiceAdminListener [2]. You should be able to get callbacks
through those once the remoting work is done.

Cheers,

David

[1] http://www.osgi.org/javadoc/r4v42/org/osgi/service/remoteserviceadmin/EndpointListener.html
[2] http://www.osgi.org/javadoc/r4v42/org/osgi/service/remoteserviceadmin/RemoteServiceAdminListener.html

On 8 November 2013 13:40, Adrián Roselló Rey <ad...@i2cat.net> wrote:
> HI all,
>
> I'm using DOSGI to publish my OSGI service through WebService, and
> everything works fine.
>
> Now I'm deveoping an integration test that checks my webservice. My problem
> is that sometimes the test arrives to the "check" before DOSGI could
> publish the service, and I'm wondering if there's any way to tell my test
> to wait until DOSGI finishes  it work.
>
> I know that a "sleep" could be enough, but I was lookinf for a nicer way to
> do it.
> Thanks a lot!
>
> All the best,
>
> --
>
>
> *Adrián Roselló Rey Distributed Applications and Networks Area (DANA) i2CAT
> Foundation, Barcelona, Spain*