ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1529112 [3/3] - in /ace/trunk: cnf/localrepo/ cnf/localrepo/org.apache.felix.configadmin/ org.apache.ace.agent.itest/src/org/apache/ace/agent/itest/ org.apache.ace.agent.update.itest/src/org/apache/ace/agent/itest/ org.apache.ace.authentic...
Date Fri, 04 Oct 2013 09:47:36 GMT
Added: ace/trunk/cnf/localrepo/org.apache.felix.configadmin/org.apache.felix.configadmin-1.8.0.jar
URL: http://svn.apache.org/viewvc/ace/trunk/cnf/localrepo/org.apache.felix.configadmin/org.apache.felix.configadmin-1.8.0.jar?rev=1529112&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ace/trunk/cnf/localrepo/org.apache.felix.configadmin/org.apache.felix.configadmin-1.8.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/jar

Modified: ace/trunk/org.apache.ace.agent.itest/src/org/apache/ace/agent/itest/AgentDeploymentTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent.itest/src/org/apache/ace/agent/itest/AgentDeploymentTest.java?rev=1529112&r1=1529111&r2=1529112&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.agent.itest/src/org/apache/ace/agent/itest/AgentDeploymentTest.java (original)
+++ ace/trunk/org.apache.ace.agent.itest/src/org/apache/ace/agent/itest/AgentDeploymentTest.java Fri Oct  4 09:47:36 2013
@@ -628,7 +628,8 @@ public class AgentDeploymentTest extends
         };
     }
 
-    protected void tearDown() throws Exception {
+    @Override
+    protected void doTearDown() throws Exception {
         // Remove all provisioned components...
         m_dependencyManager.clear();
 

Modified: ace/trunk/org.apache.ace.agent.update.itest/src/org/apache/ace/agent/itest/AgentUpdateTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent.update.itest/src/org/apache/ace/agent/itest/AgentUpdateTest.java?rev=1529112&r1=1529111&r2=1529112&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.agent.update.itest/src/org/apache/ace/agent/itest/AgentUpdateTest.java (original)
+++ ace/trunk/org.apache.ace.agent.update.itest/src/org/apache/ace/agent/itest/AgentUpdateTest.java Fri Oct  4 09:47:36 2013
@@ -77,7 +77,8 @@ public class AgentUpdateTest extends Int
         m_http.registerServlet("/obr", m_servlet, null, null);
     }
 
-    public void tearDown() throws Exception {
+    @Override
+    public void doTearDown() throws Exception {
         m_http.unregister("/obr");
     }
 

Modified: ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java?rev=1529112&r1=1529111&r2=1529112&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java (original)
+++ ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java Fri Oct  4 09:47:36 2013
@@ -181,9 +181,7 @@ public class LogAuthenticationTest exten
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
+    protected void doTearDown() throws Exception {
         // Remove the configuration to start without any configured authentication...
         getConfiguration(m_configurationPID).delete();
     }

Modified: ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java?rev=1529112&r1=1529111&r2=1529112&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java (original)
+++ ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java Fri Oct  4 09:47:36 2013
@@ -142,7 +142,7 @@ public class ObrAuthenticationTest exten
     }
 
     @Override
-    public void tearDown() throws Exception {
+    public void doTearDown() throws Exception {
         FileUtils.removeDirectoryWithContent(m_storeLocation);
         Configuration configuration = getConfiguration(m_authConfigPID);
         if (configuration != null) {

Modified: ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/BaseRepositoryAdminTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/BaseRepositoryAdminTest.java?rev=1529112&r1=1529111&r2=1529112&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/BaseRepositoryAdminTest.java (original)
+++ ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/BaseRepositoryAdminTest.java Fri Oct  4 09:47:36 2013
@@ -353,7 +353,7 @@ public abstract class BaseRepositoryAdmi
     }
 
     @Override
-    protected void tearDown() throws Exception {
+    protected void doTearDown() throws Exception {
     	try {
 			m_repositoryAdmin.logout(true);
 		} catch (RuntimeException e) {

Modified: ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java?rev=1529112&r1=1529111&r2=1529112&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java (original)
+++ ace/trunk/org.apache.ace.client.rest.itest/src/org/apache/ace/client/rest/itest/RESTClientTest.java Fri Oct  4 09:47:36 2013
@@ -60,29 +60,37 @@ public class RESTClientTest extends Inte
     private static final String STOREPATH = "generated/store";
 
     private static boolean m_hasBeenSetup = false;
+    private static int m_testRunCount = 0;
+    private static int m_totalTestCount = 0;
+
     private volatile BundleContext m_context;
     private volatile UserAdmin m_user;
     private volatile LogReaderService m_logReader;
 
-    @Override
-    protected Component[] getDependencies() {
-        return new Component[] {
-            createComponent()
-                .setImplementation(this)
-                .add(createServiceDependency().setService(UserAdmin.class).setRequired(true))
-                .add(createServiceDependency().setService(LogReaderService.class).setRequired(true))
-        };
-    }
-
-    @Override
-    protected void configureAdditionalServices() throws Exception {
-        // there is some setup we only want to do once, before the first test we run, and since we cannot
-        // predict which one that is, we use a static flag
-        if (!m_hasBeenSetup) {
-            ensureCleanStore();
-            configureServer();
-            createServerUser();
-            m_hasBeenSetup = true;
+    /**
+     * Creates and deletes a number of workspaces.
+     */
+    public void testCreateAndDeleteMultipleWorkspaces() throws Exception {
+        Client client = Client.create();
+        client.getProperties().put(ClientConfig.PROPERTY_FOLLOW_REDIRECTS, false);
+        try {
+            int nr = 10;
+            for (int i = 0; i < nr; i++) {
+                WebResource w1 = createWorkspace(client);
+                w1.delete();
+            }
+            WebResource[] w = new WebResource[nr];
+            for (int i = 0; i < w.length; i++) {
+                w[i] = createWorkspace(client);
+            }
+            for (int i = 0; i < w.length; i++) {
+                w[i].delete();
+            }
+        }
+        catch (Exception e) {
+            showBundles();
+            showLog();
+            throw e;
         }
     }
 
@@ -122,24 +130,43 @@ public class RESTClientTest extends Inte
     }
 
     /**
-     * Creates and deletes a number of workspaces.
+     * Creates two bundles, artifacts an a single target and then in a loop creates two features that link to the bundle
+     * artifacts, one distribution and links all of that to the target. Even though we create a lot of entities that
+     * way, all of them will result in the two bundles being deployed to the target so we end up with only a single
+     * deployment version.
      */
-    public void testCreateAndDeleteMultipleWorkspaces() throws Exception {
+    public void testCreateLotsOfEntities() throws Exception {
         Client client = Client.create();
         client.getProperties().put(ClientConfig.PROPERTY_FOLLOW_REDIRECTS, false);
+        Gson gson = new Gson();
         try {
-            int nr = 10;
+            int nr = 20;
+            File b1 = createTmpBundleOnDisk("bar.b1", "1.0.0");
+            File b2 = createTmpBundleOnDisk("bar.b2", "1.0.0");
+
+            WebResource w1 = createWorkspace(client);
+            deleteResources(gson, w1);
+            createBundle(client, w1, "bar.a1", "bar.b1", "1.0.0", b1.toURI().toURL().toString(), BundleHelper.MIMETYPE);
+            createBundle(client, w1, "bar.a2", "bar.b2", "1.0.0", b2.toURI().toURL().toString(), BundleHelper.MIMETYPE);
+            createTarget(client, w1, "bar.t1");
+            w1.post();
+            w1.delete();
+
             for (int i = 0; i < nr; i++) {
-                WebResource w1 = createWorkspace(client);
-                w1.delete();
-            }
-            WebResource[] w = new WebResource[nr];
-            for (int i = 0; i < w.length; i++) {
-                w[i] = createWorkspace(client);
-            }
-            for (int i = 0; i < w.length; i++) {
-                w[i].delete();
+                WebResource w2 = createWorkspace(client);
+                createAssociationA2F(client, w2, "artifact2feature", "bar.a1", "feat-1-" + i);
+                createAssociationA2F(client, w2, "artifact2feature", "bar.a2", "feat-2-" + i);
+                createFeature(client, w2, "feat-1-" + i);
+                createFeature(client, w2, "feat-2-" + i);
+                createAssociationF2D(client, w2, "feature2distribution", "feat-1-" + i, "dist-" + i);
+                createAssociationF2D(client, w2, "feature2distribution", "feat-2-" + i, "dist-" + i);
+                createDistribution(client, w2, "dist-" + i);
+                createAssociationD2T(client, w2, "distribution2target", "dist-" + i, "bar.t1");
+                w2.post();
+                w2.delete();
             }
+            WebResource t1versions = client.resource("http://localhost:8080/deployment/bar.t1/versions");
+            assertEquals("1.0.0\n", t1versions.get(String.class));
         }
         catch (Exception e) {
             showBundles();
@@ -271,70 +298,39 @@ public class RESTClientTest extends Inte
         }
     }
 
-    /**
-     * Creates two bundles, artifacts an a single target and then in a loop creates two features that link to the bundle
-     * artifacts, one distribution and links all of that to the target. Even though we create a lot of entities that
-     * way, all of them will result in the two bundles being deployed to the target so we end up with only a single
-     * deployment version.
-     */
-    public void testCreateLotsOfEntities() throws Exception {
-        Client client = Client.create();
-        client.getProperties().put(ClientConfig.PROPERTY_FOLLOW_REDIRECTS, false);
-        Gson gson = new Gson();
-        try {
-            int nr = 20;
-            File b1 = createTmpBundleOnDisk("bar.b1", "1.0.0");
-            File b2 = createTmpBundleOnDisk("bar.b2", "1.0.0");
-
-            WebResource w1 = createWorkspace(client);
-            deleteResources(gson, w1);
-            createBundle(client, w1, "bar.a1", "bar.b1", "1.0.0", b1.toURI().toURL().toString(), BundleHelper.MIMETYPE);
-            createBundle(client, w1, "bar.a2", "bar.b2", "1.0.0", b2.toURI().toURL().toString(), BundleHelper.MIMETYPE);
-            createTarget(client, w1, "bar.t1");
-            w1.post();
-            w1.delete();
+    @Override
+    protected void configureAdditionalServices() throws Exception {
+        // there is some setup we only want to do once, before the first test we run, and since we cannot
+        // predict which one that is, we use a static flag
+        if (!m_hasBeenSetup) {
+            setAutoDeleteTrackedConfigurations(false);
+            // count the number of tests, so we can determine when to clean up...
+            m_totalTestCount = getTestCount();
 
-            for (int i = 0; i < nr; i++) {
-                WebResource w2 = createWorkspace(client);
-                createAssociationA2F(client, w2, "artifact2feature", "bar.a1", "feat-1-" + i);
-                createAssociationA2F(client, w2, "artifact2feature", "bar.a2", "feat-2-" + i);
-                createFeature(client, w2, "feat-1-" + i);
-                createFeature(client, w2, "feat-2-" + i);
-                createAssociationF2D(client, w2, "feature2distribution", "feat-1-" + i, "dist-" + i);
-                createAssociationF2D(client, w2, "feature2distribution", "feat-2-" + i, "dist-" + i);
-                createDistribution(client, w2, "dist-" + i);
-                createAssociationD2T(client, w2, "distribution2target", "dist-" + i, "bar.t1");
-                w2.post();
-                w2.delete();
-            }
-            WebResource t1versions = client.resource("http://localhost:8080/deployment/bar.t1/versions");
-            assertEquals("1.0.0\n", t1versions.get(String.class));
-        }
-        catch (Exception e) {
-            showBundles();
-            showLog();
-            throw e;
+            ensureCleanStore();
+            configureServer();
+            createServerUser();
+            m_hasBeenSetup = true;
         }
+
+        m_testRunCount++;
     }
 
-    /** Shows all log messages in the OSGi log service. */
-    private void showLog() {
-        Enumeration<?> e = m_logReader.getLog();
-        System.out.println("Log:");
-        while (e.hasMoreElements()) {
-            LogEntry entry = (LogEntry) e.nextElement();
-            System.out.println(" * " + (new Date(entry.getTime())) + " - " + entry.getMessage() + " - " + entry.getBundle().getBundleId() + " - " + entry.getException());
-            if (entry.getException() != null) {
-                entry.getException().printStackTrace();
-            }
+    @Override
+    protected void doTearDown() throws Exception {
+        if (m_testRunCount == m_totalTestCount) {
+            setAutoDeleteTrackedConfigurations(true);
         }
     }
 
-    /** Shows all bundles in the framework. */
-    private void showBundles() {
-        for (Bundle b : m_context.getBundles()) {
-            System.out.println(" * [" + b.getBundleId() + "] " + b.getState() + " - " + b.getSymbolicName() + " " + b.getVersion());
-        }
+    @Override
+    protected Component[] getDependencies() {
+        return new Component[] {
+            createComponent()
+                .setImplementation(this)
+                .add(createServiceDependency().setService(UserAdmin.class).setRequired(true))
+                .add(createServiceDependency().setService(LogReaderService.class).setRequired(true))
+        };
     }
 
     /** Asserts that a list of entities exist by trying to GET them. */
@@ -357,40 +353,98 @@ public class RESTClientTest extends Inte
         }
     }
 
-    /** Creates a new workspace. */
-    private WebResource createWorkspace(Client c) {
-        WebResource r = c.resource("http://localhost:8080/client/work");
-        try {
-            r.post(String.class, "");
-            fail("We should have been redirected to a new workspace.");
-            return null; // to keep the compiler happy, it does not understand what fail() does
-        }
-        catch (UniformInterfaceException e) {
-            return c.resource(e.getResponse().getLocation());
-        }
+    private void configureServer() throws IOException {
+        configure("org.apache.ace.client.rest",
+            "org.apache.ace.server.servlet.endpoint", "/client",
+            "authentication.enabled", "false");
+
+        configure("org.apache.ace.deployment.servlet",
+            "org.apache.ace.server.servlet.endpoint", "/deployment",
+            "authentication.enabled", "false");
+
+        configure("org.apache.ace.repository.servlet.RepositoryServlet",
+            "org.apache.ace.server.servlet.endpoint", "/repository",
+            "authentication.enabled", "false");
+
+        configure("org.apache.ace.obr.servlet",
+            "org.apache.ace.server.servlet.endpoint", "/obr",
+            "authentication.enabled", "false");
+
+        configure("org.apache.ace.obr.storage.file",
+            "fileLocation", STOREPATH);
+
+        configure("org.apache.ace.deployment.provider.repositorybased",
+            "url", "http://localhost:8080/repository",
+            "name", "deployment",
+            "customer", "apache");
+
+        configure("org.apache.ace.discovery.property",
+            "serverURL", "http://localhost:8080");
+
+        configure("org.apache.ace.identification.property",
+            "targetID", "target-test");
+
+        configureFactory("org.apache.ace.log.server.servlet.factory",
+            "name", "auditlog",
+            HttpConstants.ENDPOINT, "/auditlog",
+            "authentication.enabled", "false");
+
+        configureFactory("org.apache.ace.log.server.store.factory",
+            "name", "auditlog");
+
+        configureFactory("org.apache.ace.server.repository.factory",
+            "name", "user",
+            "customer", "apache",
+            "master", "true");
+
+        configureFactory("org.apache.ace.server.repository.factory",
+            "name", "shop",
+            "customer", "apache",
+            "master", "true");
+
+        configureFactory("org.apache.ace.server.repository.factory",
+            "name", "deployment",
+            "customer", "apache",
+            "master", "true");
+
+        configureFactory("org.apache.ace.server.repository.factory",
+            "name", "target",
+            "customer", "apache",
+            "master", "true");
+
+        configureFactory("org.apache.ace.server.repository.factory",
+            "name", "users",
+            "customer", "apache",
+            "master", "true");
+
+        configure("org.apache.ace.configurator.useradmin.task.UpdateUserAdminTask",
+            "repositoryLocation", "http://localhost:8080/repository",
+            "repositoryCustomer", "apache",
+            "repositoryName", "user");
     }
 
-    /** Creates a bundle artifact. */
-    private WebResource createBundle(Client c, WebResource work, String name, String bsn, String v, String url, String mimetype) throws IOException {
-        return createEntity(c, work, "artifact", "{attributes: {" +
-            "artifactName: \"" + name + "\", " +
-            "Bundle-SymbolicName: \"" + bsn + "\", " +
-            "Bundle-Version: \"" + v + "\", " +
-            "mimetype: \"" + mimetype + "\", " +
-            "url: \"" + url + "\"" +
-            "}, tags: {}}");
+    /** Creates an association between an artifact and a feature. */
+    private WebResource createAssociationA2F(Client c, WebResource work, String type, String left, String right) throws IOException {
+        return createEntity(c, work, type, "{attributes: {leftEndpoint: \"(artifactName=" + left + ")\", rightEndpoint=\"(name=" + right + ")\", leftCardinality: \"1\", rightCardinality=\"1\"}, tags: {}}");
     }
 
-    /** Creates a resource processor bundle artifact. */
-    private WebResource createResourceProcessor(Client c, WebResource work, String name, String bsn, String v, String url, String mimetype, String processorID) throws IOException {
+    /** Creates an association between a distribution and a target. */
+    private WebResource createAssociationD2T(Client c, WebResource work, String type, String left, String right) throws IOException {
+        return createEntity(c, work, type, "{attributes: {leftEndpoint: \"(name=" + left + ")\", rightEndpoint=\"(id=" + right + ")\", leftCardinality: \"1\", rightCardinality=\"1\"}, tags: {}}");
+    }
+
+    /** Creates an association between a feature and a distribution. */
+    private WebResource createAssociationF2D(Client c, WebResource work, String type, String left, String right) throws IOException {
+        return createEntity(c, work, type, "{attributes: {leftEndpoint: \"(name=" + left + ")\", rightEndpoint=\"(name=" + right + ")\", leftCardinality: \"1\", rightCardinality=\"1\"}, tags: {}}");
+    }
+
+    /** Creates a bundle artifact. */
+    private WebResource createBundle(Client c, WebResource work, String name, String bsn, String v, String url, String mimetype) throws IOException {
         return createEntity(c, work, "artifact", "{attributes: {" +
             "artifactName: \"" + name + "\", " +
-            "description: \"\", " +
             "Bundle-SymbolicName: \"" + bsn + "\", " +
             "Bundle-Version: \"" + v + "\", " +
             "mimetype: \"" + mimetype + "\", " +
-            BundleHelper.KEY_RESOURCE_PROCESSOR_PID + ": \"" + processorID + "\", " +
-            "DeploymentPackage-Customizer: \"true\", " +
             "url: \"" + url + "\"" +
             "}, tags: {}}");
     }
@@ -406,43 +460,11 @@ public class RESTClientTest extends Inte
             "}, tags: {}}");
     }
 
-    /** Creates a feature. */
-    private WebResource createFeature(Client c, WebResource work, String name) throws IOException {
-        return createEntity(c, work, "feature", "{attributes: {name: \"" + name + "\"}, tags: {}}");
-    }
-
     /** Creates a distribution. */
     private WebResource createDistribution(Client c, WebResource work, String name) throws IOException {
         return createEntity(c, work, "distribution", "{attributes: {name: \"" + name + "\"}, tags: {}}");
     }
 
-    /** Creates a target. */
-    private WebResource createTarget(Client c, WebResource work, String name, String... tags) throws IOException {
-        StringBuffer result = new StringBuffer();
-        for (int i = 0; i < tags.length; i += 2) {
-            if (result.length() > 0) {
-                result.append(", ");
-            }
-            result.append(tags[i] + ": \"" + tags[i + 1] + "\"");
-        }
-        return createEntity(c, work, "target", "{attributes: {id: \"" + name + "\", autoapprove: \"true\"}, tags: {" + result.toString() + "}}");
-    }
-
-    /** Creates an association between an artifact and a feature. */
-    private WebResource createAssociationA2F(Client c, WebResource work, String type, String left, String right) throws IOException {
-        return createEntity(c, work, type, "{attributes: {leftEndpoint: \"(artifactName=" + left + ")\", rightEndpoint=\"(name=" + right + ")\", leftCardinality: \"1\", rightCardinality=\"1\"}, tags: {}}");
-    }
-
-    /** Creates an association between a feature and a distribution. */
-    private WebResource createAssociationF2D(Client c, WebResource work, String type, String left, String right) throws IOException {
-        return createEntity(c, work, type, "{attributes: {leftEndpoint: \"(name=" + left + ")\", rightEndpoint=\"(name=" + right + ")\", leftCardinality: \"1\", rightCardinality=\"1\"}, tags: {}}");
-    }
-
-    /** Creates an association between a distribution and a target. */
-    private WebResource createAssociationD2T(Client c, WebResource work, String type, String left, String right) throws IOException {
-        return createEntity(c, work, type, "{attributes: {leftEndpoint: \"(name=" + left + ")\", rightEndpoint=\"(id=" + right + ")\", leftCardinality: \"1\", rightCardinality=\"1\"}, tags: {}}");
-    }
-
     /** Creates an entity. */
     private WebResource createEntity(Client c, WebResource work, String type, String data) throws IOException {
         WebResource entity = work.path(type);
@@ -455,21 +477,43 @@ public class RESTClientTest extends Inte
         }
     }
 
-    private void deleteResources(Gson gson, WebResource workspace) {
-        deleteResources(gson, workspace, "artifact");
-        deleteResources(gson, workspace, "artifact2feature");
-        deleteResources(gson, workspace, "feature");
-        deleteResources(gson, workspace, "feature2distribution");
-        deleteResources(gson, workspace, "distribution");
-        deleteResources(gson, workspace, "distribution2target");
-        deleteResources(gson, workspace, "target");
+    /** Creates a feature. */
+    private WebResource createFeature(Client c, WebResource work, String name) throws IOException {
+        return createEntity(c, work, "feature", "{attributes: {name: \"" + name + "\"}, tags: {}}");
     }
 
-    private void deleteResources(Gson gson, WebResource workspace, String type) {
-        String[] artifacts = gson.fromJson(workspace.path(type).get(String.class), String[].class);
-        for (String id : artifacts) {
-            workspace.path(type + "/" + id).delete();
+    /** Creates a resource processor bundle artifact. */
+    private WebResource createResourceProcessor(Client c, WebResource work, String name, String bsn, String v, String url, String mimetype, String processorID) throws IOException {
+        return createEntity(c, work, "artifact", "{attributes: {" +
+            "artifactName: \"" + name + "\", " +
+            "description: \"\", " +
+            "Bundle-SymbolicName: \"" + bsn + "\", " +
+            "Bundle-Version: \"" + v + "\", " +
+            "mimetype: \"" + mimetype + "\", " +
+            BundleHelper.KEY_RESOURCE_PROCESSOR_PID + ": \"" + processorID + "\", " +
+            "DeploymentPackage-Customizer: \"true\", " +
+            "url: \"" + url + "\"" +
+            "}, tags: {}}");
+    }
+
+    /** Create a user so we can log in to the server. */
+    @SuppressWarnings("unchecked")
+    private void createServerUser() {
+        User user = (User) m_user.createRole("d", Role.USER);
+        user.getProperties().put("username", "d");
+        user.getCredentials().put("password", "f");
+    }
+
+    /** Creates a target. */
+    private WebResource createTarget(Client c, WebResource work, String name, String... tags) throws IOException {
+        StringBuffer result = new StringBuffer();
+        for (int i = 0; i < tags.length; i += 2) {
+            if (result.length() > 0) {
+                result.append(", ");
+            }
+            result.append(tags[i] + ": \"" + tags[i + 1] + "\"");
         }
+        return createEntity(c, work, "target", "{attributes: {id: \"" + name + "\", autoapprove: \"true\"}, tags: {" + result.toString() + "}}");
     }
 
     private File createTmpBundleOnDisk(String bsn, String v, String... headers) throws Exception {
@@ -505,6 +549,36 @@ public class RESTClientTest extends Inte
         }
     }
 
+    /** Creates a new workspace. */
+    private WebResource createWorkspace(Client c) {
+        WebResource r = c.resource("http://localhost:8080/client/work");
+        try {
+            r.post(String.class, "");
+            fail("We should have been redirected to a new workspace.");
+            return null; // to keep the compiler happy, it does not understand what fail() does
+        }
+        catch (UniformInterfaceException e) {
+            return c.resource(e.getResponse().getLocation());
+        }
+    }
+
+    private void deleteResources(Gson gson, WebResource workspace) {
+        deleteResources(gson, workspace, "artifact");
+        deleteResources(gson, workspace, "artifact2feature");
+        deleteResources(gson, workspace, "feature");
+        deleteResources(gson, workspace, "feature2distribution");
+        deleteResources(gson, workspace, "distribution");
+        deleteResources(gson, workspace, "distribution2target");
+        deleteResources(gson, workspace, "target");
+    }
+
+    private void deleteResources(Gson gson, WebResource workspace, String type) {
+        String[] artifacts = gson.fromJson(workspace.path(type).get(String.class), String[].class);
+        for (String id : artifacts) {
+            workspace.path(type + "/" + id).delete();
+        }
+    }
+
     private void ensureCleanStore() throws IOException {
         File store = new File(STOREPATH);
         System.out.println("store: " + store.getAbsolutePath());
@@ -519,81 +593,23 @@ public class RESTClientTest extends Inte
         }
     }
 
-    private void configureServer() throws IOException {
-        configure("org.apache.ace.client.rest",
-            "org.apache.ace.server.servlet.endpoint", "/client",
-            "authentication.enabled", "false");
-
-        configure("org.apache.ace.deployment.servlet",
-            "org.apache.ace.server.servlet.endpoint", "/deployment",
-            "authentication.enabled", "false");
-
-        configure("org.apache.ace.repository.servlet.RepositoryServlet",
-            "org.apache.ace.server.servlet.endpoint", "/repository",
-            "authentication.enabled", "false");
-
-        configure("org.apache.ace.obr.servlet",
-            "org.apache.ace.server.servlet.endpoint", "/obr",
-            "authentication.enabled", "false");
-
-        configure("org.apache.ace.obr.storage.file",
-            "fileLocation", STOREPATH);
-
-        configure("org.apache.ace.deployment.provider.repositorybased",
-            "url", "http://localhost:8080/repository",
-            "name", "deployment",
-            "customer", "apache");
-
-        configure("org.apache.ace.discovery.property",
-            "serverURL", "http://localhost:8080");
-
-        configure("org.apache.ace.identification.property",
-            "targetID", "target-test");
-
-        configureFactory("org.apache.ace.log.server.servlet.factory",
-            "name", "auditlog",
-            HttpConstants.ENDPOINT, "/auditlog",
-            "authentication.enabled", "false");
-
-        configureFactory("org.apache.ace.log.server.store.factory",
-            "name", "auditlog");
-
-        configureFactory("org.apache.ace.server.repository.factory",
-            "name", "user",
-            "customer", "apache",
-            "master", "true");
-
-        configureFactory("org.apache.ace.server.repository.factory",
-            "name", "shop",
-            "customer", "apache",
-            "master", "true");
-
-        configureFactory("org.apache.ace.server.repository.factory",
-            "name", "deployment",
-            "customer", "apache",
-            "master", "true");
-
-        configureFactory("org.apache.ace.server.repository.factory",
-            "name", "target",
-            "customer", "apache",
-            "master", "true");
-
-        configureFactory("org.apache.ace.server.repository.factory",
-            "name", "users",
-            "customer", "apache",
-            "master", "true");
-
-        configure("org.apache.ace.configurator.useradmin.task.UpdateUserAdminTask",
-            "repositoryLocation", "http://localhost:8080/repository",
-            "repositoryCustomer", "apache",
-            "repositoryName", "user");
+    /** Shows all bundles in the framework. */
+    private void showBundles() {
+        for (Bundle b : m_context.getBundles()) {
+            System.out.println(" * [" + b.getBundleId() + "] " + b.getState() + " - " + b.getSymbolicName() + " " + b.getVersion());
+        }
     }
 
-    /** Create a user so we can log in to the server. */
-    @SuppressWarnings("unchecked")
-    private void createServerUser() {
-        User user = (User) m_user.createRole("d", Role.USER);
-        user.getProperties().put("username", "d");
-        user.getCredentials().put("password", "f");
+    /** Shows all log messages in the OSGi log service. */
+    private void showLog() {
+        Enumeration<?> e = m_logReader.getLog();
+        System.out.println("Log:");
+        while (e.hasMoreElements()) {
+            LogEntry entry = (LogEntry) e.nextElement();
+            System.out.println(" * " + (new Date(entry.getTime())) + " - " + entry.getMessage() + " - " + entry.getBundle().getBundleId() + " - " + entry.getException());
+            if (entry.getException() != null) {
+                entry.getException().printStackTrace();
+            }
+        }
     }
 }

Modified: ace/trunk/org.apache.ace.deployment.rp.autoconf.itest/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment.rp.autoconf.itest/bnd.bnd?rev=1529112&r1=1529111&r2=1529112&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment.rp.autoconf.itest/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.deployment.rp.autoconf.itest/bnd.bnd Fri Oct  4 09:47:36 2013
@@ -1,6 +1,7 @@
 Test-Cases: ${classes;CONCRETE;EXTENDS;junit.framework.TestCase}
 -runbundles: org.mockito.mockito-all,\
 	org.apache.ace.deployment.rp.autoconf;version=latest,\
+	org.apache.ace.log.api;version=latest,\
 	org.apache.ace.managementagent;version=latest,\
 	org.apache.ace.test;version=latest,\
 	org.apache.felix.metatype,\

Modified: ace/trunk/org.apache.ace.managementagent/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.managementagent/bnd.bnd?rev=1529112&r1=1529111&r2=1529112&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.managementagent/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.managementagent/bnd.bnd Fri Oct  4 09:47:36 2013
@@ -6,6 +6,7 @@
 	osgi.cmpn,\
 	org.apache.ace.connectionfactory;version=latest,\
 	org.apache.ace.consolelogger;version=latest,\
+	org.apache.ace.log.api;version=latest,\
 	org.apache.ace.log.target;version=latest,\
 	org.apache.ace.log.target.store.impl;version=latest,\
 	org.apache.ace.range.api;version=latest,\

Modified: ace/trunk/org.apache.ace.repository.itest/src/org/apache/ace/it/repository/RepositoryTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository.itest/src/org/apache/ace/it/repository/RepositoryTest.java?rev=1529112&r1=1529111&r2=1529112&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.repository.itest/src/org/apache/ace/it/repository/RepositoryTest.java (original)
+++ ace/trunk/org.apache.ace.repository.itest/src/org/apache/ace/it/repository/RepositoryTest.java Fri Oct  4 09:47:36 2013
@@ -208,6 +208,7 @@ public class RepositoryTest extends Inte
         Utils.waitForWebserver(m_host);
     }
 
+    @Override
     protected Component[] getDependencies() {
         return new Component[] {
             createComponent()
@@ -216,7 +217,8 @@ public class RepositoryTest extends Inte
         };
     }
 
-    protected void tearDown() throws Exception {
+    @Override
+    protected void doTearDown() throws Exception {
         // remove all repositories, in case a test case does not reach it's cleanup section due to an exception
         removeAllRepositories();
     }

Modified: ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java?rev=1529112&r1=1529111&r2=1529112&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java (original)
+++ ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java Fri Oct  4 09:47:36 2013
@@ -23,10 +23,13 @@ import static org.apache.ace.test.utils.
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.lang.reflect.Method;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
@@ -52,11 +55,10 @@ import org.osgi.service.log.LogService;
 import org.osgi.util.tracker.ServiceTracker;
 
 /**
- * Base class for integration tests. There is no technical reason to use this, but it might make
- * your life easier.<br>
+ * Base class for integration tests. There is no technical reason to use this, but it might make your life easier.<br>
  * <br>
  * {@link org.apache.ace.it.ExampleTest} shows a minimal example of an integration test.
- *
+ * 
  */
 public class IntegrationTestBase extends TestCase {
     private static class ComponentCounter implements ComponentStateListener {
@@ -74,10 +76,10 @@ public class IntegrationTestBase extends
                 result.append(component).append('\n');
                 for (ComponentDependencyDeclaration dependency : (List<ComponentDependencyDeclaration>) component.getDependencies()) {
                     result.append("  ")
-                            .append(dependency.toString())
-                            .append(" ")
-                            .append(ComponentDependencyDeclaration.STATE_NAMES[dependency.getState()])
-                            .append('\n');
+                        .append(dependency.toString())
+                        .append(" ")
+                        .append(ComponentDependencyDeclaration.STATE_NAMES[dependency.getState()])
+                        .append('\n');
                 }
                 result.append('\n');
             }
@@ -102,58 +104,81 @@ public class IntegrationTestBase extends
             return m_latch.await(timeout, unit);
         }
     }
-    
+
     /**
      * If we have to wait for a service, wait this amount of seconds.
      */
-    private static final int SERVICE_TIMEOUT = 5;
-    protected BundleContext m_bundleContext;
+    private static final int SERVICE_TIMEOUT = 15;
 
-    protected DependencyManager m_dependencyManager;
+    private final Map<String, ServiceTracker> m_trackedServices = new HashMap<String, ServiceTracker>();
+    private final List<Configuration> m_trackedConfigurations = new ArrayList<Configuration>();
 
-    /**
-     * The 'after' callback will be called after all components from {@link #getDependencies} have been
-     * started.<br>
-     * <br>
-     * The {@link #after} callback is most useful for configuring additional services after all mandatory 
-     * services are resolved.
-     */
-    protected void configureAdditionalServices() throws Exception {}
+    private boolean m_cleanConfigurations = true;
+    private boolean m_closeServiceTrackers = true;
 
-    /**
-     * The 'before' callback will be called after the components from {@link #getDependencies} have been
-     * added, but you cannot necessarily rely on injected members here. You can use the {@link #configure} and
-     * {@link #configureFactory} methods, as well as the {@link #getService} methods.<br>
-     * <br>
-     * The {@link #before} callback is most useful for configuring services that have been provisioned
-     * in the 'configuration' method.
-     */
-    protected void configureProvisionedServices() throws Exception {}
+    protected BundleContext m_bundleContext;
+    protected DependencyManager m_dependencyManager;
+    protected Component m_eventLoggingComponent;
+    protected Component m_loggingComponent;
 
     /**
      * Write configuration for a single service. For example,
+     * 
      * <pre>
-     *   configure("org.apache.felix.http",
-     *     "org.osgi.service.http.port", "1234");
+     * configure(&quot;org.apache.felix.http&quot;,
+     *     &quot;org.osgi.service.http.port&quot;, &quot;1234&quot;);
      * </pre>
      */
     protected void configure(String pid, String... configuration) throws IOException {
         Properties props = properties(configuration);
         Configuration config = getConfiguration(pid);
         config.update(props);
+        m_trackedConfigurations.add(config);
+    }
+
+    /**
+     * The 'after' callback will be called after all components from {@link #getDependencies} have been started.<br>
+     * <br>
+     * The {@link #after} callback is most useful for configuring additional services after all mandatory services are
+     * resolved.
+     */
+    protected void configureAdditionalServices() throws Exception {
+    }
+
+    /**
+     * Sets whether or not any of the tracked configurations should be automatically be deleted when ending a test.
+     * 
+     * @param aClean
+     *            <code>true</code> (the default) to clean configurations, <code>false</code> to disable this behaviour.
+     */
+    protected void setAutoDeleteTrackedConfigurations(boolean aClean) {
+        m_cleanConfigurations = aClean;
     }
 
     /**
      * Creates a factory configuration with the given properties, just like {@link #configure}.
+     * 
      * @return The PID of newly created configuration.
      */
     protected String configureFactory(String factoryPid, String... configuration) throws IOException {
         Properties props = properties(configuration);
         Configuration config = createFactoryConfiguration(factoryPid);
         config.update(props);
+        m_trackedConfigurations.add(config);
         return config.getPid();
     }
-    
+
+    /**
+     * The 'before' callback will be called after the components from {@link #getDependencies} have been added, but you
+     * cannot necessarily rely on injected members here. You can use the {@link #configure} and
+     * {@link #configureFactory} methods, as well as the {@link #getService} methods.<br>
+     * <br>
+     * The {@link #before} callback is most useful for configuring services that have been provisioned in the
+     * 'configuration' method.
+     */
+    protected void configureProvisionedServices() throws Exception {
+    }
+
     /**
      * Bridge method for dependency manager.
      * 
@@ -162,17 +187,21 @@ public class IntegrationTestBase extends
     protected Component createComponent() {
         return m_dependencyManager.createComponent();
     }
-    
+
     /**
      * Creates a new factory configuration.
      * 
-     * @param factoryPid the PID of the factory to create a new configuration for.
+     * @param factoryPid
+     *            the PID of the factory to create a new configuration for.
      * @return a new {@link Configuration} object, never <code>null</code>.
-     * @throws IOException if access to the persistent storage failed.
+     * @throws IOException
+     *             if access to the persistent storage failed.
      */
     protected Configuration createFactoryConfiguration(String factoryPid) throws IOException {
         ConfigurationAdmin admin = getService(ConfigurationAdmin.class);
-        return admin.createFactoryConfiguration(factoryPid, null);
+        Configuration config = admin.createFactoryConfiguration(factoryPid, null);
+        m_trackedConfigurations.add(config);
+        return config;
     }
 
     /**
@@ -185,21 +214,116 @@ public class IntegrationTestBase extends
     }
 
     /**
+     * Disables logging to the console.
+     */
+    protected synchronized void disableEventLogging() {
+        if (m_eventLoggingComponent != null) {
+            DependencyManager dm = m_dependencyManager;
+            dm.remove(m_eventLoggingComponent);
+            m_eventLoggingComponent = null;
+        }
+    }
+
+    /**
+     * Disables logging to the console.
+     */
+    protected synchronized void disableLogging() {
+        if (m_loggingComponent != null) {
+            DependencyManager dm = m_dependencyManager;
+            dm.remove(m_loggingComponent);
+            m_loggingComponent = null;
+        }
+    }
+
+    protected void doTearDown() throws Exception {
+        // Nop
+    }
+
+    /**
+     * Enables logging events to the console. Mainly useful when debugging tests.
+     */
+    protected synchronized void enableEventLogging() {
+        DependencyManager dm = m_dependencyManager;
+        m_eventLoggingComponent = dm.createComponent()
+            .setInterface(EventHandler.class.getName(), new Properties() {
+                {
+                    put(EventConstants.EVENT_TOPIC, "*");
+                }
+            })
+            .setImplementation(new EventHandler() {
+                @Override
+                public void handleEvent(Event event) {
+                    System.out.print("[EVENT] " + event.getTopic());
+                    for (String key : event.getPropertyNames()) {
+                        System.out.print(" " + key + "=" + event.getProperty(key));
+                    }
+                    System.out.println();
+                }
+            });
+        dm.add(m_eventLoggingComponent);
+    }
+
+    /**
+     * Enables logging to the console. Mainly useful when debugging tests.
+     */
+    protected synchronized void enableLogging() {
+        if (m_loggingComponent == null) {
+            DependencyManager dm = m_dependencyManager;
+            m_loggingComponent = dm.createComponent()
+                .setInterface(LogService.class.getName(), new Properties() {
+                    {
+                        put(Constants.SERVICE_RANKING, Integer.valueOf(1000));
+                    }
+                })
+                .setImplementation(new LogService() {
+                    @Override
+                    public void log(int level, String message) {
+                        log(null, level, message, null);
+                    }
+
+                    @Override
+                    public void log(int level, String message, Throwable exception) {
+                        log(null, level, message, exception);
+                    }
+
+                    @Override
+                    public void log(ServiceReference sr, int level, String message) {
+                        log(sr, level, message, null);
+                    }
+
+                    @Override
+                    public void log(ServiceReference sr, int level, String message, Throwable exception) {
+                        System.out.println("[LOG] " +
+                            (sr == null ? "" : sr + " ") +
+                            level + " " +
+                            message + " " +
+                            (exception == null ? "" : exception));
+                    }
+                });
+            dm.add(m_loggingComponent);
+        }
+    }
+
+    /**
      * Gets an existing configuration or creates a new one, in case it does not exist.
      * 
-     * @param pid the PID of the configuration to return.
+     * @param pid
+     *            the PID of the configuration to return.
      * @return a {@link Configuration} instance, never <code>null</code>.
-     * @throws IOException if access to the persistent storage failed.
+     * @throws IOException
+     *             if access to the persistent storage failed.
      */
     protected Configuration getConfiguration(String pid) throws IOException {
         ConfigurationAdmin admin = getService(ConfigurationAdmin.class);
-        return admin.getConfiguration(pid, null);
+        Configuration configuration = admin.getConfiguration(pid, null);
+        m_trackedConfigurations.add(configuration);
+        return configuration;
     }
 
     /**
-     * Gets a list of components that must be started before the test is started; this useful to
-     * (a) add additional services, e.g. services that should be picked up by the service under
-     * test, or (b) to declare 'this' as a component, and get services injected.
+     * Gets a list of components that must be started before the test is started; this useful to (a) add additional
+     * services, e.g. services that should be picked up by the service under test, or (b) to declare 'this' as a
+     * component, and get services injected.
      */
     protected Component[] getDependencies() {
         return new Component[0];
@@ -208,42 +332,45 @@ public class IntegrationTestBase extends
     /**
      * Returns a list of strings representing the result of the given request URL.
      * 
-     * @param requestURL the URL to access and return the response as strings.
+     * @param requestURL
+     *            the URL to access and return the response as strings.
      * @return a list of strings, never <code>null</code>.
-     * @throws IOException in case accessing the requested URL failed.
+     * @throws IOException
+     *             in case accessing the requested URL failed.
      */
     protected List<String> getResponse(String requestURL) throws IOException {
-    	return getResponse(new URL(requestURL));
+        return getResponse(new URL(requestURL));
     }
 
     /**
      * Returns a list of strings representing the result of the given request URL.
      * 
-     * @param requestURL the URL to access and return the response as strings.
+     * @param requestURL
+     *            the URL to access and return the response as strings.
      * @return a list of strings, never <code>null</code>.
-     * @throws IOException in case accessing the requested URL failed.
+     * @throws IOException
+     *             in case accessing the requested URL failed.
      */
     protected List<String> getResponse(URL requestURL) throws IOException {
         List<String> result = new ArrayList<String>();
         InputStream in = null;
         try {
             in = requestURL.openConnection().getInputStream();
-            byte[] response = new byte[in.available()];
-            in.read(response);
 
             final StringBuilder element = new StringBuilder();
-            for (byte b : response) {
-                switch(b) {
-                    case '\n' :
+            int b;
+            while ((b = in.read()) > 0) {
+                switch (b) {
+                    case '\n':
                         result.add(element.toString());
-                        element.delete(0, element.length());
+                        element.setLength(0);
                         break;
-                    default :
+                    default:
                         element.append((char) b);
                 }
             }
             if (element.length() > 0) {
-            	result.add(element.toString());
+                result.add(element.toString());
             }
         }
         finally {
@@ -260,7 +387,8 @@ public class IntegrationTestBase extends
     /**
      * Convenience method to return an OSGi service.
      * 
-     * @param serviceClass the service class to return.
+     * @param serviceClass
+     *            the service class to return.
      * @return a service instance, can be <code>null</code>.
      */
     protected <T> T getService(Class<T> serviceClass) {
@@ -276,36 +404,43 @@ public class IntegrationTestBase extends
     /**
      * Convenience method to return an OSGi service.
      * 
-     * @param serviceClass the service class to return;
-     * @param filterString the (optional) filter string, can be <code>null</code>.
+     * @param serviceClass
+     *            the service class to return;
+     * @param filterString
+     *            the (optional) filter string, can be <code>null</code>.
      * @return a service instance, can be <code>null</code>.
      */
     @SuppressWarnings("unchecked")
     protected <T> T getService(Class<T> serviceClass, String filterString) throws InvalidSyntaxException {
         T serviceInstance = null;
 
-        ServiceTracker serviceTracker;
-        if (filterString == null) {
-            serviceTracker = new ServiceTracker(m_bundleContext, serviceClass.getName(), null);
+        if (filterString != null && !"".equals(filterString)) {
+            filterString = String.format("(&(%s=%s)%s)", Constants.OBJECTCLASS, serviceClass.getName(), filterString);
         }
         else {
-            String classFilter = "(" + Constants.OBJECTCLASS + "=" + serviceClass.getName() + ")";
-            filterString = "(&" + classFilter + filterString + ")";
-            serviceTracker = new ServiceTracker(m_bundleContext, m_bundleContext.createFilter(filterString), null);
+            filterString = String.format("(%s=%s)", Constants.OBJECTCLASS, serviceClass.getName());
+        }
+
+        ServiceTracker serviceTracker = m_trackedServices.get(filterString);
+        if (serviceTracker == null) {
+            serviceTracker = new ServiceTracker(m_bundleContext, FrameworkUtil.createFilter(filterString), null);
+            serviceTracker.open();
+
+            m_trackedServices.put(filterString, serviceTracker);
         }
-        serviceTracker.open();
+
         try {
             serviceInstance = (T) serviceTracker.waitForService(SERVICE_TIMEOUT * 1000);
 
             if (serviceInstance == null) {
                 fail(serviceClass + " service not found.");
             }
-            else {
-                return serviceInstance;
-            }
+
+            return serviceInstance;
         }
         catch (InterruptedException e) {
             e.printStackTrace();
+            serviceTracker.close();
             fail(serviceClass + " service not available: " + e.toString());
         }
 
@@ -316,7 +451,7 @@ public class IntegrationTestBase extends
      * Set up of this test case.
      */
     protected final void setUp() throws Exception {
-    	m_bundleContext = FrameworkUtil.getBundle(getClass()).getBundleContext();
+        m_bundleContext = FrameworkUtil.getBundle(getClass()).getBundleContext();
         m_dependencyManager = new DependencyManager(m_bundleContext);
 
         Component[] components = getDependencies();
@@ -332,106 +467,74 @@ public class IntegrationTestBase extends
             m_dependencyManager.add(component);
         }
 
-		// Call back the implementation...
-		configureProvisionedServices();
+        // Call back the implementation...
+        configureProvisionedServices();
 
         // And wait for all components to come online.
         try {
             if (!listener.waitForEmpty(SERVICE_TIMEOUT, SECONDS)) {
                 fail("Not all components were started. Still missing the following:\n" + listener.componentsString());
             }
-            
-        	configureAdditionalServices();
-        	
+
+            configureAdditionalServices();
+
             // Wait for CM to settle or we may get "socket closed" due to HTTP service restarts
-            // TODO fix this, it slows down all tests
-            Thread.sleep(500);
+            // JaWi: no longer needed with Felix HTTP v2.2.1?
+            // Thread.sleep(500);
         }
         catch (InterruptedException e) {
             fail("Interrupted while waiting for services to get started.");
         }
     }
-    
-    protected Component m_eventLoggingComponent;
-    protected Component m_loggingComponent;
 
     /**
-     * Enables logging events to the console. Mainly useful when debugging tests.
+     * Utility method to determine the number of test cases in the implementing class.
+     * <p>
+     * Test cases are considered <em>public</em> methods starting their name with "test".
+     * </p>
+     * 
+     * @return a test count, >= 0.
      */
-    protected synchronized void enableEventLogging() {
-        DependencyManager dm = m_dependencyManager;
-        m_eventLoggingComponent = dm.createComponent()
-            .setInterface(EventHandler.class.getName(), new Properties() {{ put(EventConstants.EVENT_TOPIC, "*"); }})
-            .setImplementation(new EventHandler() {
-                @Override
-                public void handleEvent(Event event) {
-                    System.out.print("[EVENT] " + event.getTopic());
-                    for (String key : event.getPropertyNames()) {
-                        System.out.print(" " + key + "=" + event.getProperty(key));
-                    }
-                    System.out.println();
-                }
-            });
-        dm.add(m_eventLoggingComponent);
-    }
+    protected final int getTestCount() {
+        int count = 0;
 
-    /**
-     * Disables logging to the console.
-     */
-    protected synchronized void disableEventLogging() {
-        if (m_eventLoggingComponent != null) {
-            DependencyManager dm = m_dependencyManager;
-            dm.remove(m_eventLoggingComponent);
-            m_eventLoggingComponent = null;
+        for (Method m : getClass().getMethods()) {
+            if (m.getName().startsWith("test")) {
+                count++;
+            }
         }
+
+        return count;
     }
-    
-    /**
-     * Enables logging to the console. Mainly useful when debugging tests.
-     */
-    protected synchronized void enableLogging() {
-        if (m_loggingComponent == null) {
-            DependencyManager dm = m_dependencyManager;
-            m_loggingComponent = dm.createComponent()
-                .setInterface(LogService.class.getName(), new Properties() {{ put(Constants.SERVICE_RANKING, Integer.valueOf(1000)); }})
-                .setImplementation(new LogService() {
-                    @Override
-                    public void log(ServiceReference sr, int level, String message, Throwable exception) {
-                        System.out.println("[LOG] " +
-                            (sr == null ? "" : sr + " ") + 
-                            level + " " + 
-                            message + " " + 
-                            (exception == null ? "" : exception));
+
+    @Override
+    protected final void tearDown() throws Exception {
+        try {
+            doTearDown();
+        }
+        finally {
+            if (m_cleanConfigurations) {
+                for (Configuration c : m_trackedConfigurations) {
+                    try {
+                        c.delete();
                     }
-                    
-                    @Override
-                    public void log(ServiceReference sr, int level, String message) {
-                        log(sr, level, message, null);
+                    catch (Exception exception) {
+                        // Ignore...
                     }
-                    
-                    @Override
-                    public void log(int level, String message, Throwable exception) {
-                        log(null, level, message, exception);
+                }
+                m_trackedConfigurations.clear();
+            }
+            if (m_closeServiceTrackers) {
+                for (ServiceTracker st : m_trackedServices.values()) {
+                    try {
+                        st.close();
                     }
-                    
-                    @Override
-                    public void log(int level, String message) {
-                        log(null, level, message, null);
+                    catch (Exception exception) {
+                        // Ignore...
                     }
-                });
-            dm.add(m_loggingComponent);
-        }
-    }
-    
-    /**
-     * Disables logging to the console.
-     */
-    protected synchronized void disableLogging() {
-        if (m_loggingComponent != null) {
-            DependencyManager dm = m_dependencyManager;
-            dm.remove(m_loggingComponent);
-            m_loggingComponent = null;
+                }
+                m_trackedServices.clear();
+            }
         }
     }
-
 }

Modified: ace/trunk/org.apache.ace.useradmin.ui.itest/src/org/apache/ace/useradmin/ui/test/UserEditorTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.useradmin.ui.itest/src/org/apache/ace/useradmin/ui/test/UserEditorTest.java?rev=1529112&r1=1529111&r2=1529112&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.useradmin.ui.itest/src/org/apache/ace/useradmin/ui/test/UserEditorTest.java (original)
+++ ace/trunk/org.apache.ace.useradmin.ui.itest/src/org/apache/ace/useradmin/ui/test/UserEditorTest.java Fri Oct  4 09:47:36 2013
@@ -35,131 +35,42 @@ import org.osgi.service.useradmin.UserAd
 
 public class UserEditorTest extends IntegrationTestBase {
 
+    private static final String TEST_GROUP = "TestGroup";
+
     private volatile UserEditor m_userEditor;
     private volatile Repository m_userRepository;
     private volatile UserAdmin m_userAdmin;
-    private boolean m_hasBeenSetup = false;
-
-    protected org.apache.felix.dm.Component[] getDependencies() {
-
-        return new Component[] { createComponent()
-            .setImplementation(this)
-            .add(createServiceDependency()
-                .setService(UserEditor.class)
-                .setRequired(true)
-            )
-            .add(createServiceDependency()
-                .setService(UserAdmin.class)
-                .setRequired(true)
-            )
-            .add(createServiceDependency()
-                .setService(Repository.class, "(&(name=users)(customer=apache))")
-                .setRequired(true))
-        };
-    }
-
-    @Override
-    protected void configureProvisionedServices() throws Exception {
-
-        if (m_hasBeenSetup)
-            return;
-
-        configureFactory("org.apache.ace.server.repository.factory",
-            "name", "users",
-            "customer", "apache",
-            "master", "true");
-        configure("org.apache.ace.configurator.useradmin.task.UpdateUserAdminTask",
-            "repositoryName", "users",
-            "repositoryCustomer", "apache");
-        configure("org.apache.ace.scheduler",
-            "org.apache.ace.configurator.useradmin.task.UpdateUserAdminTask", "100");
-    }
 
-    @Override
-    protected void configureAdditionalServices() throws Exception {
-
-        if (m_hasBeenSetup)
-            return;
-
-        m_hasBeenSetup = true;
-        ByteArrayInputStream bis = new ByteArrayInputStream((
-            "<roles>" +
-                "    <group name=\"TestGroup\">" +
-                "        <properties>" +
-                "            <type>userGroup</type>" +
-                "        </properties>" +
-                "    </group>" +
-                "    <user name=\"TestUser\">" +
-                "        <properties>" +
-                "            <email>testUser@apache.org</email>" +
-                "        </properties>" +
-                "        <credentials>" +
-                "            <password type=\"String\">swordfish</password>" +
-                "            <certificate type=\"byte[]\">42</certificate>" +
-                "        </credentials>" +
-                "        <memberof>TestGroup</memberof>" +
-                "    </user>" +
-                "</roles>").getBytes());
-
-        assertTrue("Committing test user data failed.", m_userRepository.commit(bis, m_userRepository.getRange().getHigh()));
-        User user = (User) m_userAdmin.getRole("TestUser");
-        int count = 0;
-        while ((user == null) && (count < 60)) {
-            Thread.sleep(100);
-            user = (User) m_userAdmin.getRole("TestUser");
-            count++;
-        }
-        assertNotNull("Failed to load the user", user);
-    }
-
-    public void testGetGroups() {
-        assertEquals(1, m_userEditor.getGroups().size());
-    }
-
-    public void testGetUsers() {
-        assertEquals(1, m_userEditor.getData().size());
-    }
-
-    public void testGetGroupByUser() {
+    public void GetUserBroken() {
         User newUser = null;
         Role newRole = m_userAdmin.createRole((String) "Testuser", Role.USER);
-        Group group = (Group) m_userAdmin.getRole("TestGroup");
+        Group group = (Group) m_userAdmin.getRole(TEST_GROUP);
         if (newRole != null && group != null) {
             newUser = (User) newRole;
             newUser.getProperties().put("username", "u");
             newUser.getCredentials().put("password", "p");
             group.addMember(newUser);
         }
-        assertEquals(group, m_userEditor.getGroup(newUser));
-        m_userAdmin.removeRole("u");
-    }
-
-    public void testGetGroupByUserNull() {
-        assertNull(m_userEditor.getGroup(null));
+        assertEquals("Testuser", m_userEditor.getUser("u").getName());
     }
 
     public void testAddUserAndRemove() throws Exception {
-        UserDTO userDTO = new UserDTO("tran", "tran", "TestGroup");
+        String username = "name";
+
+        UserDTO userDTO = new UserDTO(username, "pwd", TEST_GROUP);
         m_userEditor.addUser(userDTO);
-        User user = m_userEditor.getUser("tran");
-        assertEquals("tran", (String) user.getProperties().get("username"));
-        m_userEditor.removeUser(userDTO);
-    }
 
-    public void testAddUserWithEmptyUsername() throws Exception {
-        try {
-            UserDTO userDTO = new UserDTO("", "tran", "TestGroup");
-            m_userEditor.addUser(userDTO);
-        }
-        catch (IllegalArgumentException ex) {
-            assertEquals("Username, password and groupname cannot be null or \"\"", ex.getMessage());
-        }
+        User user = m_userEditor.getUser(username);
+        assertNotNull(user);
+        assertEquals(username, (String) user.getProperties().get("username"));
     }
 
-    public void testAddUserWithNullUsername() throws Exception {
+    public void testAddUserToEmptyGroupname() throws Exception {
         try {
-            UserDTO userDTO = new UserDTO(null, "tran", "TestGroup");
+            UserDTO userDTO = new UserDTO("name", "pwd", "");
             m_userEditor.addUser(userDTO);
+
+            fail("Expected IllegalArgumentException!");
         }
         catch (IllegalArgumentException ex) {
             assertEquals("Username, password and groupname cannot be null or \"\"", ex.getMessage());
@@ -168,148 +79,275 @@ public class UserEditorTest extends Inte
 
     public void testAddUserToNonExistingGroup() throws Exception {
         try {
-            UserDTO userDTO = new UserDTO("tran", "bob", "nonexistingGroup");
+            UserDTO userDTO = new UserDTO("name", "pwd", "nonexistingGroup");
             m_userEditor.addUser(userDTO);
+
+            fail("Expected GroupNotFoundException!");
         }
-        catch (Exception ex) {
+        catch (GroupNotFoundException ex) {
             assertEquals("Group: nonexistingGroup not found", ex.getMessage());
         }
     }
 
     public void testAddUserToNullGroup() throws Exception {
         try {
-            UserDTO userDTO = new UserDTO("tran", "bob", null);
+            UserDTO userDTO = new UserDTO("user", "pwd", null);
             m_userEditor.addUser(userDTO);
+
+            fail("Expected IllegalArgumentException!");
         }
         catch (IllegalArgumentException ex) {
             assertEquals("Username, password and groupname cannot be null or \"\"", ex.getMessage());
         }
     }
 
-    public void testAddUserToEmptyGroupname() throws Exception {
+    public void testAddUserWithEmptyUsername() throws Exception {
         try {
-            UserDTO userDTO = new UserDTO("tran", "bob", "");
+            UserDTO userDTO = new UserDTO("", "pwd", TEST_GROUP);
             m_userEditor.addUser(userDTO);
+
+            fail("Expected IllegalArgumentException!");
         }
-        catch (Exception ex) {
+        catch (IllegalArgumentException ex) {
             assertEquals("Username, password and groupname cannot be null or \"\"", ex.getMessage());
         }
     }
 
-    public void testEditUserWithValidPassword() throws Exception {
-        UserDTO userDTO = new UserDTO("bob", "tran", "TestGroup");
-        m_userEditor.addUser(userDTO);
-        userDTO.setPassword("bob");
-        m_userEditor.editPassword(userDTO);
-        assertEquals("bob", (String) m_userEditor.getUser("bob").getCredentials().get("password"));
-        m_userEditor.removeUser(userDTO);
-    }
-
-    public void testEditUserWithNullPassword() throws UserNotFoundException {
-        UserDTO userDTO = new UserDTO("tran", "tran", "TestGroup");
-
+    public void testAddUserWithNullUsername() throws Exception {
         try {
+            UserDTO userDTO = new UserDTO(null, "pwd", TEST_GROUP);
             m_userEditor.addUser(userDTO);
-            userDTO.setPassword(null);
-            m_userEditor.editPassword(userDTO);
+
+            fail("Expected IllegalArgumentException!");
         }
-        catch (Exception e) {
-            assertEquals("Username or Password cannot be null or \"\" ", e.getMessage());
-            m_userEditor.removeUser(userDTO);
+        catch (IllegalArgumentException ex) {
+            assertEquals("Username, password and groupname cannot be null or \"\"", ex.getMessage());
         }
     }
 
-    public void testEditUserWithEmptyPassword() throws UserNotFoundException {
-        UserDTO userDTO = new UserDTO("tran", "tran", "TestGroup");
+    public void testEditNonExistingUser() throws Exception {
         try {
+            UserDTO userDTO = new UserDTO("nonExistingUser", null, null);
+            userDTO.setUsername("anotherName");
 
-            m_userEditor.addUser(userDTO);
-            userDTO.setPassword("");
-            m_userEditor.editPassword(userDTO);
+            m_userEditor.editUsername(userDTO);
+
+            fail("Expected UserNotFoundException!");
         }
-        catch (Exception e) {
-            assertEquals("Username or Password cannot be null or \"\" ", e.getMessage());
-            m_userEditor.removeUser(userDTO);
+        catch (UserNotFoundException userNotFoundException) {
+            assertEquals("User: nonExistingUser not found", userNotFoundException.getMessage());
         }
     }
 
-    public void testEditNonExistingUser() {
+    public void testEditUsernameWithAlreadyExistingName() throws Exception {
+        UserDTO userDTO = new UserDTO("user1", "pwd", TEST_GROUP);
+        m_userEditor.addUser(userDTO);
+
+        userDTO = new UserDTO("user2", "pwd", TEST_GROUP);
+        m_userEditor.addUser(userDTO);
+
         try {
-            UserDTO userDTO = new UserDTO("BOOOOOB", null, null);
-            userDTO.setUsername("bob");
+            userDTO.setUsername("user1");
             m_userEditor.editUsername(userDTO);
+
+            fail("Expected UserAlreadyExistsException!");
         }
-        catch (Exception userNotFoundException) {
-            assertEquals("User: BOOOOOB not found", userNotFoundException.getMessage());
+        catch (UserAlreadyExistsException userAlreadyExistsException) {
+            assertEquals("User: user1 already exists", userAlreadyExistsException.getMessage());
         }
     }
 
-    public void testEditUsernameWithValidName() throws Exception {
-        UserDTO userDTO = new UserDTO("lala", "tran", "TestGroup");
+    public void testEditUserNameWithEmptyName() throws GroupNotFoundException, UserAlreadyExistsException, UserNotFoundException {
+        UserDTO userDTO = new UserDTO("user", "pwd", TEST_GROUP);
         m_userEditor.addUser(userDTO);
-        m_userAdmin.getUser("username", "lala").getProperties().put("username", "lala1");
-        User user = (User) m_userAdmin.getRole("lala");
-        assertEquals("lala", user.getName());
-        assertEquals("lala1", (String) user.getProperties().get("username"));
-        user = m_userAdmin.getUser("username", "lala1");
-        userDTO = new UserDTO(user, m_userEditor.getGroup(user));
-        assertEquals("lala", user.getName());
-        assertEquals("lala1", (String) user.getProperties().get("username"));
-        m_userEditor.removeUser(userDTO);
-    }
 
-    public void testEditUsernameWithAlreadyExistingName() throws UserNotFoundException {
         try {
-            UserDTO userDTO = new UserDTO("Hank", "password", "TestGroup");
-            m_userEditor.addUser(userDTO);
-            userDTO = new UserDTO("Dirk", "password", "TestGroup");
-            m_userEditor.addUser(userDTO);
-            userDTO.setUsername("Hank");
+            userDTO.setUsername("");
             m_userEditor.editUsername(userDTO);
+
+            fail("Expected IllegalArgumentException!");
         }
-        catch (Exception userAlreadyExistsException) {
-            assertEquals("User: Hank already exists", userAlreadyExistsException.getMessage());
-            m_userEditor.removeUser(new UserDTO("Hank", null, null));
-            m_userEditor.removeUser(new UserDTO("Dirk", null, null));
+        catch (IllegalArgumentException invalidArgumentException) {
+            assertEquals("oldUsername and newUsername cannot be null or \"\" ", invalidArgumentException.getMessage());
         }
     }
 
     public void testEditUserNameWithNull() throws GroupNotFoundException, UserAlreadyExistsException, UserNotFoundException {
+        UserDTO userDTO = new UserDTO("user", "pwd", TEST_GROUP);
+        m_userEditor.addUser(userDTO);
+
         try {
-            UserDTO userDTO = new UserDTO("Dirk", "password", "TestGroup");
-            m_userEditor.addUser(userDTO);
             userDTO.setUsername(null);
             m_userEditor.editUsername(userDTO);
+
+            fail("Expected IllegalArgumentException!");
         }
-        catch (Exception invalidArgumentException) {
+        catch (IllegalArgumentException invalidArgumentException) {
             assertEquals("oldUsername and newUsername cannot be null or \"\" ", invalidArgumentException.getMessage());
-            m_userEditor.removeUser(new UserDTO("Dirk", "password", "TestGroup"));
         }
     }
 
-    public void testEditUserNameWithEmptyName() throws GroupNotFoundException, UserAlreadyExistsException, UserNotFoundException {
+    public void testEditUsernameWithValidName() throws Exception {
+        String username = "user1";
+
+        UserDTO userDTO = new UserDTO(username, "pwd", TEST_GROUP);
+        m_userEditor.addUser(userDTO);
+
+        m_userAdmin.getUser("username", username).getProperties().put("username", "user2");
+
+        User user = (User) m_userAdmin.getRole(username);
+        assertEquals(username, user.getName());
+        assertEquals("user2", (String) user.getProperties().get("username"));
+
+        user = m_userAdmin.getUser("username", "user2");
+        userDTO = new UserDTO(user, m_userEditor.getGroup(user));
+        assertEquals(username, user.getName());
+        assertEquals("user2", (String) user.getProperties().get("username"));
+    }
+
+    public void testEditUserWithEmptyPassword() throws Exception {
+        UserDTO userDTO = new UserDTO("tran", "tran", TEST_GROUP);
+        m_userEditor.addUser(userDTO);
+
         try {
-            UserDTO userDTO = new UserDTO("Dirk", "password", "TestGroup");
-            m_userEditor.addUser(userDTO);
-            userDTO.setUsername("");
-            m_userEditor.editUsername(userDTO);
+            userDTO.setPassword("");
+            m_userEditor.editPassword(userDTO);
+
+            fail("Expected IllegalArgumentException!");
         }
-        catch (Exception invalidArgumentException) {
-            assertEquals("oldUsername and newUsername cannot be null or \"\" ", invalidArgumentException.getMessage());
-            m_userEditor.removeUser(new UserDTO("Dirk", "password", "TestGroup"));
+        catch (IllegalArgumentException e) {
+            assertEquals("Username or Password cannot be null or \"\" ", e.getMessage());
         }
     }
 
-    public void GetUserBroken() {
-        User newUser = null;
+    public void testEditUserWithNullPassword() throws Exception {
+        UserDTO userDTO = new UserDTO("tran", "tran", TEST_GROUP);
+        m_userEditor.addUser(userDTO);
+
+        try {
+            userDTO.setPassword(null);
+            m_userEditor.editPassword(userDTO);
+
+            fail("Expected IllegalArgumentException!");
+        }
+        catch (IllegalArgumentException e) {
+            assertEquals("Username or Password cannot be null or \"\" ", e.getMessage());
+        }
+    }
+
+    public void testEditUserWithValidPassword() throws Exception {
+        String username = "user1";
+
+        UserDTO userDTO = new UserDTO(username, "pwd", TEST_GROUP);
+        m_userEditor.addUser(userDTO);
+
+        userDTO.setPassword(username);
+        m_userEditor.editPassword(userDTO);
+
+        assertEquals(username, (String) m_userEditor.getUser(username).getCredentials().get("password"));
+    }
+
+    public void testGetGroupByUser() {
         Role newRole = m_userAdmin.createRole((String) "Testuser", Role.USER);
-        Group group = (Group) m_userAdmin.getRole("TestGroup");
-        if (newRole != null && group != null) {
-            newUser = (User) newRole;
-            newUser.getProperties().put("username", "u");
-            newUser.getCredentials().put("password", "p");
-            group.addMember(newUser);
+        assertNotNull(newRole);
+
+        Group group = (Group) m_userAdmin.getRole(TEST_GROUP);
+        assertNotNull(group);
+
+        User newUser = (User) newRole;
+        newUser.getProperties().put("username", "u");
+        newUser.getCredentials().put("password", "p");
+        group.addMember(newUser);
+
+        Group userGroup = m_userEditor.getGroup(newUser);
+        assertNotNull(userGroup);
+        assertEquals(group.getName(), userGroup.getName());
+    }
+
+    public void testGetGroupByUserNull() {
+        assertNull(m_userEditor.getGroup(null));
+    }
+
+    public void testGetGroups() {
+        assertEquals(1, m_userEditor.getGroups().size());
+    }
+
+    public void testGetUsers() {
+        assertEquals(1, m_userEditor.getData().size());
+    }
+
+    @Override
+    protected void configureAdditionalServices() throws Exception {
+        ByteArrayInputStream bis = new ByteArrayInputStream((
+            "<roles>" +
+                "    <group name=\"TestGroup\">" +
+                "        <properties>" +
+                "            <type>userGroup</type>" +
+                "        </properties>" +
+                "    </group>" +
+                "    <user name=\"TestUser\">" +
+                "        <properties>" +
+                "            <email>testUser@apache.org</email>" +
+                "        </properties>" +
+                "        <credentials>" +
+                "            <password type=\"String\">swordfish</password>" +
+                "            <certificate type=\"byte[]\">42</certificate>" +
+                "        </credentials>" +
+                "        <memberof>TestGroup</memberof>" +
+                "    </user>" +
+                "</roles>").getBytes());
+
+        assertTrue("Committing test user data failed.", m_userRepository.commit(bis, m_userRepository.getRange().getHigh()));
+        User user = (User) m_userAdmin.getRole("TestUser");
+        int count = 0;
+        while ((user == null) && (count < 60)) {
+            Thread.sleep(100);
+            user = (User) m_userAdmin.getRole("TestUser");
+            count++;
         }
-        assertEquals("Testuser", m_userEditor.getUser("u").getName());
+        assertNotNull("Failed to load the user", user);
+    }
+
+    @Override
+    protected void configureProvisionedServices() throws Exception {
+        configureFactory("org.apache.ace.server.repository.factory",
+            "name", "users",
+            "customer", "apache",
+            "master", "true");
+        configure("org.apache.ace.configurator.useradmin.task.UpdateUserAdminTask",
+            "repositoryName", "users",
+            "repositoryCustomer", "apache");
+        configure("org.apache.ace.scheduler",
+            "org.apache.ace.configurator.useradmin.task.UpdateUserAdminTask", "100");
+    }
+
+    @Override
+    protected void doTearDown() throws Exception {
+        Role[] roles = m_userAdmin.getRoles(null);
+        for (Role role : roles) {
+            try {
+                m_userAdmin.removeRole(role.getName());
+            }
+            catch (Exception exception) {
+                // Ignore...
+            }
+        }
+    }
+
+    protected org.apache.felix.dm.Component[] getDependencies() {
+        return new Component[] { createComponent()
+            .setImplementation(this)
+            .add(createServiceDependency()
+                .setService(UserEditor.class)
+                .setRequired(true)
+            )
+            .add(createServiceDependency()
+                .setService(UserAdmin.class)
+                .setRequired(true)
+            )
+            .add(createServiceDependency()
+                .setService(Repository.class, "(&(name=users)(customer=apache))")
+                .setRequired(true))
+        };
     }
 }



Mime
View raw message