[jboss-cvs] JBossAS SVN: r95035 - in projects/jboss-osgi/trunk: reactor/blueprint/impl and 15 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 16 09:34:55 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-16 09:34:54 -0400 (Fri, 16 Oct 2009)
New Revision: 95035
Added:
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptor.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptorService.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentService.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceBase.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceCapability.java
projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/microcontainer/
projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
Removed:
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/BundleDeployment.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/BundleDeploymentFactory.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployer.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerService.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployersCapability.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployersService.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java
Modified:
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml
projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml
projects/jboss-osgi/trunk/reactor/blueprint/testsuite/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentRegistryService.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentScannerService.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployerServiceDelegate.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java
projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
[JBOSGI-183] Initial implementation of OSGi Deployers
Cleanup initial deployment API
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/pom.xml 2009-10-16 13:34:54 UTC (rev 95035)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-parent</artifactId>
- <version>1.0.3</version>
+ <version>1.0.4-SNAPSHOT</version>
</parent>
<!-- Subversion -->
@@ -65,7 +65,7 @@
<version.jboss.osgi.runtime.deployers>1.0.2</version.jboss.osgi.runtime.deployers>
<version.jboss.osgi.runtime.equinox>3.5</version.jboss.osgi.runtime.equinox>
<version.jboss.osgi.runtime.felix>2.0.0-SNAPSHOT</version.jboss.osgi.runtime.felix>
- <version.jboss.osgi.runtime.jbossas>1.0.1</version.jboss.osgi.runtime.jbossas>
+ <version.jboss.osgi.runtime.jbossas>1.0.2-SNAPSHOT</version.jboss.osgi.runtime.jbossas>
<version.jboss.osgi.spi>1.0.3-SNAPSHOT</version.jboss.osgi.spi>
<version.jboss.osgi.webconsole>1.0.2</version.jboss.osgi.webconsole>
<version.jboss.osgi.xml.binding>2.0.1.SP1</version.jboss.osgi.xml.binding>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml 2009-10-16 13:34:54 UTC (rev 95035)
@@ -73,6 +73,7 @@
org.jboss.kernel.spi*,
org.jboss.osgi.common.log;version=1.0,
org.jboss.osgi.jbossxb;version=2.0,
+ org.jboss.osgi.microcontainer;version=1.0,
org.jboss.osgi.spi;version=1.0,
org.jboss.osgi.spi.capability;version=1.0,
org.jboss.osgi.spi.service;version=1.0,
Modified: projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -24,8 +24,8 @@
//$Id$
import org.jboss.osgi.jbossxb.XMLBindingCapability;
+import org.jboss.osgi.microcontainer.MicrocontainerCapability;
import org.jboss.osgi.spi.capability.Capability;
-import org.jboss.osgi.spi.capability.MicrocontainerCapability;
import org.jboss.osgi.spi.testing.OSGiRuntime;
/**
Modified: projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml 2009-10-16 13:34:54 UTC (rev 95035)
@@ -92,8 +92,8 @@
<!-- Test Dependencies -->
<dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
@@ -240,6 +240,11 @@
<artifactId>jboss-osgi-framework</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
@@ -279,6 +284,11 @@
<artifactId>jboss-osgi-framework</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/testsuite/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/scripts/assembly-bundles.xml 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/blueprint/testsuite/scripts/assembly-bundles.xml 2009-10-16 13:34:54 UTC (rev 95035)
@@ -18,6 +18,7 @@
<include>*:jboss-osgi-blueprint:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-common-core:jar</include>
+ <include>*:jboss-osgi-deployment:jar</include>
<include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/BundleDeployment.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/BundleDeployment.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/BundleDeployment.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -1,154 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.deployment;
-
-import java.io.Serializable;
-import java.net.URL;
-
-//$Id$
-
-/**
- * An abstraction of a bundle deployment
- *
- * @author thomas.diesler at jboss.com
- * @since 27-May-2009
- */
-public class BundleDeployment implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
- private URL location;
- private String symbolicName;
- private String version;
- private int startLevel;
- private boolean autoStart;
- private Object metadata;
-
- public BundleDeployment(URL location, String symbolicName, String version)
- {
- if (location == null)
- throw new IllegalArgumentException("Location cannot be null");
- if (symbolicName == null)
- throw new IllegalArgumentException("Symbolic name cannot be null");
-
- if (version == null)
- version = "0.0.0";
-
- this.symbolicName = symbolicName;
- this.location = location;
- this.version = version;
- }
-
- /**
- * Get the bundle location
- */
- public URL getLocation()
- {
- return location;
- }
-
- /**
- * Get the bundle symbolic name
- */
- public String getSymbolicName()
- {
- return symbolicName;
- }
-
- /**
- * Get the bundle version
- */
- public String getVersion()
- {
- return version;
- }
-
- /**
- * Get the start level associated with this deployment
- */
- public int getStartLevel()
- {
- return startLevel;
- }
-
- /**
- * Set the start level associated with this deployment
- */
- public void setStartLevel(int startLevel)
- {
- this.startLevel = startLevel;
- }
-
- /**
- * Get the autostart flag associated with this deployment
- */
- public boolean isAutoStart()
- {
- return autoStart;
- }
-
- /**
- * Set the autostart flag associated with this deployment
- */
- public void setAutoStart(boolean autoStart)
- {
- this.autoStart = autoStart;
- }
-
- /**
- * Get extra meta data associated with this deployment
- */
- public Object getMetadata()
- {
- return metadata;
- }
-
- /**
- * Set extra meta data associated with this deployment
- */
- public void setMetadata(Object metadata)
- {
- this.metadata = metadata;
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if (!(obj instanceof BundleDeployment))
- return false;
-
- BundleDeployment other = (BundleDeployment)obj;
- return symbolicName.equals(other.symbolicName) && version.equals(other.version);
- }
-
- @Override
- public int hashCode()
- {
- return toString().hashCode();
- }
-
- @Override
- public String toString()
- {
- return "[" + symbolicName + "-" + version + ",url=" + location + "]";
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/BundleDeploymentFactory.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/BundleDeploymentFactory.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/BundleDeploymentFactory.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.deployment;
-
-//$Id$
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.jar.Attributes;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-
-import org.jboss.osgi.deployment.BundleDeployment;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-
-/**
- * A factory for bundle deployments.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2009
- */
-public abstract class BundleDeploymentFactory
-{
- public static BundleDeployment createBundleDeployment(String location) throws BundleException
- {
- // Try location as URL
- URL url = null;
- try
- {
- url = new URL(location);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- // Try location as File
- if (url == null)
- {
- try
- {
- File file = new File(location);
- if (file.exists())
- url = file.toURI().toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- }
-
- if (url == null)
- throw new IllegalArgumentException("Invalid bundle location: " + location);
-
- return createBundleDeployment(url);
- }
-
- public static BundleDeployment createBundleDeployment(URL url) throws BundleException
- {
- Manifest manifest;
- try
- {
- JarFile jarFile = new JarFile(url.getPath());
- manifest = jarFile.getManifest();
- jarFile.close();
- }
- catch (IOException ex)
- {
- throw new BundleException("Cannot get manifest from: " + url);
-
- }
-
- Attributes attribs = manifest.getMainAttributes();
- String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
- if (symbolicName == null)
- throw new BundleException("Cannot obtain Bundle-SymbolicName for: " + url);
-
- String version = attribs.getValue(Constants.BUNDLE_VERSION);
- return new BundleDeployment(url, symbolicName, version);
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployer.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployer.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployer.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.deployment;
-
-//$Id$
-
-
-/**
- * An OSGi deployer
- *
- * @author thomas.diesler at jboss.com
- * @since 15-Oct-2009
- */
-public interface Deployer
-{
- enum Phase {
- BEFORE_INSTALLED,
- AFTER_INSTALLED,
- BEFORE_RESOLVED,
- AFTER_RESOLVED,
- BEFORE_ACTIVE,
- AFTER_ACTIVE
- }
-
- void deploy(Deployment dep);
-
- void undeploy(Deployment dep);
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerService.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerService.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.deployment;
-
-//$Id$
-
-import java.net.URL;
-
-import javax.management.ObjectName;
-
-import org.jboss.osgi.spi.management.ObjectNameFactory;
-import org.osgi.framework.BundleException;
-
-/**
- * A Service that can be used to deploy/undeploy bundles or archives to/from the runtime.
- *
- * @author thomas.diesler at jboss.com
- * @since 23-Jan-2009
- */
-public interface DeployerService
-{
- /**
- * The object name under which this is registered: 'jboss.osgi:service=DeployerService'
- */
- ObjectName MBEAN_DEPLOYER_SERVICE = ObjectNameFactory.create("jboss.osgi:service=DeployerService");
-
- /**
- * Deploy an array of bundles
- */
- void deploy(BundleDeployment[] bundleDeps) throws BundleException;
-
- /**
- * Undeploy an array of bundles
- */
- void undeploy(BundleDeployment[] bundleDeps) throws BundleException;
-
- /**
- * Deploy bundle from URL
- */
- void deploy(URL url) throws BundleException;
-
- /**
- * Undeploy bundle from URL.
- *
- * Note, due to the dynamic nature of OSGi services it is
- * possible that a {@link DeployerService} is asked to undeploy
- * a bundle URL which it did not deploy itself.
- *
- * In this case this method should return false, so that
- * another {@link DeployerService} can be tried.
- *
- * @return true if this service could undeploy the bundle
- */
- boolean undeploy(URL url) throws BundleException;
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployersCapability.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployersCapability.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployersCapability.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.deployment;
-
-//$Id$
-
-import org.jboss.osgi.spi.capability.Capability;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
-
-/**
- * Adds the Deployers capability to the {@link OSGiRuntime}
- * under test.
- *
- * It is ignored if the {@link DeployersService} is already registered.
- *
- * Installed bundles: jboss-osgi-microcontainer.jar
- *
- * @author thomas.diesler at jboss.com
- * @since 05-May-2009
- */
-public class DeployersCapability extends Capability
-{
- public DeployersCapability()
- {
- super(DeployersService.class.getName());
-
- addBundle("bundles/jboss-osgi-deployers.jar");
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployersService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployersService.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployersService.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.deployment;
-
-//$Id$
-
-
-/**
- * The deployers service
- *
- * @author thomas.diesler at jboss.com
- * @since 15-Oct-2009
- */
-public interface DeployersService
-{
- Deployment createDeployment(String location);
-
- void addDeployer(Deployer deployer);
-
- void removeDeployer(Deployer deployer);
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.deployment;
-
-//$Id$
-
-import org.jboss.virtual.VirtualFile;
-
-/**
- * An OSGi deployment
- *
- * @author thomas.diesler at jboss.com
- * @since 15-Oct-2009
- */
-public interface Deployment
-{
- String getLocation();
-
- VirtualFile getRoot();
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java (from rev 95025, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/BundleDeployment.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -0,0 +1,154 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.deployment;
+
+import java.io.Serializable;
+import java.net.URL;
+
+//$Id$
+
+/**
+ * An abstraction of a bundle deployment
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 27-May-2009
+ */
+public class Deployment implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ private URL location;
+ private String symbolicName;
+ private String version;
+ private int startLevel;
+ private boolean autoStart;
+ private Object metadata;
+
+ public Deployment(URL location, String symbolicName, String version)
+ {
+ if (location == null)
+ throw new IllegalArgumentException("Location cannot be null");
+ if (symbolicName == null)
+ throw new IllegalArgumentException("Symbolic name cannot be null");
+
+ if (version == null)
+ version = "0.0.0";
+
+ this.symbolicName = symbolicName;
+ this.location = location;
+ this.version = version;
+ }
+
+ /**
+ * Get the bundle location
+ */
+ public URL getLocation()
+ {
+ return location;
+ }
+
+ /**
+ * Get the bundle symbolic name
+ */
+ public String getSymbolicName()
+ {
+ return symbolicName;
+ }
+
+ /**
+ * Get the bundle version
+ */
+ public String getVersion()
+ {
+ return version;
+ }
+
+ /**
+ * Get the start level associated with this deployment
+ */
+ public int getStartLevel()
+ {
+ return startLevel;
+ }
+
+ /**
+ * Set the start level associated with this deployment
+ */
+ public void setStartLevel(int startLevel)
+ {
+ this.startLevel = startLevel;
+ }
+
+ /**
+ * Get the autostart flag associated with this deployment
+ */
+ public boolean isAutoStart()
+ {
+ return autoStart;
+ }
+
+ /**
+ * Set the autostart flag associated with this deployment
+ */
+ public void setAutoStart(boolean autoStart)
+ {
+ this.autoStart = autoStart;
+ }
+
+ /**
+ * Get extra meta data associated with this deployment
+ */
+ public Object getMetadata()
+ {
+ return metadata;
+ }
+
+ /**
+ * Set extra meta data associated with this deployment
+ */
+ public void setMetadata(Object metadata)
+ {
+ this.metadata = metadata;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (!(obj instanceof Deployment))
+ return false;
+
+ Deployment other = (Deployment)obj;
+ return symbolicName.equals(other.symbolicName) && version.equals(other.version);
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return toString().hashCode();
+ }
+
+ @Override
+ public String toString()
+ {
+ return "[" + symbolicName + "-" + version + ",url=" + location + "]";
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptor.java (from rev 95024, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployer.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptor.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptor.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.deployment;
+
+//$Id$
+
+
+/**
+ * An OSGi deployer
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 15-Oct-2009
+ */
+public interface DeploymentInterceptor
+{
+ enum Phase {
+ BEFORE_INSTALLED,
+ AFTER_INSTALLED,
+ BEFORE_RESOLVED,
+ AFTER_RESOLVED,
+ BEFORE_ACTIVE,
+ AFTER_ACTIVE
+ }
+
+ void deploy(Deployment dep);
+
+ void undeploy(Deployment dep);
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptorService.java (from rev 95024, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployersService.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptorService.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptorService.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.deployment;
+
+//$Id$
+
+
+/**
+ * The deployers service
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 15-Oct-2009
+ */
+public interface DeploymentInterceptorService
+{
+ void addInterceptor(DeploymentInterceptor deployer);
+
+ void removeInterceptor(DeploymentInterceptor deployer);
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentRegistryService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentRegistryService.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentRegistryService.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -39,21 +39,21 @@
* Create a bundle deployment from the given bundle URL
* @return null, if this service does not maintain the bundle deployment
*/
- BundleDeployment getBundleDeployment(URL url);
+ Deployment getBundleDeployment(URL url);
/**
* Get the bundle deployment for the given bundle symbolicName and version
* @return null, if this service does not maintain the bundle deployment
*/
- BundleDeployment getBundleDeployment(String symbolicName, Version version);
+ Deployment getBundleDeployment(String symbolicName, Version version);
/**
* Register a bundle deployment
*/
- void registerBundleDeployment(BundleDeployment dep);
+ void registerBundleDeployment(Deployment dep);
/**
* Unregister a bundle deployment
*/
- void unregisterBundleDeployment(BundleDeployment dep);
+ void unregisterBundleDeployment(Deployment dep);
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentScannerService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentScannerService.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentScannerService.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -75,5 +75,5 @@
/**
* Returns the array of bundles currently known to the deployemtn scanner.
*/
- BundleDeployment[] getBundleDeployments();
+ Deployment[] getBundleDeployments();
}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentService.java (from rev 95025, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerService.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentService.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentService.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.deployment;
+
+//$Id$
+
+import java.net.URL;
+
+import javax.management.ObjectName;
+
+import org.jboss.osgi.spi.management.ObjectNameFactory;
+import org.osgi.framework.BundleException;
+
+/**
+ * A Service that can be used to deploy/undeploy bundles or archives to/from the runtime.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public interface DeploymentService
+{
+ /**
+ * The object name under which this is registered: 'jboss.osgi:service=DeployerService'
+ */
+ ObjectName MBEAN_DEPLOYER_SERVICE = ObjectNameFactory.create("jboss.osgi:service=DeployerService");
+
+ /**
+ * Create a deployment from the given location.
+ */
+ Deployment createDeployment(String location) throws BundleException;
+
+ /**
+ * Deploy an array of bundles
+ */
+ void deploy(Deployment[] bundleDeps) throws BundleException;
+
+ /**
+ * Undeploy an array of bundles
+ */
+ void undeploy(Deployment[] bundleDeps) throws BundleException;
+
+ /**
+ * Deploy bundle from URL
+ */
+ void deploy(URL url) throws BundleException;
+
+ /**
+ * Undeploy bundle from URL.
+ *
+ * Note, due to the dynamic nature of OSGi services it is
+ * possible that a {@link DeploymentService} is asked to undeploy
+ * a bundle URL which it did not deploy itself.
+ *
+ * In this case this method should return false, so that
+ * another {@link DeploymentService} can be tried.
+ *
+ * @return true if this service could undeploy the bundle
+ */
+ boolean undeploy(URL url) throws BundleException;
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceBase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceBase.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceBase.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -0,0 +1,102 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.deployment;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+
+//$Id$
+
+/**
+ * An abstract base implementation of the DeployerService.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 16-Oct-2009
+ */
+public abstract class DeploymentServiceBase implements DeploymentService
+{
+ public Deployment createDeployment(String location) throws BundleException
+ {
+ // Try location as URL
+ URL url = null;
+ try
+ {
+ url = new URL(location);
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ // Try location as File
+ if (url == null)
+ {
+ try
+ {
+ File file = new File(location);
+ if (file.exists())
+ url = file.toURI().toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+
+ if (url == null)
+ throw new IllegalArgumentException("Invalid bundle location: " + location);
+
+ return createDeploymentInternal(url);
+ }
+
+ private Deployment createDeploymentInternal(URL url) throws BundleException
+ {
+ Manifest manifest;
+ try
+ {
+ JarFile jarFile = new JarFile(url.getPath());
+ manifest = jarFile.getManifest();
+ jarFile.close();
+ }
+ catch (IOException ex)
+ {
+ throw new BundleException("Cannot get manifest from: " + url);
+
+ }
+
+ Attributes attribs = manifest.getMainAttributes();
+ String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
+ if (symbolicName == null)
+ throw new BundleException("Cannot obtain Bundle-SymbolicName for: " + url);
+
+ String version = attribs.getValue(Constants.BUNDLE_VERSION);
+ return new Deployment(url, symbolicName, version);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceBase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceCapability.java (from rev 95024, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployersCapability.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceCapability.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceCapability.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.deployment;
+
+//$Id$
+
+import org.jboss.osgi.spi.capability.Capability;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+
+/**
+ * Adds the DeploymentService capability to the {@link OSGiRuntime}
+ * under test.
+ *
+ * It is ignored if the {@link DeploymentService} is already registered.
+ *
+ * Installed bundles: jboss-osgi-deployment.jar
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 16-Oct-2009
+ */
+public class DeploymentServiceCapability extends Capability
+{
+ public DeploymentServiceCapability()
+ {
+ super(DeploymentService.class.getName());
+
+ addBundle("bundles/jboss-osgi-deployment.jar");
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployerServiceDelegate.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployerServiceDelegate.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployerServiceDelegate.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -25,22 +25,22 @@
import java.net.URL;
-import org.jboss.osgi.deployment.BundleDeployment;
-import org.jboss.osgi.deployment.DeployerService;
+import org.jboss.osgi.deployment.Deployment;
+import org.jboss.osgi.deployment.DeploymentService;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
/**
- * A {@link DeployerService} that delegates to the service that is tracked by the given {@link DeployerServiceTracker}
+ * A {@link DeploymentService} that delegates to the service that is tracked by the given {@link DeployerServiceTracker}
*
* This delegate is registered as an MBean
*
* @author thomas.diesler at jboss.com
* @since 27-May-2009
*/
-public class DeployerServiceDelegate implements DeployerService
+public class DeployerServiceDelegate implements DeploymentService
{
private BundleContext context;
@@ -49,21 +49,27 @@
this.context = context;
}
- public void deploy(BundleDeployment[] bundles) throws BundleException
+ public Deployment createDeployment(String location) throws BundleException
{
- DeployerService service = getDefaultDeployerService();
+ DeploymentService service = getDefaultDeployerService();
+ return service.createDeployment(location);
+ }
+
+ public void deploy(Deployment[] bundles) throws BundleException
+ {
+ DeploymentService service = getDefaultDeployerService();
service.deploy(bundles);
}
public void deploy(URL url) throws BundleException
{
- DeployerService service = getDefaultDeployerService();
+ DeploymentService service = getDefaultDeployerService();
service.deploy(url);
}
- public void undeploy(BundleDeployment[] bundles) throws BundleException
+ public void undeploy(Deployment[] bundles) throws BundleException
{
- for (BundleDeployment info : bundles)
+ for (Deployment info : bundles)
undeploy(info.getLocation());
}
@@ -71,7 +77,7 @@
{
boolean undeployed = false;
- DeployerService service = getMicrocontainerDeployerService();
+ DeploymentService service = getMicrocontainerDeployerService();
if (service != null)
undeployed = service.undeploy(url);
@@ -84,10 +90,10 @@
return undeployed;
}
- private DeployerService getDefaultDeployerService()
+ private DeploymentService getDefaultDeployerService()
{
// First try the MC provider
- DeployerService service = getMicrocontainerDeployerService();
+ DeploymentService service = getMicrocontainerDeployerService();
// Fall back to the system provider
if (service == null)
@@ -96,16 +102,16 @@
return service;
}
- private DeployerService getMicrocontainerDeployerService()
+ private DeploymentService getMicrocontainerDeployerService()
{
- DeployerService service = null;
+ DeploymentService service = null;
try
{
String filter = "(provider=microcontainer)";
- String serviceName = DeployerService.class.getName();
+ String serviceName = DeploymentService.class.getName();
ServiceReference[] srefs = context.getServiceReferences(serviceName, filter);
if (srefs != null)
- service = (DeployerService)context.getService(srefs[0]);
+ service = (DeploymentService)context.getService(srefs[0]);
}
catch (InvalidSyntaxException ex)
{
@@ -114,16 +120,16 @@
return service;
}
- private DeployerService getSystemDeployerService()
+ private DeploymentService getSystemDeployerService()
{
- DeployerService service = null;
+ DeploymentService service = null;
try
{
String filter = "(provider=system)";
- String serviceName = DeployerService.class.getName();
+ String serviceName = DeploymentService.class.getName();
ServiceReference[] srefs = context.getServiceReferences(serviceName, filter);
if (srefs != null)
- service = (DeployerService)context.getService(srefs[0]);
+ service = (DeploymentService)context.getService(srefs[0]);
}
catch (InvalidSyntaxException ex)
{
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeployersActivator.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -29,10 +29,9 @@
import javax.management.MBeanServer;
import javax.management.StandardMBean;
-import org.jboss.osgi.deployment.Deployer;
-import org.jboss.osgi.deployment.DeployerService;
-import org.jboss.osgi.deployment.DeployersService;
-import org.jboss.osgi.deployment.Deployment;
+import org.jboss.osgi.deployment.DeploymentService;
+import org.jboss.osgi.deployment.DeploymentInterceptor;
+import org.jboss.osgi.deployment.DeploymentInterceptorService;
import org.jboss.osgi.deployment.DeploymentRegistryService;
import org.jboss.osgi.spi.NotImplementedException;
import org.osgi.framework.BundleActivator;
@@ -58,29 +57,24 @@
public void start(BundleContext context) throws Exception
{
// Register the system SystemDeployerService and DeployerServiceDelegate
- DeployerService deployer = registerDeployerServices(context);
+ DeploymentService deployer = registerDeployerServices(context);
// Track the MBeanServer and register the DeployerServiceDelegate
trackMBeanServer(context, deployer);
- DeployersService service = new DeployersService()
+ DeploymentInterceptorService service = new DeploymentInterceptorService()
{
- public void removeDeployer(Deployer deployer)
+ public void removeInterceptor(DeploymentInterceptor deployer)
{
throw new NotImplementedException();
}
- public Deployment createDeployment(String location)
+ public void addInterceptor(DeploymentInterceptor deployer)
{
throw new NotImplementedException();
}
-
- public void addDeployer(Deployer deployer)
- {
- throw new NotImplementedException();
- }
};
- context.registerService(DeployersService.class.getName(), service, null);
+ context.registerService(DeploymentInterceptorService.class.getName(), service, null);
}
public void stop(BundleContext context) throws Exception
@@ -93,7 +87,7 @@
}
}
- protected DeployerService registerDeployerServices(BundleContext context)
+ protected DeploymentService registerDeployerServices(BundleContext context)
{
// Register the DeploymentRegistryService
DeploymentRegistryService registry = new DeploymentRegistryServiceImpl(context);
@@ -103,17 +97,17 @@
Properties props = new Properties();
props.put("provider", "system");
SystemDeployerService systemDeployer = new SystemDeployerService(context);
- context.registerService(DeployerService.class.getName(), systemDeployer, props);
+ context.registerService(DeploymentService.class.getName(), systemDeployer, props);
// Register the DeployerServiceDelegate
props = new Properties();
props.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE);
- DeployerService deployerDelegate = new DeployerServiceDelegate(context);
- context.registerService(DeployerService.class.getName(), deployerDelegate, props);
+ DeploymentService deployerDelegate = new DeployerServiceDelegate(context);
+ context.registerService(DeploymentService.class.getName(), deployerDelegate, props);
return deployerDelegate;
}
- private void trackMBeanServer(BundleContext context, final DeployerService deployer)
+ private void trackMBeanServer(BundleContext context, final DeploymentService deployer)
{
ServiceTracker jmxTracker = new ServiceTracker(context, MBeanServer.class.getName(), null)
{
@@ -136,12 +130,12 @@
jmxTracker.open();
}
- private void registerDeployerServiceMBean(MBeanServer mbeanServer, DeployerService delegate)
+ private void registerDeployerServiceMBean(MBeanServer mbeanServer, DeploymentService delegate)
{
try
{
- StandardMBean mbean = new StandardMBean(delegate, DeployerService.class);
- mbeanServer.registerMBean(mbean, DeployerService.MBEAN_DEPLOYER_SERVICE);
+ StandardMBean mbean = new StandardMBean(delegate, DeploymentService.class);
+ mbeanServer.registerMBean(mbean, DeploymentService.MBEAN_DEPLOYER_SERVICE);
}
catch (JMException ex)
{
@@ -153,8 +147,8 @@
{
try
{
- if (mbeanServer.isRegistered(DeployerService.MBEAN_DEPLOYER_SERVICE))
- mbeanServer.unregisterMBean(DeployerService.MBEAN_DEPLOYER_SERVICE);
+ if (mbeanServer.isRegistered(DeploymentService.MBEAN_DEPLOYER_SERVICE))
+ mbeanServer.unregisterMBean(DeploymentService.MBEAN_DEPLOYER_SERVICE);
}
catch (JMException ex)
{
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -27,43 +27,43 @@
import java.util.HashSet;
import java.util.Set;
-import org.jboss.osgi.deployment.BundleDeployment;
-import org.jboss.osgi.deployment.DeployerService;
+import org.jboss.osgi.deployment.Deployment;
+import org.jboss.osgi.deployment.DeploymentService;
import org.jboss.osgi.deployment.DeploymentRegistryService;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Version;
/**
- * A {@link DeployerService} that installs/uninstalls the bundles directly on the OSGi framework without going through the MC registered deployers.
+ * A {@link DeploymentService} that installs/uninstalls the bundles directly on the OSGi framework without going through the MC registered deployers.
*
* @author thomas.diesler at jboss.com
* @since 27-May-2009
*/
public class DeploymentRegistryServiceImpl implements DeploymentRegistryService
{
- private Set<BundleDeployment> deployments = new HashSet<BundleDeployment>();
+ private Set<Deployment> deployments = new HashSet<Deployment>();
public DeploymentRegistryServiceImpl(BundleContext context)
{
}
- public void registerBundleDeployment(BundleDeployment dep)
+ public void registerBundleDeployment(Deployment dep)
{
deployments.add(dep);
}
- public void unregisterBundleDeployment(BundleDeployment dep)
+ public void unregisterBundleDeployment(Deployment dep)
{
deployments.remove(dep);
}
- public BundleDeployment getBundleDeployment(String symbolicName, Version version)
+ public Deployment getBundleDeployment(String symbolicName, Version version)
{
if (symbolicName == null)
throw new IllegalArgumentException("Cannot obtain bundle deployment for null symbolic name");
- BundleDeployment dep = null;
- for (BundleDeployment auxDep : deployments)
+ Deployment dep = null;
+ for (Deployment auxDep : deployments)
{
String auxName = auxDep.getSymbolicName();
String auxVersion = auxDep.getVersion();
@@ -77,13 +77,13 @@
return dep;
}
- public BundleDeployment getBundleDeployment(URL url)
+ public Deployment getBundleDeployment(URL url)
{
if (url == null)
throw new IllegalArgumentException("Cannot obtain bundle deployment for: null");
- BundleDeployment dep = null;
- for (BundleDeployment auxDep : deployments)
+ Deployment dep = null;
+ for (Deployment auxDep : deployments)
{
if (url.equals(auxDep.getLocation()))
{
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -30,9 +30,9 @@
import java.util.Map;
import java.util.Map.Entry;
-import org.jboss.osgi.deployment.BundleDeployment;
-import org.jboss.osgi.deployment.BundleDeploymentFactory;
-import org.jboss.osgi.deployment.DeployerService;
+import org.jboss.osgi.deployment.Deployment;
+import org.jboss.osgi.deployment.DeploymentService;
+import org.jboss.osgi.deployment.DeploymentServiceBase;
import org.jboss.osgi.deployment.DeploymentRegistryService;
import org.jboss.osgi.spi.logging.ExportedPackageHelper;
import org.jboss.osgi.spi.management.ManagedBundleService;
@@ -48,12 +48,12 @@
import org.slf4j.LoggerFactory;
/**
- * A {@link DeployerService} that installs/uninstalls the bundles directly on the OSGi framework without going through the MC registered deployers.
+ * A {@link DeploymentService} that installs/uninstalls the bundles directly on the OSGi framework without going through the MC registered deployers.
*
* @author thomas.diesler at jboss.com
* @since 27-May-2009
*/
-public class SystemDeployerService implements DeployerService
+public class SystemDeployerService extends DeploymentServiceBase
{
// Provide logging
private Logger log = LoggerFactory.getLogger(SystemDeployerService.class);
@@ -67,14 +67,14 @@
this.context = context;
}
- public void deploy(BundleDeployment[] depArr) throws BundleException
+ public void deploy(Deployment[] depArr) throws BundleException
{
DeploymentRegistryService registry = getDeploymentRegistry();
List<Bundle> resolvableBundles = new ArrayList<Bundle>();
- Map<BundleDeployment, Bundle> bundleMap = new HashMap<BundleDeployment, Bundle>();
+ Map<Deployment, Bundle> bundleMap = new HashMap<Deployment, Bundle>();
- for (BundleDeployment dep : depArr)
+ for (Deployment dep : depArr)
{
try
{
@@ -107,9 +107,9 @@
}
// Start the installed bundles
- for (Entry<BundleDeployment, Bundle> entry : bundleMap.entrySet())
+ for (Entry<Deployment, Bundle> entry : bundleMap.entrySet())
{
- BundleDeployment dep = entry.getKey();
+ Deployment dep = entry.getKey();
Bundle bundle = entry.getValue();
StartLevel startLevel = getStartLevel();
@@ -146,11 +146,11 @@
}
}
- public void undeploy(BundleDeployment[] depArr) throws BundleException
+ public void undeploy(Deployment[] depArr) throws BundleException
{
DeploymentRegistryService registry = getDeploymentRegistry();
- for (BundleDeployment dep : depArr)
+ for (Deployment dep : depArr)
{
Bundle bundle = getBundle(dep);
if (bundle != null)
@@ -170,17 +170,17 @@
public void deploy(URL url) throws BundleException
{
- BundleDeployment dep = BundleDeploymentFactory.createBundleDeployment(url);
- deploy(new BundleDeployment[] { dep });
+ Deployment dep = createDeployment(url.toExternalForm());
+ deploy(new Deployment[] { dep });
}
public boolean undeploy(URL url) throws BundleException
{
DeploymentRegistryService registry = getDeploymentRegistry();
- BundleDeployment dep = registry.getBundleDeployment(url);
+ Deployment dep = registry.getBundleDeployment(url);
if (dep != null)
{
- undeploy(new BundleDeployment[] { dep });
+ undeploy(new Deployment[] { dep });
return true;
}
else
@@ -190,7 +190,7 @@
}
}
- private Bundle getBundle(BundleDeployment dep)
+ private Bundle getBundle(Deployment dep)
{
String symbolicName = dep.getSymbolicName();
Version version = Version.parseVersion(dep.getVersion());
Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -85,6 +85,8 @@
allPackages.add("javax.xml.transform.sax");
allPackages.add("javax.xml.transform.stream");
+ allPackages.add("org.jboss.osgi.microcontainer");
+
allPackages.add("org.w3c.dom");
allPackages.add("org.w3c.dom.bootstrap");
allPackages.add("org.w3c.dom.ls");
@@ -96,7 +98,7 @@
allPackages.add("org.xml.sax");
allPackages.add("org.xml.sax.ext");
allPackages.add("org.xml.sax.helpers");
-
+
allPackages.add("org.osgi.framework");
allPackages.add("org.osgi.framework.launch");
allPackages.add("org.osgi.service.startlevel");
Added: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.microcontainer;
+
+//$Id$
+
+import org.jboss.osgi.spi.capability.Capability;
+import org.jboss.osgi.spi.capability.CompendiumCapability;
+import org.jboss.osgi.spi.service.MicrocontainerService;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+
+/**
+ * Adds the Microcontainer capability to the {@link OSGiRuntime}
+ * under test.
+ *
+ * This implementation does nothing because the JBossMC based framework
+ * does support microcontainer natively.
+ *
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 05-May-2009
+ */
+public class MicrocontainerCapability extends Capability
+{
+ public MicrocontainerCapability()
+ {
+ super(MicrocontainerService.class.getName());
+
+ addDependency(new CompendiumCapability());
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-10-16 13:34:54 UTC (rev 95035)
@@ -19,6 +19,7 @@
<include>*:jboss-osgi-blueprint:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-common-core:jar</include>
+ <include>*:jboss-osgi-deployment:jar</include>
<include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -29,7 +29,7 @@
import org.jboss.osgi.jbossxb.XMLBindingCapability;
import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.jndi.JNDICapability;
-import org.jboss.osgi.spi.capability.MicrocontainerCapability;
+import org.jboss.osgi.microcontainer.MicrocontainerCapability;
import org.jboss.osgi.spi.management.MBeanProxy;
import org.jboss.osgi.spi.testing.OSGiBundle;
import org.jboss.osgi.spi.testing.OSGiRuntime;
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-10-16 13:34:54 UTC (rev 95035)
@@ -44,4 +44,4 @@
# Bundles that need to be started automatically
org.jboss.osgi.spi.framework.autoStart=\
file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-common.jar
+ file://${test.archive.directory}/bundles/jboss-osgi-common.jar
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2009-10-16 13:34:54 UTC (rev 95035)
@@ -19,6 +19,7 @@
<include>*:jboss-osgi-blueprint:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-common-core:jar</include>
+ <include>*:jboss-osgi-deployment:jar</include>
<include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -28,7 +28,7 @@
import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.jndi.JNDICapability;
-import org.jboss.osgi.spi.capability.MicrocontainerCapability;
+import org.jboss.osgi.microcontainer.MicrocontainerCapability;
import org.jboss.osgi.spi.management.MBeanProxy;
import org.jboss.osgi.spi.management.MBeanProxyException;
import org.jboss.osgi.spi.testing.OSGiBundle;
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java 2009-10-16 13:34:54 UTC (rev 95035)
@@ -23,7 +23,7 @@
//$Id$
-import static org.jboss.osgi.deployment.DeployerService.MBEAN_DEPLOYER_SERVICE;
+import static org.jboss.osgi.deployment.DeploymentService.MBEAN_DEPLOYER_SERVICE;
import static org.jboss.osgi.spi.management.ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK;
import static org.jboss.osgi.spi.management.MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE;
import static org.jboss.test.osgi.service.microcontainer.bundleB.SomeBeanMBean.MBEAN_NAME;
@@ -36,11 +36,11 @@
import javax.management.ObjectName;
-import org.jboss.osgi.deployment.DeployerService;
+import org.jboss.osgi.deployment.DeploymentService;
import org.jboss.osgi.jbossxb.XMLBindingCapability;
import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.jndi.JNDICapability;
-import org.jboss.osgi.spi.capability.MicrocontainerCapability;
+import org.jboss.osgi.microcontainer.MicrocontainerCapability;
import org.jboss.osgi.spi.management.MBeanProxy;
import org.jboss.osgi.spi.management.ManagedFrameworkMBean;
import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
@@ -92,12 +92,12 @@
}
/**
- * Test whether a bundle can be deployed through the {@link DeployerService}
+ * Test whether a bundle can be deployed through the {@link DeploymentService}
*/
@Test
public void testBundleDeployment() throws Exception
{
- DeployerService deployer = MBeanProxy.get(DeployerService.class, MBEAN_DEPLOYER_SERVICE, runtime.getMBeanServer());
+ DeploymentService deployer = MBeanProxy.get(DeploymentService.class, MBEAN_DEPLOYER_SERVICE, runtime.getMBeanServer());
deployer.deploy(getTestArchiveURL("service/mcservice-bundleA.jar"));
ManagedFrameworkMBean frameworkMBean = MBeanProxy.get(ManagedFrameworkMBean.class, MBEAN_MANAGED_FRAMEWORK, runtime.getMBeanServer());
@@ -108,13 +108,13 @@
}
/**
- * Test whether a bundle that contains beans can be deployed through the {@link DeployerService}
+ * Test whether a bundle that contains beans can be deployed through the {@link DeploymentService}
*/
@Test
public void testBeansDeployment() throws Exception
{
MicrocontainerServiceMBean mcService = MBeanProxy.get(MicrocontainerServiceMBean.class, MBEAN_MICROCONTAINER_SERVICE, runtime.getMBeanServer());
- DeployerService deployer = MBeanProxy.get(DeployerService.class, MBEAN_DEPLOYER_SERVICE, runtime.getMBeanServer());
+ DeploymentService deployer = MBeanProxy.get(DeploymentService.class, MBEAN_DEPLOYER_SERVICE, runtime.getMBeanServer());
deployer.deploy(getTestArchiveURL("service/mcservice-bundleB.jar"));
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-10-16 13:18:32 UTC (rev 95034)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-10-16 13:34:54 UTC (rev 95035)
@@ -160,8 +160,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
More information about the jboss-cvs-commits
mailing list