Re: [osgi-dev] Waiting in deactivate/activate()?

2016-08-07 Thread Simon Chemouil
list+org.o...@io7m.com a écrit le 07/08/2016 22:36 : > The more I think about this, the less it seems like a DS issue and more > like something more fundamental instead. DS could help create write less code by exposing more functionality, but the general solution would remain the same. For instan

Re: [osgi-dev] Waiting in deactivate/activate()?

2016-08-07 Thread list+org.osgi
On 2016-08-07T17:37:59 +0200 Simon Chemouil wrote: > > Ideally, TCPServerManager's thread dealing with binding/closing sockets > should not be held statically, but it's a bit tricky to deal with the > restarting of TCPServerManager instances otherwise. The more I think about this, the less it see

Re: [osgi-dev] Waiting in deactivate/activate()?

2016-08-07 Thread list+org . osgi
On 2016-08-07T17:37:59 +0200 Simon Chemouil wrote: > list+org.o...@io7m.com a écrit le 07/08/2016 14:01 : > > Hello. > > Hi, > > > As a learning exercise, I've put together a very contrived example of a > > "reverse" service (like an echo service, except that each returned line > > comes back

Re: [osgi-dev] Waiting in deactivate/activate()?

2016-08-07 Thread Simon Chemouil
Simon Chemouil a écrit le 07/08/2016 17:37 : >public void register(TCPServer tcpServer) { > > this.tcpServer = tcpServer; > > // blocking code. > reg = context.registerService(TCPServer.class, tcpServer, null); > > // this thread will potentially activate components d

Re: [osgi-dev] Waiting in deactivate/activate()?

2016-08-07 Thread Simon Chemouil
list+org.o...@io7m.com a écrit le 07/08/2016 14:01 : > Hello. Hi, > As a learning exercise, I've put together a very contrived example of a > "reverse" service (like an echo service, except that each returned line > comes back reversed). Mostly, I'm using it as a learning example of how > to buil

Re: [osgi-dev] Waiting in deactivate/activate()?

2016-08-07 Thread list+org . osgi
Hi. On 2016-08-07T16:26:16 +0200 wrote: > Hello, > > Although it is not good practice to sleep/block I think it is natural to wait > till the component is shut down. Right. I think it's a matter of interpretation. The compendium spec doesn't seem to say one way or the other. I think if the c

Re: [osgi-dev] Waiting in deactivate/activate()?

2016-08-07 Thread ecki
Hello, Although it is not good practice to sleep/block I think it is natural to wait till the component is shut down. On the other hand startup problems with port binding code are so common, it does not hurt to code this in a retrying thread as well. Then the started server will recover from t

[osgi-dev] Waiting in deactivate/activate()?

2016-08-07 Thread list+org . osgi
Hello. As a learning exercise, I've put together a very contrived example of a "reverse" service (like an echo service, except that each returned line comes back reversed). Mostly, I'm using it as a learning example of how to build a small TCP/IP client/server in OSGi. There are five bundles: