[jboss-cvs] JBossAS SVN: r94643 - in projects/jboss-osgi: projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Oct 10 17:43:49 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-10 17:43:48 -0400 (Sat, 10 Oct 2009)
New Revision: 94643
Added:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/OSGiConstants.java
Removed:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/Constants.java
Modified:
projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java
projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedFramework.java
projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeployersWrapper.java
projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java
Log:
Mark osgi deplyments with bundle symbolic name in deployment unit
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-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -23,7 +23,7 @@
//$Id$
-import static org.jboss.osgi.spi.Constants.OSGI_HOME;
+import static org.jboss.osgi.spi.OSGiConstants.OSGI_HOME;
import java.io.File;
import java.net.MalformedURLException;
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-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -48,7 +48,7 @@
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.osgi.spi.Constants;
+import org.jboss.osgi.spi.OSGiConstants;
import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
import org.jboss.osgi.spi.service.DeployerService;
import org.jboss.osgi.spi.service.DeploymentRegistryService;
@@ -159,8 +159,8 @@
depList.add(deployment);
MutableAttachments att = (MutableAttachments)deployment.getPredeterminedManagedObjects();
- att.addAttachment(Constants.PROPERTY_START_LEVEL, new Integer(dep.getStartLevel()));
- att.addAttachment(Constants.PROPERTY_AUTO_START, new Boolean(dep.isAutoStart()));
+ att.addAttachment(OSGiConstants.PROPERTY_START_LEVEL, new Integer(dep.getStartLevel()));
+ att.addAttachment(OSGiConstants.PROPERTY_AUTO_START, new Boolean(dep.isAutoStart()));
mainDeployer.addDeployment(deployment);
}
Modified: projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml 2009-10-10 21:43:48 UTC (rev 94643)
@@ -31,7 +31,7 @@
<properties>
<version.jboss.deployers>2.0.8.GA</version.jboss.deployers>
- <version.jboss.osgi.spi>1.0.1</version.jboss.osgi.spi>
+ <version.jboss.osgi.spi>1.0.2-SNAPSHOT</version.jboss.osgi.spi>
<version.osgi>r4v42</version.osgi>
</properties>
Modified: projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -31,7 +31,7 @@
import org.jboss.deployers.structure.spi.DeploymentUnitFilter;
import org.jboss.osgi.deployer.helpers.BundleDeploymentUnitFilter;
import org.jboss.osgi.deployer.helpers.PackageAdminDependencyItem;
-import org.jboss.osgi.spi.Constants;
+import org.jboss.osgi.spi.OSGiConstants;
import org.jboss.osgi.spi.util.BundleClassLoader;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -68,7 +68,7 @@
unit.addAttachment(ClassLoaderFactory.class, factory);
// create dependency items
- String propStart = systemContext.getProperty(Constants.PROPERTY_DEFERRED_START);
+ String propStart = systemContext.getProperty(OSGiConstants.PROPERTY_DEFERRED_START);
if (Boolean.parseBoolean(propStart != null ? propStart : "true") == false)
unit.addIDependOn(new PackageAdminDependencyItem(systemContext, bundle));
Modified: projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -28,6 +28,7 @@
import org.jboss.deployers.vfs.spi.deployer.ManifestDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.osgi.spi.OSGiConstants;
import org.jboss.virtual.VirtualFile;
import org.osgi.framework.Constants;
@@ -41,31 +42,36 @@
*/
public class BundleMetaDataDeployer extends ManifestDeployer<BundleMetaData>
{
- public BundleMetaDataDeployer()
- {
- super(BundleMetaData.class);
- }
+ public BundleMetaDataDeployer()
+ {
+ super(BundleMetaData.class);
+ }
- @Override
- protected BundleMetaData parse(VFSDeploymentUnit unit, VirtualFile file, BundleMetaData root) throws Exception
- {
- BundleMetaData metaData = super.parse(unit, file, root);
- if (metaData != null)
- {
- metaData.setBundleLocation(unit.getRoot().toURL());
- log.debug("Bundle-SymbolicName: " + metaData.getSymbolicName() + " in " + file);
- }
- return metaData;
- }
-
- @Override
- protected BundleMetaData createMetaData(Manifest manifest) throws Exception
- {
- Attributes attribs = manifest.getMainAttributes();
- String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
- if (symbolicName != null)
- return new BundleMetaData(symbolicName);
+ @Override
+ protected BundleMetaData parse(VFSDeploymentUnit unit, VirtualFile file, BundleMetaData root) throws Exception
+ {
+ BundleMetaData metaData = super.parse(unit, file, root);
+ if (metaData != null)
+ {
+ String symbolicName = metaData.getSymbolicName();
+ log.debug("Bundle-SymbolicName: " + symbolicName + " in " + file);
- return null;
- }
+ metaData.setBundleLocation(unit.getRoot().toURL());
+
+ // Add a marker that this is an OSGi deployment
+ unit.addAttachment(OSGiConstants.KEY_BUNDLE_SYMBOLIC_NAME, symbolicName);
+ }
+ return metaData;
+ }
+
+ @Override
+ protected BundleMetaData createMetaData(Manifest manifest) throws Exception
+ {
+ Attributes attribs = manifest.getMainAttributes();
+ String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
+ if (symbolicName != null)
+ return new BundleMetaData(symbolicName);
+
+ return null;
+ }
}
Modified: projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -21,12 +21,12 @@
*/
package org.jboss.osgi.deployer;
-// $Id: $
+// $Id:$
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.spi.Constants;
+import org.jboss.osgi.spi.OSGiConstants;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.service.startlevel.StartLevel;
@@ -50,7 +50,7 @@
public BundleStartLevelDeployer()
{
super(Bundle.class);
- addOutput(Constants.PROPERTY_START_LEVEL);
+ addOutput(OSGiConstants.PROPERTY_START_LEVEL);
}
public void setSystemContext(BundleContext systemContext)
@@ -60,7 +60,7 @@
public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
{
- Integer propStart = unit.getAttachment(Constants.PROPERTY_START_LEVEL, Integer.class);
+ Integer propStart = unit.getAttachment(OSGiConstants.PROPERTY_START_LEVEL, Integer.class);
StartLevel startLevel = getStartLevel();
if (propStart != null && startLevel != null)
{
Modified: projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -30,7 +30,7 @@
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.spi.Constants;
+import org.jboss.osgi.spi.OSGiConstants;
import org.jboss.osgi.spi.logging.ExportedPackageHelper;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -56,7 +56,7 @@
public BundleStartStopDeployer()
{
super(Bundle.class);
- addInput(Constants.PROPERTY_START_LEVEL);
+ addInput(OSGiConstants.PROPERTY_START_LEVEL);
}
public void setSystemContext(BundleContext systemContext)
@@ -66,10 +66,10 @@
public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
{
- Boolean propAutoStart = unit.getAttachment(Constants.PROPERTY_AUTO_START, Boolean.class);
+ Boolean propAutoStart = unit.getAttachment(OSGiConstants.PROPERTY_AUTO_START, Boolean.class);
if (propAutoStart == null || Boolean.TRUE.equals(propAutoStart))
{
- String propDeferredStart = systemContext.getProperty(Constants.PROPERTY_DEFERRED_START);
+ String propDeferredStart = systemContext.getProperty(OSGiConstants.PROPERTY_DEFERRED_START);
if (Boolean.parseBoolean(propDeferredStart != null ? propDeferredStart : "true") == true)
{
deferredStart(unit, bundle);
Deleted: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/Constants.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/Constants.java 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/Constants.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -1,68 +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;
-
-//$Id$
-
-/**
- * JBossOSGi Constants
- *
- * @author thomas.diesler at jboss.com
- * @since 04-Mar-2009
- */
-public interface Constants
-{
- /** The JBossOSGi domain 'jboss.osgi' */
- String DOMAIN_NAME = "jboss.osgi";
-
- /**
- * If set to 'true' bundles can be deployed in any order. Deployed bundle will get started when their dependencies can be resolved.
- * If set to 'false' bundles must be deployed in the order that is required to start them.
- *
- * The default is 'true'
- */
- String PROPERTY_DEFERRED_START = "org.jboss.osgi.deferred.start";
-
- /**
- * If set to 'true' bundles are started automatically.
- *
- * The default is 'false'
- */
- String PROPERTY_AUTO_START = "org.jboss.osgi.auto.start";
-
- /**
- * Specifies the start level for a bundle.
- *
- * The default is '0'
- */
- String PROPERTY_START_LEVEL = "org.jboss.osgi.start.level";
-
- /**
- * The JBossOSGi runtime system property that denotes the path to the runtime
- */
- String OSGI_HOME = "osgi.home";
-
- /**
- * The JBossOSGi runtime system property that denotes the path to the active runtime profile
- */
- String OSGI_SERVER_HOME = "osgi.server.home";
-}
Copied: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/OSGiConstants.java (from rev 94498, projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/Constants.java)
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/OSGiConstants.java (rev 0)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/OSGiConstants.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -0,0 +1,74 @@
+/*
+ * 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;
+
+//$Id$
+
+/**
+ * JBossOSGi Constants
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 04-Mar-2009
+ */
+public interface OSGiConstants
+{
+ /** The JBossOSGi domain 'jboss.osgi' */
+ String DOMAIN_NAME = "jboss.osgi";
+
+ /**
+ * If set to 'true' bundles can be deployed in any order. Deployed bundle will get started when their dependencies can be resolved.
+ * If set to 'false' bundles must be deployed in the order that is required to start them.
+ *
+ * The default is 'true'
+ */
+ String PROPERTY_DEFERRED_START = "org.jboss.osgi.deferred.start";
+
+ /**
+ * If set to 'true' bundles are started automatically.
+ *
+ * The default is 'false'
+ */
+ String PROPERTY_AUTO_START = "org.jboss.osgi.auto.start";
+
+ /**
+ * Specifies the start level for a bundle.
+ *
+ * The default is '0'
+ */
+ String PROPERTY_START_LEVEL = "org.jboss.osgi.start.level";
+
+ /**
+ * The JBossOSGi runtime system property that denotes the path to the runtime
+ */
+ String OSGI_HOME = "osgi.home";
+
+ /**
+ * The JBossOSGi runtime system property that denotes the path to the active runtime profile
+ */
+ String OSGI_SERVER_HOME = "osgi.server.home";
+
+ /**
+ * A JBossOSGi deployment unit attachment key that containe the bundle's symbolic name.
+ */
+ String KEY_BUNDLE_SYMBOLIC_NAME = "org.jboss.osgi.bundle.symbolic.name";
+
+}
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -23,8 +23,8 @@
//$Id$
-import static org.jboss.osgi.spi.Constants.OSGI_HOME;
-import static org.jboss.osgi.spi.Constants.OSGI_SERVER_HOME;
+import static org.jboss.osgi.spi.OSGiConstants.OSGI_HOME;
+import static org.jboss.osgi.spi.OSGiConstants.OSGI_SERVER_HOME;
import java.io.File;
import java.io.IOException;
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedBundle.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -29,7 +29,7 @@
import javax.management.ObjectName;
-import org.jboss.osgi.spi.Constants;
+import org.jboss.osgi.spi.OSGiConstants;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
import org.osgi.framework.Version;
@@ -52,7 +52,7 @@
long id = bundle.getBundleId();
String name = bundle.getSymbolicName();
Version version = bundle.getVersion();
- this.oname = ObjectNameFactory.create(Constants.DOMAIN_NAME + ":id=" + id + ",bundle=" + name + ",version=" + version);
+ this.oname = ObjectNameFactory.create(OSGiConstants.DOMAIN_NAME + ":id=" + id + ",bundle=" + name + ",version=" + version);
}
public ObjectName getObjectName()
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedFramework.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedFramework.java 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/ManagedFramework.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -37,7 +37,7 @@
import javax.management.QueryExp;
import org.jboss.logging.Logger;
-import org.jboss.osgi.spi.Constants;
+import org.jboss.osgi.spi.OSGiConstants;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
@@ -82,7 +82,7 @@
{
ObjectName oname = null;
- ObjectName pattern = ObjectNameFactory.create(Constants.DOMAIN_NAME + ":bundle=" + symbolicName + ",*");
+ ObjectName pattern = ObjectNameFactory.create(OSGiConstants.DOMAIN_NAME + ":bundle=" + symbolicName + ",*");
Set<ObjectName> names = mbeanServer.queryNames(pattern, null);
if (names.size() > 0)
@@ -102,7 +102,7 @@
{
ObjectName oname = null;
- ObjectName pattern = ObjectNameFactory.create(Constants.DOMAIN_NAME + ":id=" + bundleId + ",*");
+ ObjectName pattern = ObjectNameFactory.create(OSGiConstants.DOMAIN_NAME + ":id=" + bundleId + ",*");
Set<ObjectName> names = mbeanServer.queryNames(pattern, null);
if (names.size() > 0)
@@ -118,7 +118,7 @@
// ObjectName pattern = ObjectNameFactory.create(Constants.DOMAIN_NAME + ":bundle=*,*");
// Set<ObjectName> names = mbeanServer.queryNames(pattern, null);
- ObjectName pattern = ObjectNameFactory.create(Constants.DOMAIN_NAME + ":*");
+ ObjectName pattern = ObjectNameFactory.create(OSGiConstants.DOMAIN_NAME + ":*");
Set<ObjectName> names = mbeanServer.queryNames(pattern, new IsBundleQueryExp());
return names;
}
Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -21,7 +21,7 @@
*/
package org.jboss.osgi.framework.bundle;
-import static org.jboss.osgi.spi.Constants.PROPERTY_AUTO_START;
+import static org.jboss.osgi.spi.OSGiConstants.PROPERTY_AUTO_START;
import java.io.File;
import java.io.FileOutputStream;
Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeployersWrapper.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeployersWrapper.java 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeployersWrapper.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -21,7 +21,7 @@
*/
package org.jboss.osgi.framework.deployers;
-import static org.jboss.osgi.spi.Constants.PROPERTY_AUTO_START;
+import static org.jboss.osgi.spi.OSGiConstants.PROPERTY_AUTO_START;
import java.util.ArrayList;
import java.util.Collection;
Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java 2009-10-10 16:18:10 UTC (rev 94642)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java 2009-10-10 21:43:48 UTC (rev 94643)
@@ -25,8 +25,11 @@
import java.util.jar.Attributes.Name;
import org.jboss.deployers.vfs.spi.deployer.ManifestDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.osgi.framework.metadata.OSGiMetaData;
import org.jboss.osgi.framework.metadata.internal.AbstractOSGiMetaData;
+import org.jboss.osgi.spi.OSGiConstants;
+import org.jboss.virtual.VirtualFile;
import org.osgi.framework.Constants;
/**
@@ -45,10 +48,25 @@
public OSGiManifestParsingDeployer()
{
super(OSGiMetaData.class);
- setTopLevelOnly(true); // REVIEW allow OSGi sub-deployments? Probably not?
+ setTopLevelOnly(true);
}
@Override
+ protected OSGiMetaData parse(VFSDeploymentUnit unit, VirtualFile file, OSGiMetaData root) throws Exception
+ {
+ OSGiMetaData metaData = super.parse(unit, file, root);
+ if (metaData != null)
+ {
+ String symbolicName = metaData.getBundleSymbolicName();
+ log.debug("Bundle-SymbolicName: " + symbolicName + " in " + file);
+
+ // Add a marker that this is an OSGi deployment
+ unit.addAttachment(OSGiConstants.KEY_BUNDLE_SYMBOLIC_NAME, symbolicName);
+ }
+ return metaData;
+ }
+
+ @Override
protected OSGiMetaData createMetaData(Manifest manifest) throws Exception
{
// To be a true OSGi bundle it must have a bundle symbolic name in the manfiest
More information about the jboss-cvs-commits
mailing list