celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [8/8] celix git commit: CELIX-413: Moves the example to an additional dir, so that examples can also be build outside the celix project
Date Wed, 31 Jan 2018 20:05:32 GMT
CELIX-413: Moves the example to an additional dir, so that examples can also be build outside the celix project


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/a8b8410f
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/a8b8410f
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/a8b8410f

Branch: refs/heads/develop
Commit: a8b8410f1c469b33512ea6751b0b7a8d4f949a26
Parents: 22f2d65
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Wed Jan 31 21:14:22 2018 +0100
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Wed Jan 31 21:14:22 2018 +0100

----------------------------------------------------------------------
 CMakeLists.txt                                  |    2 +-
 etcdlib/CMakeLists.txt                          |   29 +-
 examples/CMakeLists.txt                         |   36 +-
 examples/celix-examples/CMakeLists.txt          |   40 +
 .../celix-examples/dm_example/CMakeLists.txt    |   63 +
 .../dm_example/api/CMakeLists.txt               |   19 +
 .../dm_example/api/include/phase1.h             |   44 +
 .../dm_example/api/include/phase2.h             |   41 +
 .../dm_example/phase1/CMakeLists.txt            |   38 +
 .../dm_example/phase1/src/phase1_activator.c    |   86 +
 .../dm_example/phase1/src/phase1_cmp.c          |  110 +
 .../dm_example/phase1/src/phase1_cmp.h          |   44 +
 .../dm_example/phase2a/CMakeLists.txt           |   37 +
 .../dm_example/phase2a/src/phase2a_activator.c  |   95 +
 .../dm_example/phase2a/src/phase2a_cmp.c        |  116 +
 .../dm_example/phase2a/src/phase2a_cmp.h        |   46 +
 .../dm_example/phase2b/CMakeLists.txt           |   37 +
 .../dm_example/phase2b/src/phase2b_activator.c  |   95 +
 .../dm_example/phase2b/src/phase2b_cmp.c        |  115 +
 .../dm_example/phase2b/src/phase2b_cmp.h        |   46 +
 .../dm_example/phase3/CMakeLists.txt            |   37 +
 .../dm_example/phase3/src/phase3_activator.c    |   84 +
 .../dm_example/phase3/src/phase3_cmp.c          |  116 +
 .../dm_example/phase3/src/phase3_cmp.h          |   45 +
 .../dm_example_cxx/CMakeLists.txt               |   68 +
 .../dm_example_cxx/api/CMakeLists.txt           |   19 +
 .../dm_example_cxx/api/include/IName.h          |   39 +
 .../dm_example_cxx/api/include/IPhase1.h        |   33 +
 .../dm_example_cxx/api/include/IPhase2.h        |   33 +
 .../dm_example_cxx/phase1/CMakeLists.txt        |   37 +
 .../phase1/src/Phase1Activator.cc               |   74 +
 .../dm_example_cxx/phase1/src/Phase1Activator.h |   36 +
 .../dm_example_cxx/phase1/src/Phase1Cmp.cc      |   53 +
 .../dm_example_cxx/phase1/src/Phase1Cmp.h       |   44 +
 .../dm_example_cxx/phase2/CMakeLists.txt        |   51 +
 .../dm_example_cxx/phase2/src/Phase2Activator.h |   34 +
 .../dm_example_cxx/phase2/src/Phase2Cmp.h       |   56 +
 .../phase2/src/Phase2aActivator.cc              |   57 +
 .../dm_example_cxx/phase2/src/Phase2aCmp.cc     |   45 +
 .../phase2/src/Phase2bActivator.cc              |   50 +
 .../dm_example_cxx/phase2/src/Phase2bCmp.cc     |   45 +
 .../dm_example_cxx/phase3/CMakeLists.txt        |   38 +
 .../phase3/src/Phase3Activator.cc               |   37 +
 .../dm_example_cxx/phase3/src/Phase3Activator.h |   33 +
 .../phase3/src/Phase3BaseActivator.cc           |   31 +
 .../phase3/src/Phase3BaseActivator.h            |   35 +
 .../dm_example_cxx/phase3/src/Phase3Cmp.cc      |   65 +
 .../dm_example_cxx/phase3/src/Phase3Cmp.h       |   50 +
 .../phase3_locking/CMakeLists.txt               |   38 +
 .../src/Phase3LockingActivator.cc               |   42 +
 .../phase3_locking/src/Phase3LockingActivator.h |   33 +
 .../phase3_locking/src/Phase3LockingCmp.cc      |   66 +
 .../phase3_locking/src/Phase3LockingCmp.h       |   50 +
 .../celix-examples/embedding/CMakeLists.txt     |   20 +
 .../celix-examples/embedding/private/src/main.c |   99 +
 .../celix-examples/hello_world/CMakeLists.txt   |   63 +
 .../hello_world/private/src/activator.c         |   68 +
 .../hello_world/private/src/test.c              |   32 +
 .../hello_world/private/src/test2.c             |   32 +
 .../hello_world/public/include/test.h           |   34 +
 .../hello_world/public/include/test2.h          |   34 +
 .../hello_world_test/CMakeLists.txt             |   90 +
 .../hello_world_test/private/src/activator.c    |   63 +
 .../hello_world_test/private/src/test.c         |   32 +
 .../hello_world_test/public/include/test.h      |   34 +
 .../log_service_example/CMakeLists.txt          |   31 +
 .../log_service_example/src/activator.c         |   85 +
 examples/celix-examples/mongoose/CMakeLists.txt |   42 +
 .../mongoose/private/include/mongoose.h         |  218 +
 .../mongoose/private/src/activator.c            |   79 +
 .../mongoose/private/src/mongoose.c             | 4076 ++++++++++++++++++
 .../celix-examples/mongoose/root/index.html     |   23 +
 .../service_hook_example/CMakeLists.txt         |   30 +
 .../service_hook_example/src/activator.c        |  137 +
 .../services_example_c/CMakeLists.txt           |   43 +
 .../services_example_c/api/example.h            |   34 +
 .../services_example_c/bar/CMakeLists.txt       |   39 +
 .../bar/private/include/bar.h                   |   32 +
 .../services_example_c/bar/private/src/bar.c    |   58 +
 .../bar/private/src/bar_activator.c             |   70 +
 .../services_example_c/foo1/CMakeLists.txt      |   39 +
 .../foo1/private/include/foo1.h                 |   36 +
 .../services_example_c/foo1/private/src/foo1.c  |  102 +
 .../foo1/private/src/foo1_activator.c           |   88 +
 .../services_example_c/foo2/CMakeLists.txt      |   39 +
 .../foo2/private/include/foo2.h                 |   36 +
 .../services_example_c/foo2/private/src/foo2.c  |  113 +
 .../foo2/private/src/foo2_activator.c           |   88 +
 .../services_example_cxx/CMakeLists.txt         |   43 +
 .../services_example_cxx/api/IAnotherExample.h  |   34 +
 .../services_example_cxx/api/example.h          |   43 +
 .../services_example_cxx/bar/CMakeLists.txt     |   41 +
 .../bar/private/include/Bar.h                   |   40 +
 .../bar/private/include/BarActivator.h          |   36 +
 .../services_example_cxx/bar/private/src/Bar.cc |   48 +
 .../bar/private/src/BarActivator.cc             |   48 +
 .../services_example_cxx/baz/CMakeLists.txt     |   41 +
 .../baz/private/include/Baz.h                   |   54 +
 .../baz/private/include/BazActivator.h          |   34 +
 .../services_example_cxx/baz/private/src/Baz.cc |   84 +
 .../baz/private/src/BazActivator.cc             |   45 +
 .../services_example_cxx/foo/CMakeLists.txt     |   41 +
 .../foo/private/include/Foo.h                   |   48 +
 .../foo/private/include/FooActivator.h          |   34 +
 .../services_example_cxx/foo/private/src/Foo.cc |   60 +
 .../foo/private/src/FooActivator.cc             |   43 +
 examples/dm_example/CMakeLists.txt              |   63 -
 examples/dm_example/api/CMakeLists.txt          |   19 -
 examples/dm_example/api/include/phase1.h        |   44 -
 examples/dm_example/api/include/phase2.h        |   41 -
 examples/dm_example/phase1/CMakeLists.txt       |   38 -
 .../dm_example/phase1/src/phase1_activator.c    |   86 -
 examples/dm_example/phase1/src/phase1_cmp.c     |  110 -
 examples/dm_example/phase1/src/phase1_cmp.h     |   44 -
 examples/dm_example/phase2a/CMakeLists.txt      |   37 -
 .../dm_example/phase2a/src/phase2a_activator.c  |   95 -
 examples/dm_example/phase2a/src/phase2a_cmp.c   |  116 -
 examples/dm_example/phase2a/src/phase2a_cmp.h   |   46 -
 examples/dm_example/phase2b/CMakeLists.txt      |   37 -
 .../dm_example/phase2b/src/phase2b_activator.c  |   95 -
 examples/dm_example/phase2b/src/phase2b_cmp.c   |  115 -
 examples/dm_example/phase2b/src/phase2b_cmp.h   |   46 -
 examples/dm_example/phase3/CMakeLists.txt       |   37 -
 .../dm_example/phase3/src/phase3_activator.c    |   84 -
 examples/dm_example/phase3/src/phase3_cmp.c     |  116 -
 examples/dm_example/phase3/src/phase3_cmp.h     |   45 -
 examples/dm_example_cxx/CMakeLists.txt          |   68 -
 examples/dm_example_cxx/api/CMakeLists.txt      |   19 -
 examples/dm_example_cxx/api/include/IName.h     |   39 -
 examples/dm_example_cxx/api/include/IPhase1.h   |   33 -
 examples/dm_example_cxx/api/include/IPhase2.h   |   33 -
 examples/dm_example_cxx/phase1/CMakeLists.txt   |   37 -
 .../phase1/src/Phase1Activator.cc               |   74 -
 .../dm_example_cxx/phase1/src/Phase1Activator.h |   36 -
 examples/dm_example_cxx/phase1/src/Phase1Cmp.cc |   53 -
 examples/dm_example_cxx/phase1/src/Phase1Cmp.h  |   44 -
 examples/dm_example_cxx/phase2/CMakeLists.txt   |   51 -
 .../dm_example_cxx/phase2/src/Phase2Activator.h |   34 -
 examples/dm_example_cxx/phase2/src/Phase2Cmp.h  |   56 -
 .../phase2/src/Phase2aActivator.cc              |   57 -
 .../dm_example_cxx/phase2/src/Phase2aCmp.cc     |   45 -
 .../phase2/src/Phase2bActivator.cc              |   50 -
 .../dm_example_cxx/phase2/src/Phase2bCmp.cc     |   45 -
 examples/dm_example_cxx/phase3/CMakeLists.txt   |   38 -
 .../phase3/src/Phase3Activator.cc               |   37 -
 .../dm_example_cxx/phase3/src/Phase3Activator.h |   33 -
 .../phase3/src/Phase3BaseActivator.cc           |   31 -
 .../phase3/src/Phase3BaseActivator.h            |   35 -
 examples/dm_example_cxx/phase3/src/Phase3Cmp.cc |   65 -
 examples/dm_example_cxx/phase3/src/Phase3Cmp.h  |   50 -
 .../phase3_locking/CMakeLists.txt               |   38 -
 .../src/Phase3LockingActivator.cc               |   42 -
 .../phase3_locking/src/Phase3LockingActivator.h |   33 -
 .../phase3_locking/src/Phase3LockingCmp.cc      |   66 -
 .../phase3_locking/src/Phase3LockingCmp.h       |   50 -
 examples/embedding/CMakeLists.txt               |   20 -
 examples/embedding/private/src/main.c           |   99 -
 examples/hello_world/CMakeLists.txt             |   63 -
 examples/hello_world/private/src/activator.c    |   68 -
 examples/hello_world/private/src/test.c         |   32 -
 examples/hello_world/private/src/test2.c        |   32 -
 examples/hello_world/public/include/test.h      |   34 -
 examples/hello_world/public/include/test2.h     |   34 -
 examples/hello_world_test/CMakeLists.txt        |   90 -
 .../hello_world_test/private/src/activator.c    |   63 -
 examples/hello_world_test/private/src/test.c    |   32 -
 examples/hello_world_test/public/include/test.h |   34 -
 examples/log_service_example/CMakeLists.txt     |   31 -
 examples/log_service_example/src/activator.c    |   85 -
 examples/mongoose/CMakeLists.txt                |   42 -
 examples/mongoose/private/include/mongoose.h    |  218 -
 examples/mongoose/private/src/activator.c       |   79 -
 examples/mongoose/private/src/mongoose.c        | 4076 ------------------
 examples/mongoose/root/index.html               |   23 -
 examples/service_hook_example/CMakeLists.txt    |   30 -
 examples/service_hook_example/src/activator.c   |  137 -
 examples/services_example_c/CMakeLists.txt      |   43 -
 examples/services_example_c/api/example.h       |   34 -
 examples/services_example_c/bar/CMakeLists.txt  |   39 -
 .../bar/private/include/bar.h                   |   32 -
 .../services_example_c/bar/private/src/bar.c    |   58 -
 .../bar/private/src/bar_activator.c             |   70 -
 examples/services_example_c/foo1/CMakeLists.txt |   39 -
 .../foo1/private/include/foo1.h                 |   36 -
 .../services_example_c/foo1/private/src/foo1.c  |  102 -
 .../foo1/private/src/foo1_activator.c           |   88 -
 examples/services_example_c/foo2/CMakeLists.txt |   39 -
 .../foo2/private/include/foo2.h                 |   36 -
 .../services_example_c/foo2/private/src/foo2.c  |  113 -
 .../foo2/private/src/foo2_activator.c           |   88 -
 examples/services_example_cxx/CMakeLists.txt    |   43 -
 .../services_example_cxx/api/IAnotherExample.h  |   34 -
 examples/services_example_cxx/api/example.h     |   43 -
 .../services_example_cxx/bar/CMakeLists.txt     |   41 -
 .../bar/private/include/Bar.h                   |   40 -
 .../bar/private/include/BarActivator.h          |   36 -
 .../services_example_cxx/bar/private/src/Bar.cc |   48 -
 .../bar/private/src/BarActivator.cc             |   48 -
 .../services_example_cxx/baz/CMakeLists.txt     |   41 -
 .../baz/private/include/Baz.h                   |   54 -
 .../baz/private/include/BazActivator.h          |   34 -
 .../services_example_cxx/baz/private/src/Baz.cc |   84 -
 .../baz/private/src/BazActivator.cc             |   45 -
 .../services_example_cxx/foo/CMakeLists.txt     |   41 -
 .../foo/private/include/Foo.h                   |   48 -
 .../foo/private/include/FooActivator.h          |   34 -
 .../services_example_cxx/foo/private/src/Foo.cc |   60 -
 .../foo/private/src/FooActivator.cc             |   43 -
 launcher/CMakeLists.txt                         |    3 +-
 209 files changed, 9638 insertions(+), 9596 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ad6145..86d464a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,7 +89,7 @@ add_subdirectory(dependency_manager)
 add_subdirectory(dependency_manager_cxx)
 
 #Example as last, because some example will check if underlining options are enabled
-add_subdirectory(examples)
+add_subdirectory(examples/celix-examples examples)
 
 #export targets
 install(EXPORT celix NAMESPACE Celix:: DESTINATION share/celix/cmake FILE CelixTargets.cmake COMPONENT cmake)

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/etcdlib/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/etcdlib/CMakeLists.txt b/etcdlib/CMakeLists.txt
index fac356a..d9909dc 100644
--- a/etcdlib/CMakeLists.txt
+++ b/etcdlib/CMakeLists.txt
@@ -16,8 +16,8 @@
 # under the License.
 
 
-if (NOT PROJECT_SOURCE_DIR) 
-    #If PROJECT_SOURCE_DIR is not defined, this CMakeLists will
+if (NOT COMMAND celix_subproject) 
+    #If COMMAND celix_subproject is not defined, this CMakeLists will
     #act as a top level project. Making the etcdlib useable 
     #stand-alone
 
@@ -44,7 +44,10 @@ find_package(Jansson REQUIRED)
 add_library(etcdlib SHARED
     src/etcd.c
 )
-target_include_directories(etcdlib PUBLIC api)
+target_include_directories(etcdlib PUBLIC 
+    $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/api>
+    $<INSTALL_INTERFACE:include/etcdlib>
+)
 target_include_directories(etcdlib PRIVATE
     src
     ${CURL_INCLUDE_DIRS}
@@ -58,7 +61,10 @@ target_link_libraries(etcdlib ${CURL_LIBRARIES} ${JANSSON_LIBRARIES})
 add_library(etcdlib_static STATIC
     src/etcd.c
 )
-target_include_directories(etcdlib_static PUBLIC api)
+target_include_directories(etcdlib_static PUBLIC 
+    $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/api>
+    $<INSTALL_INTERFACE:include/etcdlib>
+)
 target_include_directories(etcdlib_static PRIVATE
     src
     ${CURL_INCLUDE_DIRS}
@@ -67,9 +73,12 @@ target_include_directories(etcdlib_static PRIVATE
 set_target_properties(etcdlib_static PROPERTIES "SOVERSION" 1)
 target_link_libraries(etcdlib_static ${CURL_LIBRARIES} ${JANSSON_LIBRARY})
 
-
-install(TARGETS etcdlib etcdlib_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${ETCDLIB_CMP})
-
-#Setup target aliases to match external usage
-add_library(Celix::etcdlib ALIAS etcdlib)
-add_library(Celix::etcdlib_static ALIAS etcdlib_static)
\ No newline at end of file
+install(DIRECTORY api/ DESTINATION include/etcdlib COMPONENT ${ETCDLIB_CMP})
+if (NOT COMMAND celix_subproject) 
+    install(TARGETS etcdlib etcdlib_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${ETCDLIB_CMP})
+else ()
+    install(TARGETS etcdlib etcdlib_static EXPORT celix DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${ETCDLIB_CMP})
+    #Setup target aliases to match external usage
+    add_library(Celix::etcdlib ALIAS etcdlib)
+    add_library(Celix::etcdlib_static ALIAS etcdlib_static)
+endif ()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 0937cc9..d775f8f 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -15,26 +15,20 @@
 # specific language governing permissions and limitations
 # under the License.
 
-if (COMMAND celix_subproject)
-    celix_subproject(EXAMPLES "Option to enable building the Examples" ON DEPS FRAMEWORK LAUNCHER SHELL_TUI LOG_SERVICE LOG_WRITER)
-else ()
-    set(EXAMPLES true) #celix_subproject is only available in the celix project -> using examples dir in other project is also supported
-endif ()
-if (EXAMPLES)
-    add_subdirectory(hello_world)
-    add_subdirectory(hello_world_test)
+# This Project contains some example how to use Apache Celix,
+# including CMake files, C examples and C++ examples.
 
-    add_subdirectory(services_example_c)
-    add_subdirectory(services_example_cxx)
+# To build these example:
+# - build and install celix
+# - Create a new build project dir and cd to it
+# - set the CMAKE_PREFIX_PATH to the install location
+#   of Celix (e.g. /opt/local) if this is different from
+#   /usr or /usr/local
+# - cmake <loc_to_celix_src>/examples
+# - make -j all
 
-    add_subdirectory(dm_example)
-    add_subdirectory(dm_example_cxx)
-
-    if (NOT ANDROID)
-    	add_subdirectory(mongoose)
-    endif()
-    add_subdirectory(embedding)
-    add_subdirectory(service_hook_example)
-    add_subdirectory(log_service_example)
-
-endif(EXAMPLES)
+cmake_minimum_required (VERSION 3.2)
+project (CelixUse C CXX)
+set(CMAKE_CXX_FLAGS "-std=c++11")
+find_package(Celix REQUIRED)
+add_subdirectory(celix-examples examples)

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/celix-examples/CMakeLists.txt b/examples/celix-examples/CMakeLists.txt
new file mode 100644
index 0000000..0937cc9
--- /dev/null
+++ b/examples/celix-examples/CMakeLists.txt
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+if (COMMAND celix_subproject)
+    celix_subproject(EXAMPLES "Option to enable building the Examples" ON DEPS FRAMEWORK LAUNCHER SHELL_TUI LOG_SERVICE LOG_WRITER)
+else ()
+    set(EXAMPLES true) #celix_subproject is only available in the celix project -> using examples dir in other project is also supported
+endif ()
+if (EXAMPLES)
+    add_subdirectory(hello_world)
+    add_subdirectory(hello_world_test)
+
+    add_subdirectory(services_example_c)
+    add_subdirectory(services_example_cxx)
+
+    add_subdirectory(dm_example)
+    add_subdirectory(dm_example_cxx)
+
+    if (NOT ANDROID)
+    	add_subdirectory(mongoose)
+    endif()
+    add_subdirectory(embedding)
+    add_subdirectory(service_hook_example)
+    add_subdirectory(log_service_example)
+
+endif(EXAMPLES)

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/CMakeLists.txt b/examples/celix-examples/dm_example/CMakeLists.txt
new file mode 100644
index 0000000..9759702
--- /dev/null
+++ b/examples/celix-examples/dm_example/CMakeLists.txt
@@ -0,0 +1,63 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+if (TARGET Celix::dependency_manager_static AND TARGET Celix::dm_shell)
+
+    add_subdirectory(api)
+
+    add_subdirectory(phase1)
+    add_subdirectory(phase2a)
+    add_subdirectory(phase2b)
+    add_subdirectory(phase3)
+
+
+    add_celix_container(dm_example
+        COPY 
+        BUNDLES
+            Celix::shell
+            Celix::shell_tui
+            Celix::dm_shell
+            dm_example_phase1
+            dm_example_phase2a
+            dm_example_phase2b
+            dm_example_phase3
+        PROPERTIES
+            LOGHELPER_ENABLE_STDOUT_FALLBACK=true
+    )
+
+    add_celix_docker(dm_exmpl_base
+            NAME dmbase
+            IMAGE_NAME dmbase
+            GROUP examples
+            INSTRUCTIONS
+                "LABEL exmpl=value"
+    )
+    add_celix_docker(dm_exmpl
+        FROM dmbase
+        GROUP examples
+        BUNDLES
+            Celix::shell
+            Celix::shell_tui
+            Celix::dm_shell
+            dm_example_phase1
+            dm_example_phase2a
+            dm_example_phase2b
+            dm_example_phase3
+        PROPERTIES
+            LOGHELPER_ENABLE_STDOUT_FALLBACK=true
+    )
+
+endif ()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/api/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/api/CMakeLists.txt b/examples/celix-examples/dm_example/api/CMakeLists.txt
new file mode 100644
index 0000000..edbb643
--- /dev/null
+++ b/examples/celix-examples/dm_example/api/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+add_library(dm_example_api INTERFACE)
+target_include_directories(dm_example_api INTERFACE include)

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/api/include/phase1.h
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/api/include/phase1.h b/examples/celix-examples/dm_example/api/include/phase1.h
new file mode 100644
index 0000000..04e9da7
--- /dev/null
+++ b/examples/celix-examples/dm_example/api/include/phase1.h
@@ -0,0 +1,44 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * publisher.h
+ *
+ *  \date       Aug 23, 2010
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+
+#ifndef PHASE1_H_
+#define PHASE1_H_
+
+#define PHASE1_NAME         "PHASE1"
+#define PHASE1_VERSION      "1.2.2.0"
+#define PHASE1_RANGE_ALL    "[1.2.2.0,4.5.6.x)"
+#define PHASE1_RANGE_EXACT  "[1.2.2.0,1.2.2.0]"
+
+
+
+struct phase1_struct {
+	void *handle;
+	int (*getData)(void *handle, unsigned int *data);
+};
+
+typedef struct phase1_struct phase1_t;
+
+#endif /* PHASE1_H_ */

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/api/include/phase2.h
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/api/include/phase2.h b/examples/celix-examples/dm_example/api/include/phase2.h
new file mode 100644
index 0000000..2f4df86
--- /dev/null
+++ b/examples/celix-examples/dm_example/api/include/phase2.h
@@ -0,0 +1,41 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * publisher.h
+ *
+ *  \date       Aug 23, 2010
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+
+#ifndef PHASE2_H
+#define PHASE2_H
+
+#define PHASE2_NAME     "PHASE2"
+#define PHASE2_VERSION  "1.0.0.0"
+
+struct phase2_struct {
+	void *handle;
+	void (*getData)(void *handle, double *data);
+};
+
+typedef struct phase2_struct phase2_t;
+
+
+#endif /* PHASE2_H */

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase1/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase1/CMakeLists.txt b/examples/celix-examples/dm_example/phase1/CMakeLists.txt
new file mode 100644
index 0000000..09402ea
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase1/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+add_celix_bundle(dm_example_phase1
+    SYMBOLIC_NAME phase1
+    VERSION 0.0.1
+    SOURCES
+        src/phase1_activator
+        src/phase1_cmp.c
+)
+target_include_directories(dm_example_phase1 PRIVATE src)
+target_link_libraries(dm_example_phase1 PRIVATE dm_example_api)
+
+IF(APPLE)
+    target_link_libraries(dm_example_phase1 PRIVATE -Wl,-all_load Celix::dependency_manager_static)
+else()
+    if(ENABLE_ADDRESS_SANITIZER)
+        #With asan there can be undefined symbols
+        target_link_libraries(dm_example_phase1 PRIVATE -Wl,--whole-archive Celix::dependency_manager_static -Wl,--no-whole-archive)
+    else()
+        target_link_libraries(dm_example_phase1 PRIVATE -Wl,--no-undefined -Wl,--whole-archive Celix::dependency_manager_static -Wl,--no-whole-archive)
+    endif()
+endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase1/src/phase1_activator.c
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase1/src/phase1_activator.c b/examples/celix-examples/dm_example/phase1/src/phase1_activator.c
new file mode 100644
index 0000000..31dcb16
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase1/src/phase1_activator.c
@@ -0,0 +1,86 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * activator.c
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+#include <stdlib.h>
+#include <phase1_cmp.h>
+
+#include "bundle_activator.h"
+#include "dm_activator.h"
+
+#include "phase1.h"
+
+struct phase1_activator_struct {
+    phase1_cmp_t *phase1Cmp;
+	phase1_t phase1Serv;
+};
+
+celix_status_t dm_create(bundle_context_pt context, void **userData) {
+	printf("PHASE1: dm_create\n");
+	*userData = calloc(1, sizeof(struct phase1_activator_struct));
+	return *userData != NULL ? CELIX_SUCCESS : CELIX_ENOMEM;
+}
+
+celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
+	printf("PHASE1: dm_init\n");
+    celix_status_t status = CELIX_SUCCESS;
+
+
+    struct phase1_activator_struct *act = (struct phase1_activator_struct *)userData;
+
+	act->phase1Cmp = phase1_create();
+	if (act->phase1Cmp != NULL) {
+
+		act->phase1Serv.handle = act->phase1Cmp;
+		act->phase1Serv.getData = (void *)phase1_getData;
+
+		properties_pt props = properties_create();
+		properties_set(props, "id", "phase1");
+
+		dm_component_pt cmp;
+		component_create(context, "PHASE1_PROCESSING_COMPONENT", &cmp);
+		component_setImplementation(cmp, act->phase1Cmp);
+		component_setCallbacksSafe(cmp, phase1_cmp_t *, phase1_init, phase1_start, phase1_stop, phase1_deinit);
+		phase1_setComp(act->phase1Cmp, cmp);
+		component_addInterface(cmp, PHASE1_NAME, PHASE1_VERSION, &act->phase1Serv, props);
+
+		dependencyManager_add(manager, cmp);
+	} else {
+		status = CELIX_ENOMEM;
+	}
+
+    return status;
+}
+
+celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
+	printf("PHASE1: dm-destroy\n");
+
+	struct phase1_activator_struct *act = (struct phase1_activator_struct *)userData;
+	if (act->phase1Cmp != NULL) {
+		phase1_destroy(act->phase1Cmp);
+	}
+	free(act);
+
+	return CELIX_SUCCESS;
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase1/src/phase1_cmp.c
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase1/src/phase1_cmp.c b/examples/celix-examples/dm_example/phase1/src/phase1_cmp.c
new file mode 100644
index 0000000..40da821
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase1/src/phase1_cmp.c
@@ -0,0 +1,110 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * publisher.c
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <signal.h>
+
+#include "celix_threads.h"
+#include "phase1_cmp.h"
+#include "dm_component.h"
+
+#define SLEEPTIME 1000
+
+struct phase1_cmp_struct {
+	celix_thread_t thread;
+    bool running;
+	unsigned int counter;
+	dm_component_pt component;
+
+};
+
+static void *phase1_thread(void *data);
+
+phase1_cmp_t *phase1_create(void) {
+	phase1_cmp_t *cmp = calloc(1, sizeof(*cmp));
+	if (cmp != NULL) {
+		cmp->counter = 0;
+        cmp->running = false;
+	}
+	return cmp;
+}
+
+void phase1_setComp(phase1_cmp_t *cmp, dm_component_pt dmCmp) {
+	cmp->component = dmCmp;
+}
+
+int phase1_init(phase1_cmp_t *cmp) {
+	printf("init phase1\n");
+    return 0;
+}
+
+int phase1_start(phase1_cmp_t *cmp) {
+	printf("start phase1\n");
+    cmp->running = true;
+    celixThread_create(&cmp->thread, NULL, phase1_thread, cmp);
+    return 0;
+}
+
+int phase1_stop(phase1_cmp_t *cmp) {
+	printf("stop phase1\n");
+    cmp->running = false;
+    celixThread_kill(cmp->thread, SIGUSR1);
+    celixThread_join(cmp->thread, NULL);
+    return 0;
+}
+
+int phase1_deinit(phase1_cmp_t *cmp) {
+    printf("deinit phase1\n");
+    return 0;
+}
+
+void phase1_destroy(phase1_cmp_t *cmp) {
+    free(cmp);
+	printf("destroy phase1\n");
+}
+
+static void *phase1_thread(void *data) {
+    phase1_cmp_t *cmp = data;
+
+    while (cmp->running) {
+        cmp->counter += 1;
+        if (cmp->counter == 2) {
+        	static char *runtime_interface = "DUMMY INTERFACE: DO NOT USE\n";
+        	component_addInterface(cmp->component, "RUNTIME_ADDED_INTERFACE", "1.0.0", runtime_interface, NULL);
+        }
+        usleep(SLEEPTIME);
+    }
+
+    celixThread_exit(NULL);
+    return NULL;
+}
+
+int phase1_getData(phase1_cmp_t *cmp, unsigned int *data) {
+    *data = cmp->counter;
+    return 0;
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase1/src/phase1_cmp.h
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase1/src/phase1_cmp.h b/examples/celix-examples/dm_example/phase1/src/phase1_cmp.h
new file mode 100644
index 0000000..153eed1
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase1/src/phase1_cmp.h
@@ -0,0 +1,44 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * publisher.h
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+
+#ifndef PHASE1_CMP_H
+#define PHASE1_CMP_H
+#include "dm_component.h"
+
+typedef struct phase1_cmp_struct phase1_cmp_t;
+
+phase1_cmp_t *phase1_create(void);
+void phase1_setComp(phase1_cmp_t *cmp, dm_component_pt dmCmp);
+int phase1_init(phase1_cmp_t *cmp);
+int phase1_start(phase1_cmp_t *cmp);
+int phase1_stop(phase1_cmp_t *cmp);
+int phase1_deinit(phase1_cmp_t *cmp);
+void phase1_destroy(phase1_cmp_t *cmp);
+
+int phase1_getData(phase1_cmp_t *cmp, unsigned int *data);
+
+
+#endif //PHASE1_CMP_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase2a/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase2a/CMakeLists.txt b/examples/celix-examples/dm_example/phase2a/CMakeLists.txt
new file mode 100644
index 0000000..82a6fb5
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase2a/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+add_celix_bundle(dm_example_phase2a
+        SYMBOLIC_NAME phase2a
+        VERSION 0.0.1
+        SOURCES
+            src/phase2a_activator
+            src/phase2a_cmp
+)
+target_include_directories(dm_example_phase2a PRIVATE src)
+target_link_libraries(dm_example_phase2a PRIVATE dm_example_api)
+
+IF(APPLE)
+    target_link_libraries(dm_example_phase2a PRIVATE  -Wl,-all_load Celix::dependency_manager_static)
+else()
+    if(ENABLE_ADDRESS_SANITIZER)
+        #With asan there can be undefined symbols
+        target_link_libraries(dm_example_phase2a PRIVATE -Wl,--whole-archive Celix::dependency_manager_static -Wl,--no-whole-archive)
+    else()
+        target_link_libraries(dm_example_phase2a PRIVATE  -Wl,--no-undefined -Wl,--whole-archive Celix::dependency_manager_static -Wl,--no-whole-archive)
+    endif()
+ENDIF()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase2a/src/phase2a_activator.c
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase2a/src/phase2a_activator.c b/examples/celix-examples/dm_example/phase2a/src/phase2a_activator.c
new file mode 100644
index 0000000..6416c68
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase2a/src/phase2a_activator.c
@@ -0,0 +1,95 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * activator.c
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+#include <stdlib.h>
+#include <phase2a_cmp.h>
+
+#include "bundle_activator.h"
+#include "dm_activator.h"
+
+#include "phase1.h"
+#include "phase2.h"
+#include "phase2a_cmp.h"
+
+struct phase2a_activator_struct {
+    phase2a_cmp_t *phase2aCmp;
+	phase2_t phase2Serv;
+};
+
+celix_status_t dm_create(bundle_context_pt context, void **userData) {
+	printf("phase2a: dm_create\n");
+	*userData = calloc(1, sizeof(struct phase2a_activator_struct));
+	return *userData != NULL ? CELIX_SUCCESS : CELIX_ENOMEM;
+}
+
+celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
+	printf("phase2a: dm_init\n");
+    celix_status_t status = CELIX_SUCCESS;
+
+    struct phase2a_activator_struct *act = (struct phase2a_activator_struct *)userData;
+
+	act->phase2aCmp = phase2a_create();
+	if (act->phase2aCmp != NULL) {
+
+		act->phase2Serv.handle = act->phase2aCmp;
+		act->phase2Serv.getData = (void *)phase2a_getData;
+
+		properties_pt props = properties_create();
+		properties_set(props, "id", "phase2a");
+
+		dm_component_pt cmp;
+		component_create(context, "PHASE2A_PROCESSING_COMPONENT", &cmp);
+		component_setImplementation(cmp, act->phase2aCmp);
+		component_setCallbacksSafe(cmp, phase2a_cmp_t *, phase2a_init, phase2a_start, phase2a_stop, phase2a_deinit);
+		component_addInterface(cmp, PHASE2_NAME, PHASE2_VERSION, &act->phase2Serv, props);
+
+
+		dm_service_dependency_pt dep;
+		serviceDependency_create(&dep);
+		serviceDependency_setService(dep, PHASE1_NAME, PHASE1_RANGE_ALL, NULL);
+        serviceDependency_setCallbacksSafe(dep, phase2a_cmp_t*, const phase1_t*, phase2a_setPhase1, NULL, NULL, NULL, NULL);
+		serviceDependency_setStrategy(dep, DM_SERVICE_DEPENDENCY_STRATEGY_LOCKING);
+		serviceDependency_setRequired(dep, true);
+		component_addServiceDependency(cmp, dep);
+
+		dependencyManager_add(manager, cmp);
+	} else {
+		status = CELIX_ENOMEM;
+	}
+
+    return status;
+}
+
+celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
+	printf("phase2a: dm-destroy\n");
+
+	struct phase2a_activator_struct *act = (struct phase2a_activator_struct *)userData;
+	if (act->phase2aCmp != NULL) {
+		phase2a_destroy(act->phase2aCmp);
+	}
+	free(act);
+
+	return CELIX_SUCCESS;
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase2a/src/phase2a_cmp.c
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase2a/src/phase2a_cmp.c b/examples/celix-examples/dm_example/phase2a/src/phase2a_cmp.c
new file mode 100644
index 0000000..d115b69
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase2a/src/phase2a_cmp.c
@@ -0,0 +1,116 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * publisher.c
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+
+#include "celix_threads.h"
+#include "phase2a_cmp.h"
+
+#define SLEEPTIME 2000000
+
+struct phase2a_cmp_struct {
+	celix_thread_t thread;
+    bool running;
+	double currentValue;
+    celix_thread_mutex_t mutex;
+    const phase1_t* phase1Serv;
+};
+
+static void *phase2a_thread(void *data);
+
+phase2a_cmp_t *phase2a_create(void) {
+	phase2a_cmp_t *cmp = calloc(1, sizeof(*cmp));
+	if (cmp != NULL) {
+		cmp->currentValue = 0.0;
+        cmp->running = false;
+        celixThreadMutex_create(&cmp->mutex, NULL);
+	}
+	return cmp;
+}
+
+int phase2a_init(phase2a_cmp_t *cmp) {
+	printf("init phase2a\n");
+    return 0;
+}
+
+int phase2a_start(phase2a_cmp_t *cmp) {
+	printf("start phase2a\n");
+    cmp->running = true;
+    celixThread_create(&cmp->thread, NULL, phase2a_thread, cmp);
+    return 0;
+}
+
+int phase2a_stop(phase2a_cmp_t *cmp) {
+	printf("stop phase2a\n");
+    cmp->running = false;
+    celixThread_kill(cmp->thread, SIGUSR1);
+    celixThread_join(cmp->thread, NULL);
+    return 0;
+}
+
+int phase2a_deinit(phase2a_cmp_t *cmp) {
+    printf("deinit phase2a\n");
+    return 0;
+}
+
+void phase2a_destroy(phase2a_cmp_t *cmp) {
+    celixThreadMutex_destroy(&cmp->mutex);
+    free(cmp);
+	printf("destroy phase2a\n");
+}
+
+int phase2a_setPhase1(phase2a_cmp_t *cmp, const phase1_t* phase1) {
+    printf("phase2a_setPhase1 called!\n\n");
+    celixThreadMutex_lock(&cmp->mutex);
+    cmp->phase1Serv = phase1;
+    celixThreadMutex_unlock(&cmp->mutex);
+    return 0;
+}
+
+static void *phase2a_thread(void *data) {
+    phase2a_cmp_t *cmp = data;
+    unsigned int counter;
+
+    while (cmp->running) {
+        celixThreadMutex_lock(&cmp->mutex);
+        if (cmp->phase1Serv != NULL) {
+            cmp->phase1Serv->getData(cmp->phase1Serv->handle, &counter);
+            cmp->currentValue = 1.0 / counter;
+        }
+        celixThreadMutex_unlock(&cmp->mutex);
+        usleep(SLEEPTIME);
+    }
+
+    celixThread_exit(NULL);
+    return NULL;
+}
+
+int phase2a_getData(phase2a_cmp_t *cmp, double *data) {
+    *data = cmp->currentValue;
+    return 0;
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase2a/src/phase2a_cmp.h
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase2a/src/phase2a_cmp.h b/examples/celix-examples/dm_example/phase2a/src/phase2a_cmp.h
new file mode 100644
index 0000000..060b23d
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase2a/src/phase2a_cmp.h
@@ -0,0 +1,46 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * publisher.h
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+
+#ifndef PHASE2A_CMP_H
+#define PHASE2A_CMP_H
+
+#include "phase1.h"
+
+typedef struct phase2a_cmp_struct phase2a_cmp_t;
+
+phase2a_cmp_t *phase2a_create(void);
+int phase2a_init(phase2a_cmp_t *cmp);
+int phase2a_start(phase2a_cmp_t *cmp);
+int phase2a_stop(phase2a_cmp_t *cmp);
+int phase2a_deinit(phase2a_cmp_t *cmp);
+void phase2a_destroy(phase2a_cmp_t *cmp);
+
+int phase2a_setPhase1(phase2a_cmp_t *cmp, const phase1_t* phase1);
+
+int phase2a_getData(phase2a_cmp_t *cmp, double *data);
+
+
+#endif //PHASE2A_CMP_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase2b/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase2b/CMakeLists.txt b/examples/celix-examples/dm_example/phase2b/CMakeLists.txt
new file mode 100644
index 0000000..9172ad8
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase2b/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+add_celix_bundle(dm_example_phase2b
+        SYMBOLIC_NAME phase2b
+        VERSION 0.0.1
+        SOURCES
+            src/phase2b_activator
+            src/phase2b_cmp
+)
+target_include_directories(dm_example_phase2b PRIVATE src)
+target_link_libraries(dm_example_phase2b PRIVATE dm_example_api)
+
+IF(APPLE)
+    target_link_libraries(dm_example_phase2b PRIVATE -Wl,-all_load Celix::dependency_manager_static)
+else()
+    if(ENABLE_ADDRESS_SANITIZER)
+        #With asan there can be undefined symbols
+        target_link_libraries(dm_example_phase2b PRIVATE -Wl,--whole-archive Celix::dependency_manager_static -Wl,--no-whole-archive)
+    else()
+        target_link_libraries(dm_example_phase2b PRIVATE -Wl,--no-undefined -Wl,--whole-archive Celix::dependency_manager_static -Wl,--no-whole-archive)
+    endif()
+ENDIF()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase2b/src/phase2b_activator.c
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase2b/src/phase2b_activator.c b/examples/celix-examples/dm_example/phase2b/src/phase2b_activator.c
new file mode 100644
index 0000000..c7692d4
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase2b/src/phase2b_activator.c
@@ -0,0 +1,95 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * activator.c
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+#include <stdlib.h>
+#include <phase2b_cmp.h>
+
+#include "bundle_activator.h"
+#include "dm_activator.h"
+
+#include "phase1.h"
+#include "phase2.h"
+#include "phase2b_cmp.h"
+
+struct phase2b_activator_struct {
+    phase2b_cmp_t *phase2bCmp;
+	phase2_t phase2Serv;
+};
+
+celix_status_t dm_create(bundle_context_pt context, void **userData) {
+	printf("phase2b: dm_create\n");
+	*userData = calloc(1, sizeof(struct phase2b_activator_struct));
+	return *userData != NULL ? CELIX_SUCCESS : CELIX_ENOMEM;
+}
+
+celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
+	printf("phase2b: dm_init\n");
+    celix_status_t status = CELIX_SUCCESS;
+
+    struct phase2b_activator_struct *act = (struct phase2b_activator_struct *)userData;
+
+	act->phase2bCmp = phase2b_create();
+	if (act->phase2bCmp != NULL) {
+
+		act->phase2Serv.handle = act->phase2bCmp;
+		act->phase2Serv.getData = (void *)phase2b_getData;
+
+		properties_pt props = properties_create();
+		properties_set(props, "id", "phase2b");
+
+		dm_component_pt cmp;
+		component_create(context, "PHASE2B_PROCESSING_COMPONENT", &cmp);
+		component_setImplementation(cmp, act->phase2bCmp);
+		component_setCallbacksSafe(cmp, phase2b_cmp_t *, phase2b_init, phase2b_start, phase2b_stop, phase2b_deinit);
+		component_addInterface(cmp, PHASE2_NAME, PHASE2_VERSION, &act->phase2Serv, props);
+
+
+		dm_service_dependency_pt dep;
+		serviceDependency_create(&dep);
+		serviceDependency_setService(dep, PHASE1_NAME, PHASE1_RANGE_EXACT, NULL);
+		serviceDependency_setCallbacksSafe(dep, phase2b_cmp_t*, const phase1_t*, phase2b_setPhase1, NULL, NULL, NULL, NULL);
+		serviceDependency_setRequired(dep, true);
+		serviceDependency_setStrategy(dep, DM_SERVICE_DEPENDENCY_STRATEGY_LOCKING);
+		component_addServiceDependency(cmp, dep);
+
+		dependencyManager_add(manager, cmp);
+	} else {
+		status = CELIX_ENOMEM;
+	}
+
+    return status;
+}
+
+celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
+	printf("phase2b: dm-destroy\n");
+
+	struct phase2b_activator_struct *act = (struct phase2b_activator_struct *)userData;
+	if (act->phase2bCmp != NULL) {
+		phase2b_destroy(act->phase2bCmp);
+	}
+	free(act);
+
+	return CELIX_SUCCESS;
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase2b/src/phase2b_cmp.c
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase2b/src/phase2b_cmp.c b/examples/celix-examples/dm_example/phase2b/src/phase2b_cmp.c
new file mode 100644
index 0000000..a74dcfa
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase2b/src/phase2b_cmp.c
@@ -0,0 +1,115 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * publisher.c
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+
+#include "celix_threads.h"
+#include "phase2b_cmp.h"
+
+#define SLEEPTIME 2000000
+
+struct phase2b_cmp_struct {
+	celix_thread_t thread;
+    bool running;
+	double currentValue;
+    celix_thread_mutex_t mutex;
+    const phase1_t* phase1Serv;
+};
+
+static void *phase2b_thread(void *data);
+
+phase2b_cmp_t *phase2b_create(void) {
+	phase2b_cmp_t *cmp = calloc(1, sizeof(*cmp));
+	if (cmp != NULL) {
+		cmp->currentValue = 0.0;
+        cmp->running = false;
+        celixThreadMutex_create(&cmp->mutex, NULL);
+	}
+	return cmp;
+}
+
+int phase2b_init(phase2b_cmp_t *cmp) {
+	printf("init phase2b\n");
+    return 0;
+}
+
+int phase2b_start(phase2b_cmp_t *cmp) {
+	printf("start phase2b\n");
+    cmp->running = true;
+    celixThread_create(&cmp->thread, NULL, phase2b_thread, cmp);
+    return 0;
+}
+
+int phase2b_stop(phase2b_cmp_t *cmp) {
+	printf("stop phase2b\n");
+    cmp->running = false;
+    celixThread_kill(cmp->thread, SIGUSR1);
+    celixThread_join(cmp->thread, NULL);
+    return 0;
+}
+
+int phase2b_deinit(phase2b_cmp_t *cmp) {
+    printf("deinit phase2b\n");
+    return 0;
+}
+
+void phase2b_destroy(phase2b_cmp_t *cmp) {
+    celixThreadMutex_destroy(&cmp->mutex);
+    free(cmp);
+	printf("destroy phase2b\n");
+}
+
+int phase2b_setPhase1(phase2b_cmp_t *cmp, const phase1_t* phase1) {
+    celixThreadMutex_lock(&cmp->mutex);
+    cmp->phase1Serv = phase1;
+    celixThreadMutex_unlock(&cmp->mutex);
+    return 0;
+}
+
+static void *phase2b_thread(void *data) {
+    phase2b_cmp_t *cmp = data;
+    unsigned int counter;
+
+    while (cmp->running) {
+        celixThreadMutex_lock(&cmp->mutex);
+        if (cmp->phase1Serv != NULL) {
+            cmp->phase1Serv->getData(cmp->phase1Serv->handle, &counter);
+            cmp->currentValue = counter / 1000;
+        }
+        celixThreadMutex_unlock(&cmp->mutex);
+        usleep(SLEEPTIME);
+    }
+
+    celixThread_exit(NULL);
+    return NULL;
+}
+
+int phase2b_getData(phase2b_cmp_t *cmp, double *data) {
+    *data = cmp->currentValue;
+    return 0;
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase2b/src/phase2b_cmp.h
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase2b/src/phase2b_cmp.h b/examples/celix-examples/dm_example/phase2b/src/phase2b_cmp.h
new file mode 100644
index 0000000..7ae0358
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase2b/src/phase2b_cmp.h
@@ -0,0 +1,46 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * publisher.h
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+
+#ifndef PHASE2B_CMP_H
+#define PHASE2B_CMP_H
+
+#include "phase1.h"
+
+typedef struct phase2b_cmp_struct phase2b_cmp_t;
+
+phase2b_cmp_t *phase2b_create(void);
+int phase2b_init(phase2b_cmp_t *cmp);
+int phase2b_start(phase2b_cmp_t *cmp);
+int phase2b_stop(phase2b_cmp_t *cmp);
+int phase2b_deinit(phase2b_cmp_t *cmp);
+void phase2b_destroy(phase2b_cmp_t *cmp);
+
+int phase2b_setPhase1(phase2b_cmp_t *cmp, const phase1_t* phase1);
+
+int phase2b_getData(phase2b_cmp_t *cmp, double *data);
+
+
+#endif //PHASE2B_CMP_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase3/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase3/CMakeLists.txt b/examples/celix-examples/dm_example/phase3/CMakeLists.txt
new file mode 100644
index 0000000..7fae829
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase3/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+add_celix_bundle(dm_example_phase3
+        SYMBOLIC_NAME phase3
+        VERSION 0.0.1
+        SOURCES
+            src/phase3_activator
+            src/phase3_cmp
+)
+target_include_directories(dm_example_phase3 PRIVATE src)
+target_link_libraries(dm_example_phase3 PRIVATE dm_example_api)
+
+IF(APPLE)
+    target_link_libraries(dm_example_phase3 PRIVATE -Wl,-all_load Celix::dependency_manager_static)
+else()
+    if(ENABLE_ADDRESS_SANITIZER)
+        #With asan there can be undefined symbols
+        target_link_libraries(dm_example_phase3 PRIVATE -Wl,--whole-archive Celix::dependency_manager_static -Wl,--no-whole-archive)
+    else()
+        target_link_libraries(dm_example_phase3 PRIVATE -Wl,--no-undefined -Wl,--whole-archive Celix::dependency_manager_static -Wl,--no-whole-archive)
+    endif()
+ENDIF()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase3/src/phase3_activator.c
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase3/src/phase3_activator.c b/examples/celix-examples/dm_example/phase3/src/phase3_activator.c
new file mode 100644
index 0000000..64b7a0b
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase3/src/phase3_activator.c
@@ -0,0 +1,84 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * activator.c
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+#include <stdlib.h>
+
+#include "bundle_activator.h"
+#include "dm_activator.h"
+
+#include "phase2.h"
+#include "phase3_cmp.h"
+
+struct phase3_activator_struct {
+    phase3_cmp_t *phase3Cmp;
+};
+
+celix_status_t dm_create(bundle_context_pt context, void **userData) {
+	printf("phase3: dm_create\n");
+	*userData = calloc(1, sizeof(struct phase3_activator_struct));
+	return *userData != NULL ? CELIX_SUCCESS : CELIX_ENOMEM;
+}
+
+celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
+	printf("phase3: dm_init\n");
+    celix_status_t status = CELIX_SUCCESS;
+
+    struct phase3_activator_struct *act = (struct phase3_activator_struct *)userData;
+
+	act->phase3Cmp = phase3_create();
+	if (act->phase3Cmp != NULL) {
+
+		dm_component_pt cmp;
+		component_create(context, "PHASE3_PROCESSING_COMPONENT", &cmp);
+		component_setImplementation(cmp, act->phase3Cmp);
+		component_setCallbacksSafe(cmp, phase3_cmp_t *, phase3_init, phase3_start, phase3_stop, phase3_deinit);
+
+		dm_service_dependency_pt dep;
+		serviceDependency_create(&dep);
+		serviceDependency_setService(dep, PHASE2_NAME, NULL, NULL);
+		serviceDependency_setStrategy(dep, DM_SERVICE_DEPENDENCY_STRATEGY_SUSPEND); //SUSPEND Strategy is default
+        serviceDependency_setCallbacksSafe(dep, phase3_cmp_t*, const phase2_t*, NULL, phase3_addPhase2, NULL, phase3_removePhase2, NULL);
+		serviceDependency_setRequired(dep, true);
+		component_addServiceDependency(cmp, dep);
+
+		dependencyManager_add(manager, cmp);
+	} else {
+		status = CELIX_ENOMEM;
+	}
+
+    return status;
+}
+
+celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
+	printf("phase3: dm-destroy\n");
+
+	struct phase3_activator_struct *act = (struct phase3_activator_struct *)userData;
+	if (act->phase3Cmp != NULL) {
+		phase3_destroy(act->phase3Cmp);
+	}
+	free(act);
+
+	return CELIX_SUCCESS;
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase3/src/phase3_cmp.c
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase3/src/phase3_cmp.c b/examples/celix-examples/dm_example/phase3/src/phase3_cmp.c
new file mode 100644
index 0000000..47cb720
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase3/src/phase3_cmp.c
@@ -0,0 +1,116 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * publisher.c
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+
+#include "array_list.h"
+#include "celix_threads.h"
+#include "phase3_cmp.h"
+
+#define SLEEPTIME 2000000
+
+struct phase3_cmp_struct {
+	celix_thread_t thread;
+    bool running;
+	double currentValue;
+    array_list_pt phase2Services; //phase2_t *
+};
+
+static void *phase3_thread(void *data);
+
+phase3_cmp_t *phase3_create() {
+	phase3_cmp_t *cmp = calloc(1, sizeof(*cmp));
+	if (cmp != NULL) {
+		cmp->currentValue = 0.0;
+        cmp->running = false;
+        arrayList_create(&cmp->phase2Services);
+	}
+	return cmp;
+}
+
+int phase3_init(phase3_cmp_t *cmp) {
+	printf("init phase3\n");
+    return 0;
+}
+
+int phase3_start(phase3_cmp_t *cmp) {
+	printf("start phase3\n");
+    cmp->running = true;
+    celixThread_create(&cmp->thread, NULL, phase3_thread, cmp);
+    return 0;
+}
+
+int phase3_stop(phase3_cmp_t *cmp) {
+	printf("stop phase3\n");
+    cmp->running = false;
+    celixThread_kill(cmp->thread, SIGUSR1);
+    celixThread_join(cmp->thread, NULL);
+    return 0;
+}
+
+int phase3_deinit(phase3_cmp_t *cmp) {
+    printf("deinit phase3\n");
+    return 0;
+}
+
+void phase3_destroy(phase3_cmp_t *cmp) {
+    arrayList_destroy(cmp->phase2Services);
+    free(cmp);
+	printf("destroy phase3\n");
+}
+
+int phase3_addPhase2(phase3_cmp_t *cmp, const phase2_t* phase2) {
+    arrayList_add(cmp->phase2Services, (void*)phase2);
+    return 0;
+}
+
+int phase3_removePhase2(phase3_cmp_t *cmp, const phase2_t *phase2) {
+    arrayList_removeElement(cmp->phase2Services, (void*)phase2);
+    return 0;
+}
+
+
+static void *phase3_thread(void *data) {
+    phase3_cmp_t *cmp = data;
+    int size;
+    int i;
+    double value;
+
+    while (cmp->running) {
+        size = arrayList_size(cmp->phase2Services);
+        for (i = 0; i < size; i += 1) {
+            const phase2_t* serv = arrayList_get(cmp->phase2Services, i);
+            serv->getData(serv->handle, &value);
+            printf("PHASE3: Data from %p is %f\n", serv, value);
+        }
+        usleep(SLEEPTIME);
+    }
+
+    celixThread_exit(NULL);
+    return NULL;
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example/phase3/src/phase3_cmp.h
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example/phase3/src/phase3_cmp.h b/examples/celix-examples/dm_example/phase3/src/phase3_cmp.h
new file mode 100644
index 0000000..9c63845
--- /dev/null
+++ b/examples/celix-examples/dm_example/phase3/src/phase3_cmp.h
@@ -0,0 +1,45 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * publisher.h
+ *
+ *  \date       Oct 29, 2015
+ *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright	Apache License, Version 2.0
+ */
+
+#ifndef PHASE3_CMP_H
+#define PHASE3_CMP_H
+
+#include "phase2.h"
+
+typedef struct phase3_cmp_struct phase3_cmp_t;
+
+phase3_cmp_t *phase3_create();
+int phase3_init(phase3_cmp_t *cmp);
+int phase3_start(phase3_cmp_t *cmp);
+int phase3_stop(phase3_cmp_t *cmp);
+int phase3_deinit(phase3_cmp_t *cmp);
+void phase3_destroy(phase3_cmp_t *cmp);
+
+int phase3_addPhase2(phase3_cmp_t *cmp, const phase2_t* phase2);
+int phase3_removePhase2(phase3_cmp_t *cmp, const phase2_t* phase2);
+
+
+#endif //PHASE3_CMP_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example_cxx/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example_cxx/CMakeLists.txt b/examples/celix-examples/dm_example_cxx/CMakeLists.txt
new file mode 100644
index 0000000..5f6832c
--- /dev/null
+++ b/examples/celix-examples/dm_example_cxx/CMakeLists.txt
@@ -0,0 +1,68 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+if (TARGET Celix::dependency_manager_cxx_static AND TARGET Celix::dm_shell)
+
+    add_subdirectory(api)
+
+    add_subdirectory(phase1)
+    add_subdirectory(phase2)
+    add_subdirectory(phase3)
+    add_subdirectory(phase3_locking)
+
+
+    add_celix_container("dm_example_cxx"
+        COPY 
+	    CXX
+        BUNDLES
+            Celix::shell
+            Celix::shell_tui
+            Celix::dm_shell
+            Celix::log_service
+            Celix::log_writer_stdout
+
+            dm_example_cxx_phase1
+            dm_example_cxx_phase2a
+            dm_example_cxx_phase2b
+            dm_example_cxx_phase3
+            dm_example_cxx_phase3_locking
+        PROPERTIES
+            LOGHELPER_ENABLE_STDOUT_FALLBACK=true
+    )
+
+
+   add_celix_docker(dm_exmpl_cxx_docker
+           IMAGE_NAME dm_exmpl_cxx
+           GROUP examples
+           BUNDLES_DIR /usr/share/bundles
+           WORKDIR /workspace
+           BUNDLES
+               Celix::shell
+               Celix::shell_tui
+               Celix::dm_shell
+               Celix::log_service
+               Celix::log_writer_stdout
+
+               dm_example_cxx_phase1
+               dm_example_cxx_phase2a
+               dm_example_cxx_phase2b
+               dm_example_cxx_phase3
+               dm_example_cxx_phase3_locking
+           PROPERTIES
+               LOGHELPER_ENABLE_STDOUT_FALLBACK=true
+   )
+
+endif ()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example_cxx/api/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example_cxx/api/CMakeLists.txt b/examples/celix-examples/dm_example_cxx/api/CMakeLists.txt
new file mode 100644
index 0000000..d1d07d5
--- /dev/null
+++ b/examples/celix-examples/dm_example_cxx/api/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+add_library(dm_example_cxx_api INTERFACE)
+target_include_directories(dm_example_cxx_api INTERFACE include)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example_cxx/api/include/IName.h
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example_cxx/api/include/IName.h b/examples/celix-examples/dm_example_cxx/api/include/IName.h
new file mode 100644
index 0000000..89edb19
--- /dev/null
+++ b/examples/celix-examples/dm_example_cxx/api/include/IName.h
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef CELIX_INAME_H
+#define CELIX_INAME_H
+
+#define INAME_VERSION "1.0.0"
+
+#include <string>
+
+namespace srv {
+    namespace info {
+        class IName {
+        protected:
+            IName() = default;
+            ~IName() = default;
+        public:
+            virtual std::string getName() = 0;
+        };
+    }
+}
+
+#endif //CELIX_INAME_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example_cxx/api/include/IPhase1.h
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example_cxx/api/include/IPhase1.h b/examples/celix-examples/dm_example_cxx/api/include/IPhase1.h
new file mode 100644
index 0000000..d75b3e1
--- /dev/null
+++ b/examples/celix-examples/dm_example_cxx/api/include/IPhase1.h
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef CELIX_PHASE1_H
+#define CELIX_PHASE1_H
+
+#define IPHASE1_VERSION "1.0.0"
+
+class IPhase1 {
+protected:
+    IPhase1() = default;
+    ~IPhase1() = default;
+public:
+    virtual int getData() = 0;
+};
+
+#endif //CELIX_PHASE1_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example_cxx/api/include/IPhase2.h
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example_cxx/api/include/IPhase2.h b/examples/celix-examples/dm_example_cxx/api/include/IPhase2.h
new file mode 100644
index 0000000..20e3774
--- /dev/null
+++ b/examples/celix-examples/dm_example_cxx/api/include/IPhase2.h
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef CELIX_PHASE2_H
+#define CELIX_PHASE2_H
+
+#define IPHASE2_VERSION "1.0.0"
+
+class IPhase2 {
+protected:
+    IPhase2() = default;
+    ~IPhase2() = default;
+public:
+    virtual double getData() = 0;
+};
+
+#endif //CELIX_PHASE2_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example_cxx/phase1/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example_cxx/phase1/CMakeLists.txt b/examples/celix-examples/dm_example_cxx/phase1/CMakeLists.txt
new file mode 100644
index 0000000..5007e77
--- /dev/null
+++ b/examples/celix-examples/dm_example_cxx/phase1/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+add_celix_bundle(dm_example_cxx_phase1
+    SYMBOLIC_NAME phase1_cxx
+    VERSION 0.0.1
+    SOURCES
+        src/Phase1Activator.cc
+        src/Phase1Cmp.cc
+)
+target_include_directories(dm_example_cxx_phase1 PRIVATE src)
+target_link_libraries(dm_example_cxx_phase1 PRIVATE dm_example_cxx_api Celix::shell_api)
+
+IF(APPLE)
+    target_link_libraries(dm_example_cxx_phase1 PRIVATE  -Wl,-all_load Celix::dependency_manager_cxx_static)
+else()
+    if(ENABLE_ADDRESS_SANITIZER)
+        #With asan there can be undefined symbols
+        target_link_libraries(dm_example_cxx_phase1 PRIVATE -Wl,--whole-archive Celix::dependency_manager_cxx_static -Wl,--no-whole-archive)
+    else()
+        target_link_libraries(dm_example_cxx_phase1 PRIVATE -Wl,--no-undefined -Wl,--whole-archive Celix::dependency_manager_cxx_static -Wl,--no-whole-archive)
+    endif()
+endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example_cxx/phase1/src/Phase1Activator.cc
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example_cxx/phase1/src/Phase1Activator.cc b/examples/celix-examples/dm_example_cxx/phase1/src/Phase1Activator.cc
new file mode 100644
index 0000000..4bee1df
--- /dev/null
+++ b/examples/celix-examples/dm_example_cxx/phase1/src/Phase1Activator.cc
@@ -0,0 +1,74 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "Phase1Cmp.h"
+#include "Phase1Activator.h"
+#include "IPhase2.h"
+
+using namespace celix::dm;
+
+/* This example create a C++ component providing a C++ and C service
+ * For the C service a service struct in initialized and registered
+ * For the C++ service the object itself is used
+ */
+
+DmActivator* DmActivator::create(DependencyManager& mng) {
+    return new Phase1Activator(mng);
+}
+
+struct InvalidCServ {
+    virtual ~InvalidCServ() = default;
+    void* handle {nullptr}; //valid pod
+    int (*foo)(double arg) {nullptr}; //still valid pod
+    void bar(double __attribute__((unused)) arg) {} //still valid pod
+    virtual void baz(double __attribute__((unused)) arg) {} //not a valid pod
+};
+
+void Phase1Activator::init() {
+    auto cmp = std::unique_ptr<Phase1Cmp>(new Phase1Cmp());
+
+    Properties cmdProps;
+    cmdProps[OSGI_SHELL_COMMAND_NAME] = "phase1_info";
+    cmdProps[OSGI_SHELL_COMMAND_USAGE] = "phase1_info";
+    cmdProps[OSGI_SHELL_COMMAND_DESCRIPTION] = "Print information about the Phase1Cmp";
+
+
+    cmd.handle = cmp.get();
+    cmd.executeCommand = [](void *handle, char* line, FILE* out, FILE *err) {
+        Phase1Cmp* cmp = (Phase1Cmp*)handle;
+        return cmp->infoCmd(line, out, err);
+    };
+
+    auto tst = std::unique_ptr<InvalidCServ>(new InvalidCServ{});
+    tst->handle = cmp.get();
+
+
+    mng.createComponent(std::move(cmp))  //using a pointer a instance. Also supported is lazy initialization (default constructor needed) or a rvalue reference (move)
+        .addInterface<IPhase1>(IPHASE1_VERSION)
+        //.addInterface<IPhase2>() -> Compile error (static assert), because Phase1Cmp does not implement IPhase2
+        .addCInterface(&cmd, OSGI_SHELL_COMMAND_SERVICE_NAME, "", cmdProps)
+        //.addCInterface(tst.get(), "TEST_SRV") -> Compile error (static assert), because InvalidCServ is not a pod
+        .addInterface<srv::info::IName>(INAME_VERSION)
+        .setCallbacks(&Phase1Cmp::init, &Phase1Cmp::start, &Phase1Cmp::stop, &Phase1Cmp::deinit);
+
+}
+
+void Phase1Activator::deinit() {
+    //nothing to do
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/celix-examples/dm_example_cxx/phase1/src/Phase1Activator.h
----------------------------------------------------------------------
diff --git a/examples/celix-examples/dm_example_cxx/phase1/src/Phase1Activator.h b/examples/celix-examples/dm_example_cxx/phase1/src/Phase1Activator.h
new file mode 100644
index 0000000..37b25e3
--- /dev/null
+++ b/examples/celix-examples/dm_example_cxx/phase1/src/Phase1Activator.h
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef CELIX_PHASE1ACTIVATOR_H
+#define CELIX_PHASE1ACTIVATOR_H
+
+#include "celix/dm/DmActivator.h"
+#include "command.h"
+
+using namespace celix::dm;
+
+class Phase1Activator : public DmActivator {
+    command_service_t cmd {nullptr, nullptr};
+public:
+    Phase1Activator(DependencyManager& mng) : DmActivator(mng) {}
+    virtual void init();
+    virtual void deinit();
+};
+
+#endif //CELIX_PHASE1ACTIVATOR_H


Mime
View raw message