[jboss-cvs] JBossAS SVN: r95036 - in projects/jboss-osgi/projects: bundles/hotdeploy/trunk and 12 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 16 09:37:49 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-16 09:37:48 -0400 (Fri, 16 Oct 2009)
New Revision: 95036
Added:
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
Removed:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/MicrocontainerCapability.java
Modified:
projects/jboss-osgi/projects/bundles/common/trunk/pom.xml
projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml
projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java
projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
projects/jboss-osgi/projects/parent/trunk/pom.xml
projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java
projects/jboss-osgi/projects/runtime/jbossas/trunk/pom.xml
projects/jboss-osgi/projects/runtime/jbossas/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/MicrocontainerServiceBean.java
projects/jboss-osgi/projects/spi/trunk/pom.xml
Log:
[JBOSGI-183] Initial implementation of OSGi Deployers
Cleanup initial deployment API
Modified: projects/jboss-osgi/projects/bundles/common/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/common/trunk/pom.xml 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/bundles/common/trunk/pom.xml 2009-10-16 13:37:48 UTC (rev 95036)
@@ -27,7 +27,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-parent</artifactId>
- <version>1.0.3</version>
+ <version>1.0.4-SNAPSHOT</version>
</parent>
<!-- SCM -->
@@ -40,7 +40,6 @@
<!-- Properties -->
<properties>
<version.jboss.osgi.spi>1.0.3-SNAPSHOT</version.jboss.osgi.spi>
- <version.slf4j>1.5.8</version.slf4j>
<version.osgi>r4v42</version.osgi>
</properties>
@@ -54,12 +53,10 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>${version.slf4j}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>${version.slf4j}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml 2009-10-16 13:37:48 UTC (rev 95036)
@@ -27,7 +27,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 -->
Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java 2009-10-16 13:37:48 UTC (rev 95036)
@@ -34,10 +34,9 @@
import java.util.List;
import java.util.Map;
-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.DeploymentScannerService;
+import org.jboss.osgi.deployment.DeploymentService;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
@@ -63,18 +62,18 @@
private long beforeStart;
private long lastChange;
- private DeployerService deployer;
+ private DeploymentService deployer;
private ScannerThread scannerThread;
- private List<BundleDeployment> lastScan = new ArrayList<BundleDeployment>();
- private Map<String, BundleDeployment> deploymentCache = new HashMap<String, BundleDeployment>();
+ private List<Deployment> lastScan = new ArrayList<Deployment>();
+ private Map<String, Deployment> deploymentCache = new HashMap<String, Deployment>();
public DeploymentScannerImpl(BundleContext context)
{
this.context = context;
// Get the DeployerService
- ServiceReference sref = context.getServiceReference(DeployerService.class.getName());
- deployer = (DeployerService)context.getService(sref);
+ ServiceReference sref = context.getServiceReference(DeploymentService.class.getName());
+ deployer = (DeploymentService)context.getService(sref);
initScanner(context);
}
@@ -124,7 +123,7 @@
public void scan()
{
- List<BundleDeployment> currScan = Arrays.asList(getBundleDeployments());
+ List<Deployment> currScan = Arrays.asList(getBundleDeployments());
logBundleDeployments("Current Scan", currScan);
@@ -142,24 +141,24 @@
log.info("JBossOSGi Runtime started in " + diff + "sec");
}
- private void logBundleDeployments(String message, List<BundleDeployment> bundleDeps)
+ private void logBundleDeployments(String message, List<Deployment> bundleDeps)
{
if (log.isTraceEnabled())
{
log.trace(message);
- for (BundleDeployment dep : bundleDeps)
+ for (Deployment dep : bundleDeps)
{
log.trace(" " + dep);
}
}
}
- private int processOldDeployments(List<BundleDeployment> currScan)
+ private int processOldDeployments(List<Deployment> currScan)
{
- List<BundleDeployment> diff = new ArrayList<BundleDeployment>();
+ List<Deployment> diff = new ArrayList<Deployment>();
// Detect OLD bundles that are not in the current scan
- for (BundleDeployment dep : lastScan)
+ for (Deployment dep : lastScan)
{
if (currScan.contains(dep) == false)
{
@@ -185,7 +184,7 @@
// Undeploy the bundles through the DeployerService
try
{
- BundleDeployment[] depArr = diff.toArray(new BundleDeployment[diff.size()]);
+ Deployment[] depArr = diff.toArray(new Deployment[diff.size()]);
deployer.undeploy(depArr);
}
catch (Exception ex)
@@ -196,12 +195,12 @@
return diff.size();
}
- private int processNewDeployments(List<BundleDeployment> currScan)
+ private int processNewDeployments(List<Deployment> currScan)
{
- List<BundleDeployment> diff = new ArrayList<BundleDeployment>();
+ List<Deployment> diff = new ArrayList<Deployment>();
// Detect NEW bundles that are not in the last scan
- for (BundleDeployment dep : currScan)
+ for (Deployment dep : currScan)
{
if (lastScan.contains(dep) == false && getBundle(dep) == null)
{
@@ -216,7 +215,7 @@
{
try
{
- BundleDeployment[] depArr = diff.toArray(new BundleDeployment[diff.size()]);
+ Deployment[] depArr = diff.toArray(new Deployment[diff.size()]);
deployer.deploy(depArr);
}
catch (Exception ex)
@@ -228,9 +227,9 @@
return diff.size();
}
- public BundleDeployment[] getBundleDeployments()
+ public Deployment[] getBundleDeployments()
{
- List<BundleDeployment> bundles = new ArrayList<BundleDeployment>();
+ List<Deployment> bundles = new ArrayList<Deployment>();
File[] listFiles = scanLocation.listFiles();
if (listFiles == null)
@@ -241,13 +240,13 @@
for (File file : listFiles)
{
URL bundleURL = toURL(file);
- BundleDeployment dep = deploymentCache.get(bundleURL.toExternalForm());
+ Deployment dep = deploymentCache.get(bundleURL.toExternalForm());
if (dep == null)
{
try
{
// hot-deploy bundles are started automatically
- dep = BundleDeploymentFactory.createBundleDeployment(bundleURL);
+ dep = deployer.createDeployment(bundleURL.toExternalForm());
dep.setAutoStart(true);
deploymentCache.put(bundleURL.toExternalForm(), dep);
@@ -261,7 +260,7 @@
}
}
- BundleDeployment[] arr = new BundleDeployment[bundles.size()];
+ Deployment[] arr = new Deployment[bundles.size()];
return bundles.toArray(arr);
}
@@ -301,7 +300,7 @@
scanLocation = scanFile;
}
- private Bundle getBundle(BundleDeployment dep)
+ private Bundle getBundle(Deployment dep)
{
String symbolicName = dep.getSymbolicName();
Version version = Version.parseVersion(dep.getVersion());
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-10-16 13:37:48 UTC (rev 95036)
@@ -27,7 +27,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-parent</artifactId>
- <version>1.0.3</version>
+ <version>1.0.4-SNAPSHOT</version>
</parent>
<!-- Properties -->
@@ -101,6 +101,9 @@
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
<Bundle-Activator>org.jboss.osgi.microcontainer.internal.MicrocontainerServiceActivator</Bundle-Activator>
<Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
+ <Export-Package>
+ org.jboss.osgi.microcontainer;version=${version}
+ </Export-Package>
<Private-Package>
org.jboss.osgi.microcontainer.integration,
org.jboss.osgi.microcontainer.internal
Copied: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java (from rev 95006, projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/MicrocontainerCapability.java)
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java (rev 0)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java 2009-10-16 13:37:48 UTC (rev 95036)
@@ -0,0 +1,54 @@
+/*
+ * 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.deployment.DeploymentServiceCapability;
+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.
+ *
+ * It is ignored if the {@link MicrocontainerService} is already registered.
+ *
+ * Installed bundles: jboss-osgi-microcontainer.jar
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 05-May-2009
+ */
+public class MicrocontainerCapability extends Capability
+{
+ public MicrocontainerCapability()
+ {
+ super(MicrocontainerService.class.getName());
+
+ addDependency(new CompendiumCapability());
+ addDependency(new DeploymentServiceCapability());
+
+ addBundle("bundles/jboss-osgi-microcontainer.jar");
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java 2009-10-16 13:37:48 UTC (rev 95036)
@@ -40,7 +40,6 @@
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.ControllerContextActions;
import org.jboss.dependency.spi.ControllerState;
-import org.jboss.deployers.client.spi.Deployment;
import org.jboss.deployers.client.spi.main.MainDeployer;
import org.jboss.deployers.spi.attachments.MutableAttachments;
import org.jboss.deployers.vfs.spi.client.VFSDeployment;
@@ -48,9 +47,8 @@
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
-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.DeploymentServiceBase;
import org.jboss.osgi.deployment.DeploymentRegistryService;
import org.jboss.osgi.spi.OSGiConstants;
import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
@@ -67,7 +65,7 @@
* @author thomas.diesler at jboss.com
* @since 23-Jan-2009
*/
-public abstract class AbstractMicrocontainerService implements DeployerService, MicrocontainerService
+public abstract class AbstractMicrocontainerService extends DeploymentServiceBase implements MicrocontainerService
{
private VFSDeploymentFactory deploymentFactory = VFSDeploymentFactory.getInstance();
private ServiceTracker registryTracker;
@@ -111,14 +109,14 @@
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)
{
logWarning("Package not deployed: " + url);
@@ -139,18 +137,18 @@
}
}
- public void deploy(BundleDeployment[] depArr) throws BundleException
+ public void deploy(Deployment[] depArr) throws BundleException
{
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
try
{
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
- List<Deployment> depList = new ArrayList<Deployment>();
+ List<VFSDeployment> depList = new ArrayList<VFSDeployment>();
MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
DeploymentRegistryService registry = getDeploymentRegistry();
- for (BundleDeployment dep : depArr)
+ for (Deployment dep : depArr)
{
VirtualFile file = VFS.createNewRoot(dep.getLocation());
VFSDeployment deployment = deploymentFactory.createVFSDeployment(file);
@@ -169,7 +167,7 @@
mainDeployer.process();
// Check for completeness
- Deployment[] deploymentArr = depList.toArray(new Deployment[depList.size()]);
+ VFSDeployment[] deploymentArr = depList.toArray(new VFSDeployment[depList.size()]);
mainDeployer.checkComplete(deploymentArr);
}
catch (RuntimeException rte)
@@ -186,14 +184,14 @@
}
}
- public void undeploy(BundleDeployment[] depArr) throws BundleException
+ public void undeploy(Deployment[] depArr) throws BundleException
{
try
{
MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
DeploymentRegistryService registry = getDeploymentRegistry();
- for (BundleDeployment dep : depArr)
+ for (Deployment dep : depArr)
{
registry.unregisterBundleDeployment(dep);
mainDeployer.removeDeployment((String)dep.getMetadata());
@@ -264,7 +262,10 @@
registryTracker = new ServiceTracker(context, DeploymentRegistryService.class.getName(), null);
registryTracker.open();
}
- return (DeploymentRegistryService)registryTracker.getService();
+ DeploymentRegistryService service = (DeploymentRegistryService)registryTracker.getService();
+ if (service == null)
+ throw new IllegalStateException("Cannot obtain DeploymentRegistryService");
+ return service;
}
static class PreInstalledControllerContext extends AbstractControllerContext
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java 2009-10-16 13:37:48 UTC (rev 95036)
@@ -35,7 +35,7 @@
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.osgi.deployment.DeployerService;
+import org.jboss.osgi.deployment.DeploymentService;
import org.jboss.osgi.jbossxb.XMLBindingService;
import org.jboss.osgi.microcontainer.integration.AbstractMicrocontainerService;
import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
@@ -49,7 +49,7 @@
import org.osgi.util.tracker.ServiceTracker;
/**
- * An implementation of the {@link DeployerService} and {@link MicrocontainerService}
+ * An implementation of the {@link DeploymentService} and {@link MicrocontainerService}
* which is installed as a bundle
*
* @author thomas.diesler at jboss.com
@@ -148,7 +148,7 @@
Properties props = new Properties();
props.setProperty("provider", "microcontainer");
log.log(LogService.LOG_DEBUG, "Register DeployerService");
- context.registerService(DeployerService.class.getName(), mcServiceImpl, props);
+ context.registerService(DeploymentService.class.getName(), mcServiceImpl, props);
// Register the MicrocontainerServiceMBean
registerMicrocontainerServiceMBean(mbeanServer);
Modified: projects/jboss-osgi/projects/parent/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/parent/trunk/pom.xml 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/parent/trunk/pom.xml 2009-10-16 13:37:48 UTC (rev 95036)
@@ -22,6 +22,7 @@
<properties>
<version.jboss.logging>2.0.5.GA</version.jboss.logging>
<version.junit>4.6</version.junit>
+ <version.slf4j>1.5.8</version.slf4j>
</properties>
<!-- DependencyManagement -->
@@ -33,13 +34,23 @@
<version>${version.jboss.logging}</version>
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${version.slf4j}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${version.slf4j}</version>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${version.junit}</version>
</dependency>
</dependencies>
</dependencyManagement>
-
+
<!-- Build -->
<build>
<plugins>
@@ -173,15 +184,8 @@
<!-- DistributionManagement -->
<distributionManagement>
<!--
- Add this to your ~/.m2/settings.xml
- <servers>
- <server>
- <id>jbmuc.dyndns.org</id>
- <username>yourname</username>
- <privateKey>/home/yourname/.ssh/id_rsa</privateKey>
- <passphrase>yourpass</passphrase>
- </server>
- </servers>
+ Add this to your ~/.m2/settings.xml <servers> <server> <id>jbmuc.dyndns.org</id> <username>yourname</username> <privateKey>/home/yourname/.ssh/id_rsa</privateKey>
+ <passphrase>yourpass</passphrase> </server> </servers>
-->
<repository>
<id>repository.jboss.org</id>
@@ -201,9 +205,8 @@
<url>scp://jbmuc.dyndns.org/var/www/html/jboss-osgi-${version.jboss.osgi}</url>
</site>
<!--
- To copy the userguide run:
- scp -r docbook/target/docbook/publish/en-US/* jbmuc.dyndns.org:/var/www/html/jboss-osgi-${version.jboss.osgi}/userguide/
- -->
+ To copy the userguide run: scp -r docbook/target/docbook/publish/en-US/* jbmuc.dyndns.org:/var/www/html/jboss-osgi-${version.jboss.osgi}/userguide/
+ -->
</distributionManagement>
<!-- Reporting -->
@@ -221,7 +224,7 @@
<!-- Profiles -->
<profiles>
-
+
<!--
Name: no-jboss-bind-address
Desc: Set the default jboss.bind.address
@@ -237,7 +240,7 @@
<jboss.bind.address>localhost</jboss.bind.address>
</properties>
</profile>
-
+
</profiles>
-
+
</project>
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml 2009-10-16 13:37:48 UTC (rev 95036)
@@ -26,7 +26,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 -->
@@ -60,8 +60,8 @@
<version>${version.felix.framework}</version>
</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>
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java 2009-10-16 13:37:48 UTC (rev 95036)
@@ -26,10 +26,9 @@
import java.net.URL;
import org.jboss.logging.Logger;
-import org.jboss.osgi.deployment.BundleDeployment;
-import org.jboss.osgi.deployment.BundleDeploymentFactory;
-import org.jboss.osgi.deployment.DeployerService;
+import org.jboss.osgi.deployment.DeploymentService;
import org.jboss.osgi.spi.framework.BundleContextWrapper;
+import org.jboss.osgi.spi.util.BundleInfo;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
@@ -57,17 +56,17 @@
@Override
public Bundle installBundle(String location) throws BundleException
{
- BundleDeployment dep = BundleDeploymentFactory.createBundleDeployment(location);
- URL bundleURL = dep.getLocation();
- String symbolicName = dep.getSymbolicName();
- Version version = Version.parseVersion(dep.getVersion());
+ BundleInfo info = BundleInfo.createBundleInfo(location);
+ URL bundleURL = info.getLocation();
+ String symbolicName = info.getSymbolicName();
+ Version version = Version.parseVersion(info.getVersion());
Bundle bundle;
- ServiceReference sref = context.getServiceReference(DeployerService.class.getName());
+ ServiceReference sref = context.getServiceReference(DeploymentService.class.getName());
if (sref != null)
{
- DeployerService service = (DeployerService)context.getService(sref);
+ DeploymentService service = (DeploymentService)context.getService(sref);
service.deploy(bundleURL);
bundle = getBundle(symbolicName, version, true);
}
Modified: projects/jboss-osgi/projects/runtime/jbossas/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/jbossas/trunk/pom.xml 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/runtime/jbossas/trunk/pom.xml 2009-10-16 13:37:48 UTC (rev 95036)
@@ -26,11 +26,11 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-parent</artifactId>
- <version>1.0.2</version>
+ <version>1.0.4-SNAPSHOT</version>
</parent>
<properties>
- <version.jboss.osgi.microcontainer>1.0.1</version.jboss.osgi.microcontainer>
+ <version.jboss.osgi.microcontainer>1.0.3-SNAPSHOT</version.jboss.osgi.microcontainer>
<version.osgi>r4v42</version.osgi>
</properties>
Modified: projects/jboss-osgi/projects/runtime/jbossas/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/MicrocontainerServiceBean.java
===================================================================
--- projects/jboss-osgi/projects/runtime/jbossas/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/MicrocontainerServiceBean.java 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/runtime/jbossas/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/MicrocontainerServiceBean.java 2009-10-16 13:37:48 UTC (rev 95036)
@@ -31,13 +31,13 @@
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.logging.Logger;
+import org.jboss.osgi.deployment.DeploymentService;
import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
-import org.jboss.osgi.spi.service.DeployerService;
import org.jboss.osgi.spi.service.MicrocontainerService;
import org.osgi.framework.BundleContext;
/**
- * An implementation of the {@link DeployerService} and {@link MicrocontainerService}
+ * An implementation of the {@link DeploymentService} and {@link MicrocontainerService}
* which is installed as MC bean in jbossas.
*
* @author thomas.diesler at jboss.com
@@ -102,7 +102,7 @@
// Register the DeployerService
Properties props = new Properties();
props.setProperty("provider", "microcontainer");
- bundleContext.registerService(DeployerService.class.getName(), this, props);
+ bundleContext.registerService(DeploymentService.class.getName(), this, props);
log.debug("DeployerService registered");
// Register the MicrocontainerServiceMBean
Modified: projects/jboss-osgi/projects/spi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/pom.xml 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/spi/trunk/pom.xml 2009-10-16 13:37:48 UTC (rev 95036)
@@ -26,7 +26,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 -->
@@ -40,7 +40,6 @@
<properties>
<version.args4j>2.0.12</version.args4j>
<version.jboss.vfs>2.1.3.SP1</version.jboss.vfs>
- <version.slf4j>1.5.8</version.slf4j>
<version.osgi>r4v42</version.osgi>
</properties>
@@ -56,12 +55,11 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>${version.slf4j}</version>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
- <version>${version.jboss.vfs}</version>
+ <version>${version.jboss.vfs}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Deleted: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/MicrocontainerCapability.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/MicrocontainerCapability.java 2009-10-16 13:34:54 UTC (rev 95035)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/MicrocontainerCapability.java 2009-10-16 13:37:48 UTC (rev 95036)
@@ -1,50 +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.spi.capability;
-
-//$Id$
-
-import org.jboss.osgi.spi.service.MicrocontainerService;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
-
-/**
- * Adds the Microcontainer capability to the {@link OSGiRuntime}
- * under test.
- *
- * It is ignored if the {@link MicrocontainerService} is already registered.
- *
- * Installed bundles: jboss-osgi-microcontainer.jar
- *
- * @author thomas.diesler at jboss.com
- * @since 05-May-2009
- */
-public class MicrocontainerCapability extends Capability
-{
- public MicrocontainerCapability()
- {
- super(MicrocontainerService.class.getName());
-
- addDependency(new CompendiumCapability());
-
- addBundle("bundles/jboss-osgi-microcontainer.jar");
- }
-}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list