Yes - that works ok.
The issue that I have is that one "add" operation comes after my framework start and I am getting a concurrent exception when accessing a list built within the subsystem state. Here are the traces that I am getting :
23:54:32,026 INFO [<myPkg>.TestSubsystemAdd] (Controller Boot Thread) Activating Test Subsystem
23:54:32,031 INFO [<myPkg>.MyBootstrapService] (Controller Boot Thread) Test MyBootstrapService - created
23:54:32,031 INFO [<myPkg>.MySubsystemState] (MSC service thread 1-3) MySubsystemState - started
23:54:32,031 INFO [<myPkg>.TestAdd] (Controller Boot Thread) TestAdd --> execute Add <<<<< this is OK
23:54:32,031 INFO [<myPkg>.MyBootstrapService] (MSC service thread 1-10) Test MyBootstrapService - starting.
23:54:32,032 INFO [<myPkg>.MyBootstrapService] (MSC service thread 1-10) Test MyBootstrapService - started in:0ms.
23:54:32,033 INFO [<myPkg>.TestAdd] (Controller Boot Thread) TestModuleAdd --> execute Add <<<<< that comes out of sync
I do not understand why the last execute Add occurs AFTER the bootstrapservice started. And I am wondering how this is getting synchronized between the MSC service thread && the Controller Boot Thread. I do not get where I am messing it up !
I used the proper dependency when I add the bootstrap service towards the runtime subsystem state.
If you have an idea - it will be more than welcomed.
BR,
Dan S.