[jboss-osgi-commits] JBoss-OSGI SVN: r100995 - in projects/jboss-osgi: projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin and 13 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Mon Feb 15 16:18:32 EST 2010
Author: thomas.diesler at jboss.com
Date: 2010-02-15 16:18:31 -0500 (Mon, 15 Feb 2010)
New Revision: 100995
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/AbstractExportedPackage.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/CapabilityExportedPackage.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/PackageAdminImpl.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/SystemExportedPackage.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/enterprise/
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/enterprise/jmx/
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/enterprise/jmx/JMXEnterpriseTestCase.java
Removed:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/PackageAdminImpl.java
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Initial Aries JMX integration
Added: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/AbstractExportedPackage.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/AbstractExportedPackage.java (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/AbstractExportedPackage.java 2010-02-15 21:18:31 UTC (rev 100995)
@@ -0,0 +1,94 @@
+/*
+ * 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.framework.packageadmin;
+
+//$Id: StartLevelImpl.java 93118 2009-09-02 08:24:44Z thomas.diesler at jboss.com $
+
+import org.jboss.logging.Logger;
+import org.jboss.osgi.framework.bundle.AbstractBundleState;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Version;
+import org.osgi.service.packageadmin.ExportedPackage;
+
+/**
+ * An implementation of the {@link ExportedPackage}.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 15-Feb-2010
+ */
+abstract class AbstractExportedPackage implements ExportedPackage
+{
+ /** The log */
+ private static final Logger log = Logger.getLogger(AbstractExportedPackage.class);
+
+ private AbstractBundleState bundle;
+ private String packageName;
+ private Version version;
+
+ AbstractExportedPackage(AbstractBundleState bundle, String packageName)
+ {
+ this.bundle = bundle;
+ this.packageName = packageName;
+ this.version = Version.emptyVersion;
+ }
+
+ void setVersion(Version version)
+ {
+ this.version = version;
+ }
+
+ public Bundle getExportingBundle()
+ {
+ return bundle;
+ }
+
+ public Bundle[] getImportingBundles()
+ {
+ // [TODO] Not implemented getImportingBundles
+ log.info("Not implemented getImportingBundles");
+ return null;
+ }
+
+ public String getName()
+ {
+ return packageName;
+ }
+
+ public String getSpecificationVersion()
+ {
+ // [TODO] Not implemented getSpecificationVersion
+ log.info("Not implemented getSpecificationVersion");
+ return null;
+ }
+
+ public Version getVersion()
+ {
+ return version;
+ }
+
+ public boolean isRemovalPending()
+ {
+ // [TODO] Not implemented isRemovalPending
+ log.info("Not implemented isRemovalPending");
+ return false;
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/CapabilityExportedPackage.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/CapabilityExportedPackage.java (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/CapabilityExportedPackage.java 2010-02-15 21:18:31 UTC (rev 100995)
@@ -0,0 +1,44 @@
+/*
+ * 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.framework.packageadmin;
+
+//$Id: StartLevelImpl.java 93118 2009-09-02 08:24:44Z thomas.diesler at jboss.com $
+
+import org.jboss.classloading.plugins.metadata.PackageCapability;
+import org.jboss.osgi.framework.bundle.AbstractBundleState;
+import org.osgi.framework.Version;
+import org.osgi.service.packageadmin.ExportedPackage;
+
+/**
+ * An implementation of the {@link ExportedPackage} that is backed by a {@link PackageCapability}.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 15-Feb-2010
+ */
+class CapabilityExportedPackage extends AbstractExportedPackage
+{
+ CapabilityExportedPackage(AbstractBundleState bundle, PackageCapability capability)
+ {
+ super(bundle, capability.getName());
+ setVersion(Version.parseVersion(capability.getVersion().toString()));
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/PackageAdminImpl.java (from rev 100981, projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/PackageAdminImpl.java)
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/PackageAdminImpl.java (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/PackageAdminImpl.java 2010-02-15 21:18:31 UTC (rev 100995)
@@ -0,0 +1,336 @@
+/*
+ * 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.framework.packageadmin;
+
+//$Id: StartLevelImpl.java 93118 2009-09-02 08:24:44Z thomas.diesler at jboss.com $
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.classloading.plugins.metadata.PackageCapability;
+import org.jboss.classloading.spi.dependency.ClassLoading;
+import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.classloading.spi.metadata.CapabilitiesMetaData;
+import org.jboss.classloading.spi.metadata.Capability;
+import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
+import org.jboss.deployers.plugins.classloading.AbstractDeploymentClassLoaderPolicyModule;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.osgi.framework.bundle.AbstractBundleState;
+import org.jboss.osgi.framework.bundle.AbstractDeployedBundleState;
+import org.jboss.osgi.framework.bundle.OSGiBundleManager;
+import org.jboss.osgi.framework.bundle.OSGiBundleState;
+import org.jboss.osgi.framework.bundle.OSGiFragmentState;
+import org.jboss.osgi.framework.bundle.OSGiSystemState;
+import org.jboss.osgi.framework.plugins.PackageAdminPlugin;
+import org.jboss.osgi.framework.plugins.ResolverPlugin;
+import org.jboss.osgi.framework.plugins.SystemPackagesPlugin;
+import org.jboss.osgi.framework.plugins.internal.AbstractServicePlugin;
+import org.jboss.osgi.framework.resolver.Resolver;
+import org.jboss.osgi.framework.resolver.ResolverBundle;
+import org.jboss.osgi.spi.NotImplementedException;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.service.packageadmin.ExportedPackage;
+import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.service.packageadmin.RequiredBundle;
+
+/**
+ * An implementation of the {@link PackageAdmin}.
+ *
+ * [TODO] [JBOSGI-149] Fully implement PackageAdmin
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 03-Sep-2009
+ */
+public class PackageAdminImpl extends AbstractServicePlugin implements PackageAdminPlugin
+{
+ /** The log */
+ private static final Logger log = Logger.getLogger(PackageAdminImpl.class);
+
+ public PackageAdminImpl(OSGiBundleManager bundleManager)
+ {
+ super(bundleManager);
+ }
+
+ public void startService()
+ {
+ BundleContext sysContext = getSystemContext();
+ sysContext.registerService(PackageAdmin.class.getName(), this, null);
+ }
+
+ public void stopService()
+ {
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Bundle getBundle(Class clazz)
+ {
+ if (clazz == null)
+ throw new IllegalArgumentException("Null class");
+
+ ClassLoader classLoader = clazz.getClassLoader();
+ Module module = ClassLoading.getModuleForClassLoader(classLoader);
+ if (module instanceof AbstractDeploymentClassLoaderPolicyModule)
+ {
+ AbstractDeploymentClassLoaderPolicyModule deploymentModule = (AbstractDeploymentClassLoaderPolicyModule)module;
+ DeploymentUnit unit = deploymentModule.getDeploymentUnit();
+ AbstractBundleState bundleState = unit.getAttachment(AbstractBundleState.class);
+ if (bundleState != null)
+ {
+ // Return the fragment's host bundle
+ if (bundleState.isFragment())
+ bundleState = ((OSGiFragmentState)bundleState).getFragmentHost();
+
+ return bundleState.getBundleInternal();
+ }
+ }
+ return null;
+ }
+
+ public int getBundleType(Bundle bundle)
+ {
+ AbstractBundleState bundleState = AbstractBundleState.assertBundleState(bundle);
+ return bundleState.isFragment() ? BUNDLE_TYPE_FRAGMENT : 0;
+ }
+
+ public Bundle[] getBundles(String symbolicName, String versionRange)
+ {
+ throw new NotImplementedException();
+ }
+
+ public ExportedPackage getExportedPackage(String name)
+ {
+ throw new NotImplementedException();
+ }
+
+ public ExportedPackage[] getExportedPackages(Bundle bundle)
+ {
+ List<ExportedPackage> exported = new ArrayList<ExportedPackage>();
+
+ AbstractBundleState absBundleState = AbstractBundleState.assertBundleState(bundle);
+ if (absBundleState instanceof OSGiSystemState)
+ {
+ OSGiSystemState bundleState = (OSGiSystemState)absBundleState;
+ SystemPackagesPlugin plugin = bundleState.getBundleManager().getPlugin(SystemPackagesPlugin.class);
+
+ // [TODO] include package versions
+ for (String packageName : plugin.getSystemPackages(false))
+ {
+ exported.add(new SystemExportedPackage(bundleState, packageName));
+ }
+ }
+ else
+ {
+ AbstractDeployedBundleState bundleState = (AbstractDeployedBundleState)absBundleState;
+ ClassLoadingMetaData metaData = bundleState.getDeploymentUnit().getAttachment(ClassLoadingMetaData.class);
+ if (metaData == null)
+ throw new IllegalStateException("Cannot obtain ClassLoadingMetaData");
+
+ CapabilitiesMetaData capabilities = metaData.getCapabilities();
+ for (Capability capability : capabilities.getCapabilities())
+ {
+ if (capability instanceof PackageCapability)
+ {
+ exported.add(new CapabilityExportedPackage(bundleState, (PackageCapability)capability));
+ }
+ }
+ }
+
+ if (exported.size() == 0)
+ return null;
+
+ ExportedPackage[] result = new ExportedPackage[exported.size()];
+ exported.toArray(result);
+
+ return result;
+ }
+
+ public ExportedPackage[] getExportedPackages(String name)
+ {
+ List<ExportedPackage> exported = new ArrayList<ExportedPackage>();
+
+ for (AbstractBundleState auxBundle : getBundleManager().getBundles())
+ {
+ for (ExportedPackage auxPackage : getExportedPackages(auxBundle))
+ {
+ if (auxPackage.getName().equals(name))
+ exported.add(auxPackage);
+ }
+ }
+
+ if (exported.size() == 0)
+ return null;
+
+ ExportedPackage[] result = new ExportedPackage[exported.size()];
+ exported.toArray(result);
+
+ return result;
+ }
+
+ public Bundle[] getFragments(Bundle bundle)
+ {
+ AbstractBundleState absBundleState = AbstractBundleState.assertBundleState(bundle);
+ if (absBundleState instanceof OSGiBundleState == false)
+ return null;
+
+ List<Bundle> bundles = new ArrayList<Bundle>();
+
+ OSGiBundleState bundleState = (OSGiBundleState)absBundleState;
+ List<OSGiFragmentState> fragments = bundleState.getAttachedFragments();
+ for (OSGiFragmentState aux : fragments)
+ bundles.add(aux.getBundle());
+
+ if (bundles.isEmpty())
+ return null;
+
+ return bundles.toArray(new Bundle[bundles.size()]);
+ }
+
+ public Bundle[] getHosts(Bundle bundle)
+ {
+ AbstractBundleState absBundleState = AbstractBundleState.assertBundleState(bundle);
+ if (absBundleState instanceof OSGiFragmentState == false)
+ return null;
+
+ List<Bundle> bundles = new ArrayList<Bundle>();
+
+ // [TODO] Add support for multiple hosts
+ OSGiFragmentState bundleState = (OSGiFragmentState)absBundleState;
+ OSGiBundleState fragmentHost = bundleState.getFragmentHost();
+ if (fragmentHost != null)
+ {
+ bundles.add(fragmentHost.getBundle());
+ }
+
+ if (bundles.isEmpty())
+ return null;
+
+ return bundles.toArray(new Bundle[bundles.size()]);
+ }
+
+ public RequiredBundle[] getRequiredBundles(String symbolicName)
+ {
+ // [TODO] getRequiredBundles(String symbolicName)
+ log.info("Not implemented getRequiredBundles");
+ return null;
+ }
+
+ public void refreshPackages(Bundle[] bundles)
+ {
+ // [TODO] refreshPackages(Bundle[] bundles)
+ log.debug("Ignore refreshPackages");
+ }
+
+ public boolean resolveBundles(Bundle[] bundleArr)
+ {
+ // Collect the bundles that are in state INSTALLED
+ List<Bundle> unresolvedBundles = new ArrayList<Bundle>();
+ if (bundleArr == null)
+ {
+ for (Bundle bundle : getBundleManager().getBundles(Bundle.INSTALLED))
+ {
+ AbstractBundleState bundleState = AbstractBundleState.assertBundleState(bundle);
+ if (bundleState.isFragment() == false)
+ unresolvedBundles.add(bundleState);
+ }
+ }
+ else
+ {
+ for (Bundle bundle : bundleArr)
+ {
+ if (bundle.getState() == Bundle.INSTALLED)
+ unresolvedBundles.add(OSGiBundleState.assertBundleState(bundle));
+ }
+ }
+
+ if (unresolvedBundles.isEmpty())
+ return true;
+
+ List<OSGiBundleState> resolvableBundles = new ArrayList<OSGiBundleState>();
+
+ // Check if the external resolver plugin is available
+ Resolver bundleResolver = getBundleManager().getOptionalPlugin(ResolverPlugin.class);
+ if (bundleResolver != null)
+ {
+ // Resolve the bundles through the resolver
+ for (ResolverBundle aux : bundleResolver.resolve(unresolvedBundles))
+ resolvableBundles.add(OSGiBundleState.assertBundleState(aux.getBundle()));
+ }
+ else
+ {
+ // Every unresolved bundle is automatically copied
+ // to the list of externaly resolved bundles
+ for (Bundle aux : unresolvedBundles)
+ resolvableBundles.add(OSGiBundleState.assertBundleState(aux));
+ }
+
+ boolean allResolved = resolvableBundles.containsAll(unresolvedBundles);
+
+ // TODO [JBDEPLOY-226] Allow multiple deployments to change state at once
+ int resolved = 1;
+ while (resolved > 0)
+ {
+ resolved = 0;
+ Iterator<OSGiBundleState> it = resolvableBundles.iterator();
+ while (it.hasNext())
+ {
+ OSGiBundleState bundleState = it.next();
+ try
+ {
+ boolean bundleResolved = getBundleManager().resolveBundle(bundleState, false);
+ if (bundleResolved)
+ {
+ it.remove();
+ resolved++;
+ }
+ }
+ catch (BundleException ex)
+ {
+ // ignore
+ }
+ }
+ }
+
+ // Sanity check, that the controller could actually also resolve these bundles
+ if (resolvableBundles.isEmpty() == false)
+ {
+ log.error("Controller could not resolve: " + resolvableBundles);
+ for (OSGiBundleState bundleState : resolvableBundles)
+ {
+ try
+ {
+ getBundleManager().resolveBundle(bundleState, true);
+ }
+ catch (Exception ex)
+ {
+ log.debug("Cannot resolve: " + bundleState, ex);
+ }
+ }
+ }
+
+ allResolved = allResolved && resolvableBundles.isEmpty();
+ return allResolved;
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/SystemExportedPackage.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/SystemExportedPackage.java (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/packageadmin/SystemExportedPackage.java 2010-02-15 21:18:31 UTC (rev 100995)
@@ -0,0 +1,41 @@
+/*
+ * 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.framework.packageadmin;
+
+//$Id: StartLevelImpl.java 93118 2009-09-02 08:24:44Z thomas.diesler at jboss.com $
+
+import org.jboss.osgi.framework.bundle.AbstractBundleState;
+import org.osgi.service.packageadmin.ExportedPackage;
+
+/**
+ * An implementation of the {@link ExportedPackage} for packages exported by the system bundle..
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 15-Feb-2010
+ */
+class SystemExportedPackage extends AbstractExportedPackage
+{
+ SystemExportedPackage(AbstractBundleState bundle, String packageName)
+ {
+ super(bundle, packageName);
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/PackageAdminImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/PackageAdminImpl.java 2010-02-15 21:12:39 UTC (rev 100994)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/PackageAdminImpl.java 2010-02-15 21:18:31 UTC (rev 100995)
@@ -1,324 +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.framework.service.internal;
-
-//$Id: StartLevelImpl.java 93118 2009-09-02 08:24:44Z thomas.diesler at jboss.com $
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.classloading.plugins.metadata.PackageCapability;
-import org.jboss.classloading.spi.dependency.ClassLoading;
-import org.jboss.classloading.spi.dependency.Module;
-import org.jboss.classloading.spi.metadata.CapabilitiesMetaData;
-import org.jboss.classloading.spi.metadata.Capability;
-import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
-import org.jboss.deployers.plugins.classloading.AbstractDeploymentClassLoaderPolicyModule;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.logging.Logger;
-import org.jboss.osgi.framework.bundle.AbstractBundleState;
-import org.jboss.osgi.framework.bundle.AbstractDeployedBundleState;
-import org.jboss.osgi.framework.bundle.OSGiBundleManager;
-import org.jboss.osgi.framework.bundle.OSGiBundleState;
-import org.jboss.osgi.framework.bundle.OSGiFragmentState;
-import org.jboss.osgi.framework.plugins.PackageAdminPlugin;
-import org.jboss.osgi.framework.plugins.ResolverPlugin;
-import org.jboss.osgi.framework.plugins.internal.AbstractServicePlugin;
-import org.jboss.osgi.framework.resolver.Resolver;
-import org.jboss.osgi.framework.resolver.ResolverBundle;
-import org.jboss.osgi.spi.NotImplementedException;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.framework.Version;
-import org.osgi.service.packageadmin.ExportedPackage;
-import org.osgi.service.packageadmin.PackageAdmin;
-import org.osgi.service.packageadmin.RequiredBundle;
-
-/**
- * An implementation of the {@link PackageAdmin}.
- *
- * [TODO] [JBOSGI-149] Fully implement PackageAdmin
- *
- * @author thomas.diesler at jboss.com
- * @since 03-Sep-2009
- */
-public class PackageAdminImpl extends AbstractServicePlugin implements PackageAdminPlugin
-{
- /** The log */
- private static final Logger log = Logger.getLogger(PackageAdminImpl.class);
-
- private ServiceRegistration registration;
-
- public PackageAdminImpl(OSGiBundleManager bundleManager)
- {
- super(bundleManager);
- }
-
- public void startService()
- {
- BundleContext sysContext = getSystemContext();
- registration = sysContext.registerService(PackageAdmin.class.getName(), this, null);
- }
-
- public void stopService()
- {
- if (registration != null)
- {
- registration.unregister();
- registration = null;
- }
- }
-
- @SuppressWarnings("rawtypes")
- public Bundle getBundle(Class clazz)
- {
- if (clazz == null)
- throw new IllegalArgumentException("Null class");
-
- ClassLoader classLoader = clazz.getClassLoader();
- Module module = ClassLoading.getModuleForClassLoader(classLoader);
- if (module instanceof AbstractDeploymentClassLoaderPolicyModule)
- {
- AbstractDeploymentClassLoaderPolicyModule deploymentModule = (AbstractDeploymentClassLoaderPolicyModule)module;
- DeploymentUnit unit = deploymentModule.getDeploymentUnit();
- AbstractBundleState bundleState = unit.getAttachment(AbstractBundleState.class);
- if (bundleState != null)
- {
- // Return the fragment's host bundle
- if (bundleState.isFragment())
- bundleState = ((OSGiFragmentState)bundleState).getFragmentHost();
-
- return bundleState.getBundleInternal();
- }
- }
- return null;
- }
-
- public int getBundleType(Bundle bundle)
- {
- throw new NotImplementedException();
- }
-
- public Bundle[] getBundles(String symbolicName, String versionRange)
- {
- throw new NotImplementedException();
- }
-
- public ExportedPackage getExportedPackage(String name)
- {
- throw new NotImplementedException();
- }
-
- public ExportedPackage[] getExportedPackages(Bundle bundle)
- {
- AbstractBundleState abstractBundleState = getBundleManager().getBundleState(bundle);
-
- // [TODO] exported packages for the system bundle
- if (abstractBundleState instanceof OSGiBundleState == false)
- throw new UnsupportedOperationException("FIXME: getExportedPackages for System bundle");
-
- AbstractDeployedBundleState bundleState = (AbstractDeployedBundleState)abstractBundleState;
- DeploymentUnit unit = bundleState.getDeploymentUnit();
- ClassLoadingMetaData metaData = unit.getAttachment(ClassLoadingMetaData.class);
- if (metaData == null)
- throw new IllegalStateException("Cannot obtain ClassLoadingMetaData");
-
- List<ExportedPackage> exported = new ArrayList<ExportedPackage>();
- CapabilitiesMetaData capabilities = metaData.getCapabilities();
- for (Capability capability : capabilities.getCapabilities())
- {
- if (capability instanceof PackageCapability)
- {
- exported.add(new ExportedPackageImpl(bundleState, (PackageCapability)capability));
- }
- }
- if (exported.size() == 0)
- return null;
-
- ExportedPackage[] result = new ExportedPackage[exported.size()];
- exported.toArray(result);
-
- return result;
- }
-
- public ExportedPackage[] getExportedPackages(String name)
- {
- throw new NotImplementedException();
- }
-
- public Bundle[] getFragments(Bundle bundle)
- {
- throw new NotImplementedException();
- }
-
- public Bundle[] getHosts(Bundle bundle)
- {
- throw new NotImplementedException();
- }
-
- public RequiredBundle[] getRequiredBundles(String symbolicName)
- {
- throw new NotImplementedException();
- }
-
- public void refreshPackages(Bundle[] bundles)
- {
- // [TODO] refreshPackages(Bundle[] bundles)
- log.debug("Ignore refreshPackages");
- }
-
- public boolean resolveBundles(Bundle[] bundleArr)
- {
- // Collect the bundles that are in state INSTALLED
- List<Bundle> unresolvedBundles = new ArrayList<Bundle>();
- if (bundleArr == null)
- {
- for (Bundle bundle : getBundleManager().getBundles(Bundle.INSTALLED))
- {
- AbstractBundleState bundleState = AbstractBundleState.assertBundleState(bundle);
- if (bundleState.isFragment() == false)
- unresolvedBundles.add(bundleState);
- }
- }
- else
- {
- for (Bundle bundle : bundleArr)
- {
- if (bundle.getState() == Bundle.INSTALLED)
- unresolvedBundles.add(OSGiBundleState.assertBundleState(bundle));
- }
- }
-
- if (unresolvedBundles.isEmpty())
- return true;
-
- List<OSGiBundleState> resolvableBundles = new ArrayList<OSGiBundleState>();
-
- // Check if the external resolver plugin is available
- Resolver bundleResolver = getBundleManager().getOptionalPlugin(ResolverPlugin.class);
- if (bundleResolver != null)
- {
- // Resolve the bundles through the resolver
- for (ResolverBundle aux : bundleResolver.resolve(unresolvedBundles))
- resolvableBundles.add(OSGiBundleState.assertBundleState(aux.getBundle()));
- }
- else
- {
- // Every unresolved bundle is automatically copied
- // to the list of externaly resolved bundles
- for (Bundle aux : unresolvedBundles)
- resolvableBundles.add(OSGiBundleState.assertBundleState(aux));
- }
-
- boolean allResolved = resolvableBundles.containsAll(unresolvedBundles);
-
- // TODO [JBDEPLOY-226] Allow multiple deployments to change state at once
- int resolved = 1;
- while (resolved > 0)
- {
- resolved = 0;
- Iterator<OSGiBundleState> it = resolvableBundles.iterator();
- while (it.hasNext())
- {
- OSGiBundleState bundleState = it.next();
- try
- {
- boolean bundleResolved = getBundleManager().resolveBundle(bundleState, false);
- if (bundleResolved)
- {
- it.remove();
- resolved++;
- }
- }
- catch (BundleException ex)
- {
- // ignore
- }
- }
- }
-
- // Sanity check, that the controller could actually also resolve these bundles
- if (resolvableBundles.isEmpty() == false)
- {
- log.error("Controller could not resolve: " + resolvableBundles);
- for (OSGiBundleState bundleState : resolvableBundles)
- {
- try
- {
- getBundleManager().resolveBundle(bundleState, true);
- }
- catch (Exception ex)
- {
- log.debug("Cannot resolve: " + bundleState, ex);
- }
- }
- }
-
- allResolved = allResolved && resolvableBundles.isEmpty();
- return allResolved;
- }
-
- private static class ExportedPackageImpl implements ExportedPackage
- {
- private Bundle bundle;
- private PackageCapability capability;
-
- public ExportedPackageImpl(AbstractBundleState bundle, PackageCapability capability)
- {
- this.bundle = bundle.getBundle();
- this.capability = capability;
- }
-
- public Bundle getExportingBundle()
- {
- return bundle;
- }
-
- public Bundle[] getImportingBundles()
- {
- throw new NotImplementedException();
- }
-
- public String getName()
- {
- return capability.getName();
- }
-
- public String getSpecificationVersion()
- {
- throw new NotImplementedException();
- }
-
- public Version getVersion()
- {
- return Version.parseVersion(capability.getVersion().toString());
- }
-
- public boolean isRemovalPending()
- {
- throw new NotImplementedException();
- }
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java 2010-02-15 21:12:39 UTC (rev 100994)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java 2010-02-15 21:18:31 UTC (rev 100995)
@@ -23,7 +23,7 @@
import junit.framework.Test;
-import org.jboss.osgi.framework.service.internal.PackageAdminImpl;
+import org.jboss.osgi.framework.packageadmin.PackageAdminImpl;
import org.jboss.test.osgi.FrameworkTest;
import org.jboss.test.osgi.compendium.support.b.Other;
import org.jboss.test.osgi.compendium.support.a.PA;
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-02-15 21:12:39 UTC (rev 100994)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-02-15 21:18:31 UTC (rev 100995)
@@ -95,7 +95,7 @@
<bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
+ <bean name="PackageAdminService" class="org.jboss.osgi.framework.packageadmin.PackageAdminImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="DeployerService" class="org.jboss.osgi.framework.service.internal.DeployerServiceImpl">
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2010-02-15 21:12:39 UTC (rev 100994)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2010-02-15 21:18:31 UTC (rev 100995)
@@ -132,7 +132,7 @@
<bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
+ <bean name="PackageAdminService" class="org.jboss.osgi.framework.packageadmin.PackageAdminImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="DeployerService" class="org.jboss.osgi.framework.service.internal.DeployerServiceImpl">
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml 2010-02-15 21:12:39 UTC (rev 100994)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml 2010-02-15 21:18:31 UTC (rev 100995)
@@ -125,7 +125,7 @@
<bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
+ <bean name="PackageAdminService" class="org.jboss.osgi.framework.packageadmin.PackageAdminImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="DeployerService" class="org.jboss.osgi.framework.service.internal.DeployerServiceImpl">
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2010-02-15 21:12:39 UTC (rev 100994)
+++ projects/jboss-osgi/trunk/pom.xml 2010-02-15 21:18:31 UTC (rev 100995)
@@ -44,8 +44,10 @@
<!-- Properties -->
<properties>
<version.apache.ant>1.7.0</version.apache.ant>
- <version.apache.aries.blueprint>1.0.0.20100120</version.apache.aries.blueprint>
- <version.apache.aries.util>1.0.0.20100120</version.apache.aries.util>
+ <version.apache.aries.blueprint>1.0.0-incubating-SNAPSHOT</version.apache.aries.blueprint>
+ <version.apache.aries.jmx>1.0.0-incubating-SNAPSHOT</version.apache.aries.jmx>
+ <version.apache.aries.jndi>1.0.0-incubating-SNAPSHOT</version.apache.aries.jndi>
+ <version.apache.aries.util>1.0.0-incubating-SNAPSHOT</version.apache.aries.util>
<version.apache.felix.configadmin>1.2.4</version.apache.felix.configadmin>
<version.apache.felix.core>1.4.0</version.apache.felix.core>
<version.apache.felix.eventadmin>1.0.0</version.apache.felix.eventadmin>
@@ -101,6 +103,16 @@
<version>${version.apache.aries.blueprint}</version>
</dependency>
<dependency>
+ <groupId>org.apache.aries.jmx</groupId>
+ <artifactId>org.apache.aries.jmx</artifactId>
+ <version>${version.apache.aries.jmx}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.jndi</groupId>
+ <artifactId>org.apache.aries.jndi</artifactId>
+ <version>${version.apache.aries.jndi}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.aries</groupId>
<artifactId>org.apache.aries.util</artifactId>
<version>${version.apache.aries.util}</version>
Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2010-02-15 21:12:39 UTC (rev 100994)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2010-02-15 21:18:31 UTC (rev 100995)
@@ -29,6 +29,8 @@
<include>*:jboss-osgi-webapp:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
<include>*:org.apache.aries.blueprint:jar</include>
+ <include>*:org.apache.aries.jmx:jar</include>
+ <include>*:org.apache.aries.jndi:jar</include>
<include>*:org.apache.aries.util:jar</include>
<include>*:org.apache.felix.configadmin:jar</include>
<include>*:org.apache.felix.eventadmin:jar</include>
Added: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/enterprise/jmx/JMXEnterpriseTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/enterprise/jmx/JMXEnterpriseTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/enterprise/jmx/JMXEnterpriseTestCase.java 2010-02-15 21:18:31 UTC (rev 100995)
@@ -0,0 +1,105 @@
+/*
+ * 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.test.osgi.example.enterprise.jmx;
+
+//$Id: JMXTestCase.java 95465 2009-10-23 05:59:57Z thomas.diesler at jboss.com $
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.openmbean.TabularData;
+
+import org.jboss.osgi.jmx.JMXCapability;
+import org.jboss.osgi.spi.management.MBeanProxy;
+import org.jboss.osgi.spi.management.ObjectNameFactory;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.osgi.testing.OSGiTestHelper;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.osgi.jmx.framework.BundleStateMBean;
+
+/**
+ * A test that deployes a bundle that registeres an MBean
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 15-Feb-2010
+ */
+public class JMXEnterpriseTestCase extends OSGiTest
+{
+ private static OSGiRuntime runtime;
+
+ private BundleStateMBean bundleState;
+
+ @BeforeClass
+ public static void setUpClass() throws Exception
+ {
+ OSGiTestHelper helper = new OSGiTestHelper();
+ runtime = helper.getDefaultRuntime();
+ runtime.addCapability(new JMXCapability());
+
+ // Optionally install/start the Apache Aries JMX bundle
+ if (runtime.getBundle("org.apache.aries.jmx", null) == null)
+ runtime.installBundle("bundles/org.apache.aries.jmx.jar").start();
+ }
+
+ @AfterClass
+ public static void tearDownClass() throws Exception
+ {
+ runtime.shutdown();
+ runtime = null;
+ }
+
+ @Test
+ public void testBundleStateMBean() throws Exception
+ {
+ BundleStateMBean bundleState = getBundleStateMBean();
+ assertNotNull("BundleStateMBean not null", bundleState);
+
+ TabularData bundleData = bundleState.listBundles();
+ assertNotNull("TabularData not null", bundleData);
+ assertFalse("TabularData not empty", bundleData.isEmpty());
+ }
+
+ private BundleStateMBean getBundleStateMBean() throws Exception
+ {
+ if (bundleState == null)
+ {
+ int timeout = 5000;
+ MBeanServerConnection mbeanServer = runtime.getMBeanServer();
+ ObjectName objectName = ObjectNameFactory.create(BundleStateMBean.OBJECTNAME);
+ while (bundleState == null && 0 < (timeout -= 200))
+ {
+ if (mbeanServer.isRegistered(objectName))
+ {
+ bundleState = MBeanProxy.get(BundleStateMBean.class, objectName, mbeanServer);
+ break;
+ }
+ Thread.sleep(200);
+ }
+ }
+ return bundleState;
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-02-15 21:12:39 UTC (rev 100994)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-02-15 21:18:31 UTC (rev 100995)
@@ -108,7 +108,7 @@
<bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
+ <bean name="PackageAdminService" class="org.jboss.osgi.framework.packageadmin.PackageAdminImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="DeployerService" class="org.jboss.osgi.framework.service.internal.DeployerServiceImpl">
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-02-15 21:12:39 UTC (rev 100994)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-02-15 21:18:31 UTC (rev 100995)
@@ -94,7 +94,7 @@
<bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
+ <bean name="PackageAdminService" class="org.jboss.osgi.framework.packageadmin.PackageAdminImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="DeployerService" class="org.jboss.osgi.framework.service.internal.DeployerServiceImpl">
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2010-02-15 21:12:39 UTC (rev 100994)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2010-02-15 21:18:31 UTC (rev 100995)
@@ -55,8 +55,8 @@
<groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-deployment</artifactId>
</dependency>
-
- <!-- Bundle Dependencies -->
+
+ <!-- Apache Aries Dependencies -->
<dependency>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>org.apache.aries.blueprint</artifactId>
@@ -69,6 +69,18 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>org.apache.aries.jmx</groupId>
+ <artifactId>org.apache.aries.jmx</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.jndi</groupId>
+ <artifactId>org.apache.aries.jndi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Bundle Dependencies -->
+ <dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.log</artifactId>
<scope>provided</scope>
More information about the jboss-osgi-commits
mailing list