Author: buildbot
Date: Tue May 30 11:06:30 2017
New Revision: 1013145
Log:
Staging update by buildbot for aries
Modified:
websites/staging/aries/trunk/content/ (props changed)
websites/staging/aries/trunk/content/modules/containers.html
Propchange: websites/staging/aries/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue May 30 11:06:30 2017
@@ -1 +1 @@
-1796653
+1796830
Modified: websites/staging/aries/trunk/content/modules/containers.html
==============================================================================
--- websites/staging/aries/trunk/content/modules/containers.html (original)
+++ websites/staging/aries/trunk/content/modules/containers.html Tue May 30
11:06:30 2017
@@ -325,6 +325,28 @@ from the service registry, they need to
The servlet provides a simple UI to perform some of the management
operations.</p>
<p>The servlet is written using OSGi Declarative Service annotations and OSGi
Http Whiteboard annotations and can be found here:
<a
href="https://git-wip-us.apache.org/repos/asf?p=aries-containers.git;a=blob;f=containers-examples/containers-example-osgiservlet/src/main/java/org/apache/aries/containers/examples/osgiservlet/ServiceManagerServlet.java;h=5783718d0ba80a612cf44a331a45aefeb6e71ebf;hb=HEAD">ServiceManagerServlet.java</a></p>
+<p>Main part of the functionality of the servlet can be summarized as
follows:</p>
+<div class="codehilite"><pre>@Component(service = Servlet.class,
+ property = {HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN +
"=/manager"})
+public class ServiceManagerServlet extends HttpServlet {
+
+@Reference
+ServiceManager serviceManager;
+
+@Override
+protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException {
+ PrintWriter pw = resp.getWriter();
+ pw.println("<span class="nt"><BODY><H1></span>Service
Deployments<span class="nt"></H1></span>");
+
+ pw.println("<span class="nt"><UL></span>");
+ for (String dep : serviceManager.listServices()) {
+ pw.println("<span class="nt"><LI></span>" + dep);
+ }
+</pre></div>
+
+
+<p>In short - an OSGi Declarative Service Component is registered as a HTTP
Whiteboard Servet. The Aries Containers Service Manager is
+injected into the <code>serviceManager</code> field and then used in the
servlet to manage the deployment.</p>
<p>TODO: Describe how to run the servlet using a small Felix setup.</p>
<h2 id="plain-java-example">Plain Java example<a class="headerlink"
href="#plain-java-example" title="Permanent link">¶</a></h2>
<p>This example launches a small Java Application to create a service
deployment. Initially a single container is deployed. The user can